More fixing of builds: toJson should be made accessible
@@ -218,7 +218,9 @@ private JsonElement convertObject(Object toConvert, int maxDepth) throws Excepti
private Method getMethod(Object toConvert, String methodName) {
try {
- return toConvert.getClass().getMethod(methodName);
+ Method method = toConvert.getClass().getMethod(methodName);
+ method.setAccessible(true);
+ return method;
} catch (NoSuchMethodException | SecurityException e) {
// fall through
}
