66 * Represents a proxy configuration with address, port, and optional authentication credentials.
77 * This class is an implementation of the {@link ProxyConfiguration} interface.
88 */
9- public class CoreProxyConfiguration implements ProxyConfiguration {
9+ public final class CoreProxyConfiguration implements ProxyConfiguration {
1010
1111 /**
1212 * The proxy server address (e.g., IP or domain name).
@@ -37,7 +37,8 @@ public class CoreProxyConfiguration implements ProxyConfiguration {
3737 * @param username The username for proxy authentication (can be {@code null}).
3838 * @param password The password for proxy authentication (can be {@code null}).
3939 */
40- private CoreProxyConfiguration (String address , int port , String username , String password ) {
40+ private CoreProxyConfiguration (final String address , final int port ,
41+ final String username , final String password ) {
4142 this .address = address ;
4243 this .port = port ;
4344 this .username = username ;
@@ -80,12 +81,12 @@ public Builder newBuilder() {
8081 */
8182 @ Override
8283 public String toString () {
83- return "CoreProxyConfiguration [" +
84- "address=" + address +
85- ", port=" + port +
86- ", username=" + ( username != null ? username : "null" ) +
87- ", password=" + ( password != null ? password : "null" ) +
88- "]" ;
84+ return "CoreProxyConfiguration ["
85+ + "address=" + address
86+ + ", port=" + port
87+ + ", username=" + username
88+ + ", password=" + password
89+ + "]" ;
8990 }
9091
9192 /**
@@ -98,7 +99,13 @@ public static class Builder {
9899 private String username ;
99100 private String password ;
100101
101- public Builder (String address , int port ) {
102+ /**
103+ * Creates a new {@code Builder} instance with the specified proxy server details.
104+ *
105+ * @param address the hostname or IP address of the proxy server
106+ * @param port the port number of the proxy server
107+ */
108+ public Builder (final String address , final int port ) {
102109 this .address = address ;
103110 this .port = port ;
104111 }
@@ -131,4 +138,4 @@ public CoreProxyConfiguration build() {
131138 return new CoreProxyConfiguration (address , port , username , password );
132139 }
133140 }
134- }
141+ }
0 commit comments