rmaucher commented on a change in pull request #418:
URL: https://github.com/apache/tomcat/pull/418#discussion_r630155632



##########
File path: java/org/apache/catalina/servlets/DefaultServlet.java
##########
@@ -335,8 +344,15 @@ public void init() throws ServletException {
             }
         }
 
-        if (getServletConfig().getInitParameter("useBomIfPresent") != null) {
-            useBomIfPresent = 
Boolean.parseBoolean(getServletConfig().getInitParameter("useBomIfPresent"));
+        final String useBomIfPresentConfig = 
getServletConfig().getInitParameter("useBomIfPresent");
+        if (useBomIfPresentConfig != null) {
+            if (!Arrays.asList("true", "false", 
"pass-through").contains(useBomIfPresentConfig)) {

Review comment:
       Good point on the compatibility, but the field is private right now in 
DefaultServlet, so it's ok to change to another type. The init-param config 
remains compatible.




-- 
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to