Skip to content

Commit e17f8d9

Browse files
committed
Drop duplicate
1 parent b729e01 commit e17f8d9

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

client/src/main/java/org/asynchttpclient/uri/UriParser.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package org.asynchttpclient.uri;
1414

1515
import static org.asynchttpclient.util.Assertions.*;
16+
import static org.asynchttpclient.util.MiscUtils.*;
1617

1718
final 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
}

0 commit comments

Comments
 (0)