提交 eef677ab 编写于 作者: A Alanscut

fix for issue #582

上级 588d61e9
......@@ -153,7 +153,8 @@ public abstract class AbstractJsonProvider implements JsonProvider {
} else if(obj instanceof String){
return ((String)obj).length();
}
throw new JsonPathException("length operation cannot be applied to " + obj!=null?obj.getClass().getName():"null");
throw new JsonPathException("length operation cannot be applied to " + (obj != null ? obj.getClass().getName()
: "null"));
}
/**
......
......@@ -246,9 +246,8 @@ public class GsonJsonProvider extends AbstractJsonProvider {
}
}
}
throw new JsonPathException("length operation can not applied to " + obj != null ? obj.getClass().getName()
: "null");
throw new JsonPathException("length operation can not applied to " + (obj != null ? obj.getClass().getName()
: "null"));
}
@Override
......
......@@ -211,7 +211,8 @@ public class JacksonJsonNodeJsonProvider extends AbstractJsonProvider {
return element.size();
}
}
throw new JsonPathException("length operation can not applied to " + obj != null ? obj.getClass().getName() : "null");
throw new JsonPathException("length operation can not applied to " + (obj != null ? obj.getClass().getName()
: "null"));
}
@Override
......
......@@ -170,7 +170,8 @@ public class JsonOrgJsonProvider extends AbstractJsonProvider {
return ((String) obj).length();
}
}
throw new JsonPathException("length operation can not applied to " + obj != null ? obj.getClass().getName() : "null");
throw new JsonPathException("length operation can not applied to " + (obj != null ? obj.getClass().getName()
: "null"));
}
@Override
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册