Skip to content

Commit e6fa057

Browse files
committed
fix: lint errors
1 parent 9ebdfc1 commit e6fa057

2 files changed

Lines changed: 21 additions & 13 deletions

File tree

src/main/java/io/apimatic/core/configurations/http/client/CoreHttpClientConfiguration.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,15 @@ public final class CoreHttpClientConfiguration implements ClientConfiguration {
141141
* @param shouldRetryOnTimeout
142142
* @param httpClientInstance
143143
* @param overrideHttpClientConfigurations
144+
* @param proxyConfiguration
144145
*/
145146
private CoreHttpClientConfiguration(final long timeout, final int numberOfRetries,
146147
final int backOffFactor, final long retryInterval,
147148
final boolean skipSslCertVerification, final Set<Integer> httpStatusCodesToRetry,
148149
final Set<Method> httpMethodsToRetry, final long maximumRetryWaitTime,
149150
final boolean shouldRetryOnTimeout, final okhttp3.OkHttpClient httpClientInstance,
150-
final boolean overrideHttpClientConfigurations, final ProxyConfiguration proxyConfiguration) {
151+
final boolean overrideHttpClientConfigurations,
152+
final ProxyConfiguration proxyConfiguration) {
151153
this.timeout = timeout;
152154
this.numberOfRetries = numberOfRetries;
153155
this.backOffFactor = backOffFactor;
@@ -254,8 +256,7 @@ public boolean skipSslCertVerification() {
254256
/**
255257
* Returns the proxy configuration used to route requests through a proxy server.
256258
* This includes the proxy address, port, and any authentication credentials.
257-
*
258-
* @return the {@link ProxyConfiguration}, or {@code null} if no proxy is configured
259+
* @return the {@link ProxyConfiguration}
259260
*/
260261
public ProxyConfiguration getProxyConfiguration() { return proxyConfiguration; }
261262

src/main/java/io/apimatic/core/configurations/http/client/CoreProxyConfiguration.java

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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

Comments
 (0)