Author: markt Date: Wed Jun 28 20:05:37 2017 New Revision: 1800202 URL: http://svn.apache.org/viewvc?rev=1800202&view=rev Log: Refactor. It is more verbose but it stops Eclipse complaining about a possible NPE.
Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java Modified: tomcat/trunk/java/org/apache/juli/FileHandler.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/juli/FileHandler.java?rev=1800202&r1=1800201&r2=1800202&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/juli/FileHandler.java (original) +++ tomcat/trunk/java/org/apache/juli/FileHandler.java Wed Jun 28 20:05:37 2017 @@ -106,9 +106,13 @@ public class FileHandler extends Handler { SecurityManager s = System.getSecurityManager(); - this.isSecurityEnabled = s != null; - this.group = isSecurityEnabled ? s.getThreadGroup() - : Thread.currentThread().getThreadGroup(); + if (s == null) { + this.isSecurityEnabled = false; + this.group = Thread.currentThread().getThreadGroup(); + } else { + this.isSecurityEnabled = true; + this.group = s.getThreadGroup(); + } } @Override --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org