Skip to content
This repository was archived by the owner on May 28, 2018. It is now read-only.

Commit b61b474

Browse files
schlosnapavelbucek
authored andcommitted
Reorder conditions to short-circuit before costly tests
Change-Id: I016898425aad6674f1c6dac2bb507cdd83f963e4
1 parent 4baed18 commit b61b474

File tree

1 file changed

+2
-2
lines changed
  • core-common/src/main/java/org/glassfish/jersey/uri/internal

1 file changed

+2
-2
lines changed

core-common/src/main/java/org/glassfish/jersey/uri/internal/UriParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ private String parseComponent(String delimiters, boolean mayEnd, boolean isIp) {
119119
sb.append(c);
120120

121121
// test IPv6 or regular expressions in the template params
122-
} else if ((delimiters != null && delimiters.indexOf(c) >= 0)
123-
&& (!isIp || squareBracketsCount == 0) && (curlyBracketsCount == 0)) {
122+
} else if ((!isIp || squareBracketsCount == 0) && (curlyBracketsCount == 0)
123+
&& (delimiters != null && delimiters.indexOf(c) >= 0)) {
124124
return sb.length() == 0 ? null : sb.toString();
125125
} else {
126126
sb.append(c);

0 commit comments

Comments
 (0)