File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
client/src/main/java/org/asynchttpclient/uri Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 1313package org .asynchttpclient .uri ;
1414
1515import static org .asynchttpclient .util .Assertions .*;
16+ import static org .asynchttpclient .util .MiscUtils .*;
1617
1718final class UriParser {
1819
@@ -85,7 +86,7 @@ private boolean overrideWithContext(Uri context, String originalUrl) {
8586
8687 // see RFC2396 5.2.3
8788 String contextPath = context .getPath ();
88- if (isNotEmpty (contextPath ) && contextPath .charAt (0 ) == '/' )
89+ if (isNonEmpty (contextPath ) && contextPath .charAt (0 ) == '/' )
8990 scheme = null ;
9091
9192 if (scheme == null ) {
@@ -280,7 +281,7 @@ private void parseAuthority() {
280281 throw new IllegalArgumentException ("Invalid port number :" + port );
281282
282283 // see RFC2396 5.2.4: ignore context path if authority is defined
283- if (isNotEmpty (authority ))
284+ if (isNonEmpty (authority ))
284285 path = "" ;
285286 }
286287 }
@@ -294,7 +295,7 @@ private void computeRegularPath() {
294295 if (urlWithoutQuery .charAt (start ) == '/' )
295296 path = urlWithoutQuery .substring (start , end );
296297
297- else if (isNotEmpty (path ))
298+ else if (isNonEmpty (path ))
298299 handleRelativePath ();
299300
300301 else {
@@ -336,8 +337,4 @@ public void parse(Uri context, final String originalUrl) {
336337 parseAuthority ();
337338 computePath (queryOnly );
338339 }
339-
340- private static boolean isNotEmpty (String string ) {
341- return string != null && string .length () > 0 ;
342- }
343340}
You can’t perform that action at this time.
0 commit comments