Sat, 29 Aug 2020 17:28:24 +0200
fixes exception if integer parameter does not type check
src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java | file | annotate | diff | comparison | revisions |
--- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sat Aug 29 17:13:09 2020 +0200 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sat Aug 29 17:28:24 2020 +0200 @@ -324,7 +324,8 @@ final Constructor<T> ctor = clazz.getConstructor(String.class); return Optional.of(ctor.newInstance(paramValue)); } catch (ReflectiveOperationException e) { - throw new RuntimeException(e); + // does not type check and is not convertible - treat as if the parameter was never set + return Optional.empty(); } } }