Skip to content

Commit d85102c

Browse files
author
Stephane Landelle
committed
Curse people setting public modifier on interface methods
1 parent 4d157ac commit d85102c

33 files changed

+97
-118
lines changed

src/main/java/com/ning/http/client/AsyncHttpProvider.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ public interface AsyncHttpProvider {
3131
* @return a {@link ListenableFuture} of Type T.
3232
* @throws IOException
3333
*/
34-
public <T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler) throws IOException;
34+
<T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler) throws IOException;
3535

3636
/**
3737
* Close the current underlying TCP/HTTP connection.
3838
*/
39-
public void close();
39+
void close();
4040

4141
/**
4242
* Prepare a {@link Response}
@@ -46,8 +46,7 @@ public interface AsyncHttpProvider {
4646
* @param bodyParts list of {@link HttpResponseBodyPart}
4747
* @return a {@link Response}
4848
*/
49-
public Response prepareResponse(HttpResponseStatus status,
50-
HttpResponseHeaders headers,
51-
List<HttpResponseBodyPart> bodyParts);
52-
49+
Response prepareResponse(HttpResponseStatus status,
50+
HttpResponseHeaders headers,
51+
List<HttpResponseBodyPart> bodyParts);
5352
}

src/main/java/com/ning/http/client/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 addProperty(U name, V value);
32+
AsyncHttpProviderConfig 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
}

src/main/java/com/ning/http/client/Body.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,4 @@ public interface Body {
4343
* @throws IOException
4444
*/
4545
void close() throws IOException;
46-
4746
}

src/main/java/com/ning/http/client/BodyConsumer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ public interface BodyConsumer {
3535
* @throws IOException
3636
*/
3737
void close() throws IOException;
38-
3938
}

src/main/java/com/ning/http/client/BodyGenerator.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,5 @@ public interface BodyGenerator {
2828
* @return The request body, never {@code null}.
2929
* @throws IOException If the body could not be created.
3030
*/
31-
Body createBody()
32-
throws IOException;
33-
31+
Body createBody() throws IOException;
3432
}

src/main/java/com/ning/http/client/ConnectionPoolKeyStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@
2020
public interface ConnectionPoolKeyStrategy {
2121

2222
String getKey(URI uri);
23-
}
23+
}

src/main/java/com/ning/http/client/ConnectionsPool.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,34 +28,34 @@ public interface ConnectionsPool<U, V> {
2828
* @param connection an I/O connection
2929
* @return true if added.
3030
*/
31-
public boolean offer(U uri, V connection);
31+
boolean offer(U uri, V connection);
3232

3333
/**
3434
* Remove the connection associated with the uri.
3535
*
3636
* @param uri the uri used when invoking addConnection
3737
* @return the connection associated with the uri
3838
*/
39-
public V poll(U uri);
39+
V poll(U uri);
4040

4141
/**
4242
* Remove all connections from the cache. A connection might have been associated with several uri.
4343
*
4444
* @param connection a connection
4545
* @return the true if the connection has been removed
4646
*/
47-
public boolean removeAll(V connection);
47+
boolean removeAll(V connection);
4848

4949
/**
5050
* Return true if a connection can be cached. A implementation can decide based on some rules to allow caching
5151
* Calling this method is equivalent of checking the returned value of {@link ConnectionsPool#offer(Object, Object)}
5252
*
5353
* @return true if a connection can be cached.
5454
*/
55-
public boolean canCacheConnection();
55+
boolean canCacheConnection();
5656

5757
/**
5858
* Destroy all connections that has been cached by this instance.
5959
*/
60-
public void destroy();
60+
void destroy();
6161
}

src/main/java/com/ning/http/client/Part.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
* Interface for the parts in a multipart request.
2121
*/
2222
public interface Part {
23-
public String getName();
24-
}
23+
String getName();
24+
}

src/main/java/com/ning/http/client/ProgressAsyncHandler.java

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

src/main/java/com/ning/http/client/ProxyServerSelector.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ public ProxyServer select(URI uri) {
2424
}
2525
};
2626
}
27+

