Skip to content

Commit 82cb11a

Browse files
author
Stephane Landelle
committed
Curse people setting public modifier on interface methods
1 parent 8edfd54 commit 82cb11a

27 files changed

+60
-68
lines changed

api/src/main/java/org/asynchttpclient/AsyncHttpClientRegistry.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ public interface AsyncHttpClientRegistry {
7979

8080
void clearAllInstances();
8181
}
82+

api/src/main/java/org/asynchttpclient/AsyncHttpProviderConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,28 +29,28 @@ public interface AsyncHttpProviderConfig<U, V> {
2929
* @param value the value of the property
3030
* @return this instance of AsyncHttpProviderConfig
3131
*/
32-
public AsyncHttpProviderConfig<U, V> addProperty(U name, V value);
32+
AsyncHttpProviderConfig<U, V> addProperty(U name, V value);
3333

3434
/**
3535
* Return the value associated with the property's name
3636
*
3737
* @param name
3838
* @return this instance of AsyncHttpProviderConfig
3939
*/
40-
public V getProperty(U name);
40+
V getProperty(U name);
4141

4242
/**
4343
* Remove the value associated with the property's name
4444
*
4545
* @param name
4646
* @return true if removed
4747
*/
48-
public V removeProperty(U name);
48+
V removeProperty(U name);
4949

5050
/**
5151
* Return the curent entry set.
5252
*
5353
* @return a the curent entry set.
5454
*/
55-
public Set<Map.Entry<U, V>> propertiesSet();
55+
Set<Map.Entry<U, V>> propertiesSet();
5656
}

api/src/main/java/org/asynchttpclient/Body.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ public interface Body extends Closeable {
4444
* @throws IOException
4545
*/
4646
void close() throws IOException;
47-
4847
}

api/src/main/java/org/asynchttpclient/BodyConsumer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ public interface BodyConsumer extends Closeable {
3636
* @throws IOException
3737
*/
3838
void close() throws IOException;
39-
4039
}

api/src/main/java/org/asynchttpclient/ProgressAsyncHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,4 @@ public interface ProgressAsyncHandler<T> extends AsyncHandler<T> {
4444
* @return a {@link AsyncHandler.STATE} telling to CONTINUE or ABORT the current processing.
4545
*/
4646
STATE onContentWriteProgress(long amount, long current, long total);
47-
4847
}

