src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java

changeset 106
9c6ebf67afe9
parent 97
602f75801644
child 109
2e0669e814ff
--- 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();
             }
         }
     }

mercurial