src/main/java/com/ning/http/client/RandomAccessBody.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
/**
2020
* A request body which supports random access to its contents.
2121
*/
22-
public interface RandomAccessBody
23-
extends Body {
22+
public interface RandomAccessBody extends Body {
2423

2524
/**
2625
* Transfers the specified chunk of bytes from this body to the specified channel.
@@ -33,5 +32,4 @@ public interface RandomAccessBody
3332
*/
3433
long transferTo(long position, long count, WritableByteChannel target)
3534
throws IOException;
36-
3735
}

src/main/java/com/ning/http/client/Request.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public interface Request {
4444
* An entity that can be used to manipulate the Request's body output before it get sent.
4545
*/
4646
public static interface EntityWriter {
47-
public void writeEntity(OutputStream out) throws IOException;
47+
void writeEntity(OutputStream out) throws IOException;
4848
}
4949

5050
/**
@@ -53,191 +53,191 @@ public static interface EntityWriter {
5353
* @return the request's type (GET, POST, etc.)
5454
* @deprecated - use getMethod
5555
*/
56-
public String getReqType();
56+
String getReqType();
5757

5858
/**
5959
* Return the request's method name (GET, POST, etc.)
6060
*
6161
* @return the request's method name (GET, POST, etc.)
6262
*/
63-
public String getMethod();
63+
String getMethod();
6464

6565
/**
6666
* Return the decoded url
6767
*
6868
* @return the decoded url
6969
*/
70-
public String getUrl();
70+
String getUrl();
7171

72-
public URI getOriginalURI();
73-
public URI getURI();
74-
public URI getRawURI();
72+
URI getOriginalURI();
73+
URI getURI();
74+
URI getRawURI();
7575

7676
/**
7777
* Return the InetAddress to override
7878
*
7979
* @return the InetAddress
8080
*/
81-
public InetAddress getInetAddress();
81+
InetAddress getInetAddress();
8282

83-
public InetAddress getLocalAddress();
83+
InetAddress getLocalAddress();
8484

8585
/**
8686
* Return the undecoded url
8787
*
8888
* @return the undecoded url
8989
*/
90-
public String getRawUrl();
90+
String getRawUrl();
9191

9292
/**
9393
* Return the current set of Headers.
9494
*
9595
* @return a {@link FluentCaseInsensitiveStringsMap} contains headers.
9696
*/
97-
public FluentCaseInsensitiveStringsMap getHeaders();
97+
FluentCaseInsensitiveStringsMap getHeaders();
9898

9999
/**
100100
* Return Coookie.
101101
*
102102
* @return an unmodifiable Collection of Cookies
103103
*/
104-
public Collection<Cookie> getCookies();
104+
Collection<Cookie> getCookies();
105105

106106
/**
107107
* Return the current request's body as a byte array
108108
*
109109
* @return a byte array of the current request's body.
110110
*/
111-
public byte[] getByteData();
111+
byte[] getByteData();
112112

113113
/**
114114
* Return the current request's body as a string
115115
*
116116
* @return an String representation of the current request's body.
117117
*/
118-
public String getStringData();
118+
String getStringData();
119119

120120
/**
121121
* Return the current request's body as an InputStream
122122
*
123123
* @return an InputStream representation of the current request's body.
124124
*/
125-
public InputStream getStreamData();
125+
InputStream getStreamData();
126126

127127
/**
128128
* Return the current request's body as an EntityWriter
129129
*
130130
* @return an EntityWriter representation of the current request's body.
131131
*/
132-
public EntityWriter getEntityWriter();
132+
EntityWriter getEntityWriter();
133133

134134
/**
135135
* Return the current request's body generator.
136136
*
137137
* @return A generator for the request body.
138138
*/
139-
public BodyGenerator getBodyGenerator();
139+
BodyGenerator getBodyGenerator();
140140

141141
/**
142142
* Return the current size of the content-lenght header based on the body's size.
143143
*
144144
* @return the current size of the content-lenght header based on the body's size.
145145
* @deprecated
146146
*/
147-
public long getLength();
147+
long getLength();
148148

149149
/**
150150
* Return the current size of the content-lenght header based on the body's size.
151151
*
152152
* @return the current size of the content-lenght header based on the body's size.
153153
*/
154-
public long getContentLength();
154+
long getContentLength();
155155

156156
/**
157157
* Return the current parameters.
158158
*
159159
* @return a {@link FluentStringsMap} of parameters.
160160
*/
161-
public FluentStringsMap getParams();
161+
FluentStringsMap getParams();
162162

163163
/**
164164
* Return the current {@link Part}
165165
*
166166
* @return the current {@link Part}
167167
*/
168-
public List<Part> getParts();
168+
List<Part> getParts();
169169

170170
/**
171171
* Return the virtual host value.
172172
*
173173
* @return the virtual host value.
174174
*/
175-
public String getVirtualHost();
175+
String getVirtualHost();
176176

177177
/**
178178
* Return the query params.
179179
*
180180
* @return {@link FluentStringsMap} of query string
181181
*/
182-
public FluentStringsMap getQueryParams();
182+
FluentStringsMap getQueryParams();
183183

184184
/**
185185
* Return the {@link ProxyServer}
186186
*
187187
* @return the {@link ProxyServer}
188188
*/
189-
public ProxyServer getProxyServer();
189+
ProxyServer getProxyServer();
190190

191191
/**
192192
* Return the {@link Realm}
193193
*
194194
* @return the {@link Realm}
195195
*/
196-
public Realm getRealm();
196+
Realm getRealm();
197197

198198
/**
199199
* Return the {@link File} to upload.
200200
*
201201
* @return the {@link File} to upload.
202202
*/
203-
public File getFile();
203+
File getFile();
204204

205205
/**
206206
* Return the <tt>true></tt> to follow redirect
207207
*
208208
* @return the <tt>true></tt> to follow redirect
209209
*/
210-
public boolean isRedirectEnabled();
210+
boolean isRedirectEnabled();
211211

212212
/**
213213
*
214214
* @return <tt>true></tt> if request's redirectEnabled setting
215215
* should be used in place of client's
216216
*/
217-
public boolean isRedirectOverrideSet();
217+
boolean isRedirectOverrideSet();
218218

219219
/**
220220
* Return Per request configuration.
221221
*
222222
* @return Per request configuration.
223223
*/
224-
public PerRequestConfig getPerRequestConfig();
224+
PerRequestConfig getPerRequestConfig();
225225

226226
/**
227227
* Return the HTTP Range header value, or
228228
*
229229
* @return the range header value, or 0 is not set.
230230
*/
231-
public long getRangeOffset();
231+
long getRangeOffset();
232232

233233
/**
234234
* Return the encoding value used when encoding the request's body.
235235
*
236236
* @return the encoding value used when encoding the request's body.
237237
*/
238-
public String getBodyEncoding();
238+
String getBodyEncoding();
239239

240-
public boolean isUseRawUrl();
240+
boolean isUseRawUrl();
241241

242242
ConnectionPoolKeyStrategy getConnectionPoolKeyStrategy();
243243
}

0 commit comments

Comments
 (0)