api/src/main/java/org/asynchttpclient/Request.java

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -44,43 +44,43 @@ public interface Request {
4444
*
4545
* @return the request's method name (GET, POST, etc.)
4646
*/
47-
public String getMethod();
47+
String getMethod();
4848

4949
/**
5050
* Return the decoded url
5151
*
5252
* @return the decoded url
5353
*/
54-
public String getUrl();
54+
String getUrl();
5555

56-
public URI getOriginalURI();
56+
URI getOriginalURI();
5757

58-
public URI getURI();
58+
URI getURI();
5959

60-
public URI getRawURI();
60+
URI getRawURI();
6161

6262
/**
6363
* Return the InetAddress to override
6464
*
6565
* @return the InetAddress
6666
*/
67-
public InetAddress getInetAddress();
67+
InetAddress getInetAddress();
6868

69-
public InetAddress getLocalAddress();
69+
InetAddress getLocalAddress();
7070

7171
/**
7272
* Return the undecoded url
7373
*
7474
* @return the undecoded url
7575
*/
76-
public String getRawUrl();
76+
String getRawUrl();
7777

7878
/**
7979
* Return the current set of Headers.
8080
*
8181
* @return a {@link FluentCaseInsensitiveStringsMap} contains headers.
8282
*/
83-
public FluentCaseInsensitiveStringsMap getHeaders();
83+
FluentCaseInsensitiveStringsMap getHeaders();
8484

8585
/**
8686
* @return return <code>true</code> if request headers have been added,
@@ -95,128 +95,129 @@ public interface Request {
9595
*
9696
* @return an unmodifiable Collection of Cookies
9797
*/
98-
public Collection<Cookie> getCookies();
98+
Collection<Cookie> getCookies();
9999

100100
/**
101101
* Return the current request's body as a byte array
102102
*
103103
* @return a byte array of the current request's body.
104104
*/
105-
public byte[] getByteData();
105+
byte[] getByteData();
106106

107107
/**
108108
* Return the current request's body as a string
109109
*
110110
* @return an String representation of the current request's body.
111111
*/
112-
public String getStringData();
112+
String getStringData();
113113

114114
/**
115115
* Return the current request's body as an InputStream
116116
*
117117
* @return an InputStream representation of the current request's body.
118118
*/
119-
public InputStream getStreamData();
119+
InputStream getStreamData();
120120

121121
/**
122122
* Return the current request's body generator.
123123
*
124124
* @return A generator for the request body.
125125
*/
126-
public BodyGenerator getBodyGenerator();
126+
BodyGenerator getBodyGenerator();
127127

128128
/**
129129
* Return the current size of the content-lenght header based on the body's size.
130130
*
131131
* @return the current size of the content-lenght header based on the body's size.
132132
*/
133-
public long getContentLength();
133+
long getContentLength();
134134

135135
/**
136136
* Return the current parameters.
137137
*
138138
* @return a {@link FluentStringsMap} of parameters.
139139
*/
140-
public FluentStringsMap getParams();
140+
FluentStringsMap getParams();
141141

142142
/**
143143
* Return the current {@link Part}
144144
*
145145
* @return the current {@link Part}
146146
*/
147-
public List<Part> getParts();
147+
List<Part> getParts();
148148

149149
/**
150150
* Return the virtual host value.
151151
*
152152
* @return the virtual host value.
153153
*/
154-
public String getVirtualHost();
154+
String getVirtualHost();
155155

156156
/**
157157
* Return the query params.
158158
*
159159
* @return {@link FluentStringsMap} of query string
160160
*/
161-
public FluentStringsMap getQueryParams();
161+
FluentStringsMap getQueryParams();
162162

163163
/**
164164
* Return the {@link ProxyServer}
165165
*
166166
* @return the {@link ProxyServer}
167167
*/
168-
public ProxyServer getProxyServer();
168+
ProxyServer getProxyServer();
169169

170170
/**
171171
* Return the {@link Realm}
172172
*
173173
* @return the {@link Realm}
174174
*/
175-
public Realm getRealm();
175+
Realm getRealm();
176176

177177
/**
178178
* Return the {@link File} to upload.
179179
*
180180
* @return the {@link File} to upload.
181181
*/
182-
public File getFile();
182+
File getFile();
183183

184184
/**
185185
* Return the <tt>true></tt> to follow redirect
186186
*
187187
* @return the <tt>true></tt> to follow redirect
188188
*/
189-
public boolean isRedirectEnabled();
189+
boolean isRedirectEnabled();
190190

191191
/**
192192
*
193193
* @return <tt>true></tt> if request's redirectEnabled setting
194194
* should be used in place of client's
195195
*/
196-
public boolean isRedirectOverrideSet();
196+
boolean isRedirectOverrideSet();
197197

198198
/**
199199
* Return the request time out in milliseconds.
200200
*
201201
* @return requestTimeoutInMs.
202202
*/
203-
public int getRequestTimeoutInMs();
203+
int getRequestTimeoutInMs();
204204

205205
/**
206206
* Return the HTTP Range header value, or
207207
*
208208
* @return the range header value, or 0 is not set.
209209
*/
210-
public long getRangeOffset();
210+
long getRangeOffset();
211211

212212
/**
213213
* Return the encoding value used when encoding the request's body.
214214
*
215215
* @return the encoding value used when encoding the request's body.
216216
*/
217-
public String getBodyEncoding();
217+
String getBodyEncoding();
218218

219-
public boolean isUseRawUrl();
219+
boolean isUseRawUrl();
220220

221221
ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy();
222222
}
223+

api/src/main/java/org/asynchttpclient/ResumableBodyConsumer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ public interface ResumableBodyConsumer extends BodyConsumer {
3333
* @throws IOException
3434
*/
3535
long getTransferredBytes() throws IOException;
36-
3736
}

