File tree 1 file changed +4
-7
lines changed
client/src/main/java/org/asynchttpclient/uri 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 13
13
package org .asynchttpclient .uri ;
14
14
15
15
import static org .asynchttpclient .util .Assertions .*;
16
+ import static org .asynchttpclient .util .MiscUtils .*;
16
17
17
18
final class UriParser {
18
19
@@ -85,7 +86,7 @@ private boolean overrideWithContext(Uri context, String originalUrl) {
85
86
86
87
// see RFC2396 5.2.3
87
88
String contextPath = context .getPath ();
88
- if (isNotEmpty (contextPath ) && contextPath .charAt (0 ) == '/' )
89
+ if (isNonEmpty (contextPath ) && contextPath .charAt (0 ) == '/' )
89
90
scheme = null ;
90
91
91
92
if (scheme == null ) {
@@ -280,7 +281,7 @@ private void parseAuthority() {
280
281
throw new IllegalArgumentException ("Invalid port number :" + port );
281
282
282
283
// see RFC2396 5.2.4: ignore context path if authority is defined
283
- if (isNotEmpty (authority ))
284
+ if (isNonEmpty (authority ))
284
285
path = "" ;
285
286
}
286
287
}
@@ -294,7 +295,7 @@ private void computeRegularPath() {
294
295
if (urlWithoutQuery .charAt (start ) == '/' )
295
296
path = urlWithoutQuery .substring (start , end );
296
297
297
- else if (isNotEmpty (path ))
298
+ else if (isNonEmpty (path ))
298
299
handleRelativePath ();
299
300
300
301
else {
@@ -336,8 +337,4 @@ public void parse(Uri context, final String originalUrl) {
336
337
parseAuthority ();
337
338
computePath (queryOnly );
338
339
}
339
-
340
- private static boolean isNotEmpty (String string ) {
341
- return string != null && string .length () > 0 ;
342
- }
343
340
}
You can’t perform that action at this time.
0 commit comments