You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2017/06/28 20:05:38 UTC
svn commit: r1800202 - /tomcat/trunk/java/org/apache/juli/FileHandler.java
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org