api/src/main/java/org/asynchttpclient/SignatureCalculator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,7 @@ public interface SignatureCalculator {
3535
* @param request Request that is being built; needed to access content to
3636
* be signed
3737
*/
38-
public void calculateAndAddSignature(String url, Request request, RequestBuilderBase<?> requestBuilder);
38+
void calculateAndAddSignature(String url,
39+
Request request,
40+
RequestBuilderBase<?> requestBuilder);
3941
}

api/src/main/java/org/asynchttpclient/ThrowableHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
public interface ThrowableHandler {
2020

2121
void onThrowable(Throwable t);
22-
2322
}

api/src/main/java/org/asynchttpclient/UpgradeHandler.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,4 @@ public interface UpgradeHandler<T> {
3333
* @param t a {@link Throwable}
3434
*/
3535
void onFailure(Throwable t);
36-
3736
}

api/src/main/java/org/asynchttpclient/filter/IOExceptionFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ public interface IOExceptionFilter {
2525
* @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one.
2626
* @throws FilterException to interrupt the filter processing.
2727
*/
28-
public <T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException;
28+
<T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException;
2929
}

api/src/main/java/org/asynchttpclient/filter/RequestFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ public interface RequestFilter {
2626
* @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one.
2727
* @throws FilterException to interrupt the filter processing.
2828
*/
29-
public <T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException;
29+
<T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException;
3030
}

api/src/main/java/org/asynchttpclient/filter/ResponseFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ public interface ResponseFilter {
2929
* @return {@link FilterContext}. The {@link FilterContext} instance may not the same as the original one.
3030
* @throws FilterException to interrupt the filter processing.
3131
*/
32-
public <T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException;
32+
<T> FilterContext<T> filter(FilterContext<T> ctx) throws FilterException;
3333
}

api/src/main/java/org/asynchttpclient/listener/TransferListener.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ public interface TransferListener {
2424
/**
2525
* Invoked when the request bytes are starting to get send.
2626
*/
27-
public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers);
27+
void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers);
2828

2929
/**
3030
* Invoked when the response bytes are starting to get received.
3131
*/
32-
public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers);
32+
void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers);
3333

3434
/**
3535
* Invoked every time response's chunk are received.
3636
*
3737
* @param bytes a {@link byte[]}
3838
*/
39-
public void onBytesReceived(byte[] bytes) throws IOException;
39+
void onBytesReceived(byte[] bytes) throws IOException;
4040

4141
/**
4242
* Invoked every time request's chunk are sent.
@@ -45,17 +45,18 @@ public interface TransferListener {
4545
* @param current The amount of bytes transferred
4646
* @param total The total number of bytes transferred
4747
*/
48-
public void onBytesSent(long amount, long current, long total);
48+
void onBytesSent(long amount, long current, long total);
4949

5050
/**
5151
* Invoked when the response bytes are been fully received.
5252
*/
53-
public void onRequestResponseCompleted();
53+
void onRequestResponseCompleted();
5454

5555
/**
5656
* Invoked when there is an unexpected issue.
5757
*
5858
* @param t a {@link Throwable}
5959
*/
60-
public void onThrowable(Throwable t);
60+
void onThrowable(Throwable t);
6161
}
62+

api/src/main/java/org/asynchttpclient/resumable/ResumableAsyncHandler.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -254,29 +254,29 @@ public static interface ResumableProcessor {
254254
* @param key a key. The recommended way is to use an url.
255255
* @param transferredBytes The number of bytes successfully transferred.
256256
*/
257-
public void put(String key, long transferredBytes);
257+
void put(String key, long transferredBytes);
258258

259259
/**
260260
* Remove the key associate value.
261261
*
262262
* @param key key from which the value will be discarded
263263
*/
264-
public void remove(String key);
264+
void remove(String key);
265265

266266
/**
267267
* Save the current {@link Map} instance which contains information about the current transfer state.
268268
* This method *only* invoked when the JVM is shutting down.
269269
*
270270
* @param map
271271
*/
272-
public void save(Map<String, Long> map);
272+
void save(Map<String, Long> map);
273273

274274
/**
275275
* Load the {@link Map} in memory, contains information about the transferred bytes.
276276
*
277277
* @return {@link Map}
278278
*/
279-
public Map<String, Long> load();
279+
Map<String, Long> load();
280280

281281
}
282282

0 commit comments

Comments
 (0)