todmorrison commented on a change in pull request #6629:
URL: https://github.com/apache/geode/pull/6629#discussion_r657308067
##########
File path:
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/util/JsonWriter.java
##########
@@ -216,7 +216,8 @@ public static void writeArrayAsJson(JsonGenerator
generator, Object value, Strin
writeObjectArrayAsJson(generator, (Object[]) value, pdxField);
} else {
throw new IllegalStateException(
- "PdxInstance returns unknwon pdxfield " + pdxField + " for type " +
value);
+ "PdxInstance returns unsupported type " + value.getClass()
Review comment:
I am okay with just saying "for field null" if the field doesn't have a
name. I've changed the message to:
` "The pdx field " + pf + " is an array whose type " +
value.getClass()
+ " can not be converted to JSON.");
`
Does that work?
As for the last "else if" on line 215, I agree it could be improved
(similarly GEODE-9392 suggests there may be room to improve
PdxToJSON.writeValue as well), but I'm trying to limit the scope here to making
the existing messages more useful.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]