Browse Source

merge if statement

pull/584/head
Alanscut 5 years ago
parent
commit
89abebfeb0
  1. 5
      json-path/src/main/java/com/jayway/jsonpath/internal/Utils.java

5
json-path/src/main/java/com/jayway/jsonpath/internal/Utils.java

@ -379,10 +379,7 @@ public final class Utils {
* @throws IllegalArgumentException if the character sequence is empty
*/
public static <T extends CharSequence> T notEmpty(T chars, String message, Object... values) {
if (chars == null) {
throw new IllegalArgumentException(String.format(message, values));
}
if (chars.length() == 0) {
if (chars == null || chars.length() == 0) {
throw new IllegalArgumentException(String.format(message, values));
}
return chars;

Loading…
Cancel
Save