tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1366910 - /tomcat/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java
Date Sun, 29 Jul 2012 19:26:41 GMT
Author: markt
Date: Sun Jul 29 19:26:41 2012
New Revision: 1366910

URL: http://svn.apache.org/viewvc?rev=1366910&view=rev
Log:
FindBugs: Fix potential NPE

Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java?rev=1366910&r1=1366909&r2=1366910&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java Sun Jul 29 19:26:41
2012
@@ -104,7 +104,12 @@ public final class ReplicationStream ext
     protected Class<?> resolveProxyClass(String[] interfaces)
             throws IOException, ClassNotFoundException {
 
-        ClassLoader latestLoader = (classLoaders!=null && classLoaders.length==0)?null:classLoaders[0];
+        ClassLoader latestLoader;
+        if (classLoaders != null && classLoaders.length > 0) {
+            latestLoader = classLoaders[0];
+        } else {
+            latestLoader = null;
+        }
         ClassLoader nonPublicLoader = null;
         boolean hasNonPublicInterface = false;
 



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


Mime
View raw message