james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1079296 - /james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
Date Tue, 08 Mar 2011 08:36:41 GMT
Author: norman
Date: Tue Mar  8 08:36:41 2011
New Revision: 1079296

URL: http://svn.apache.org/viewvc?rev=1079296&view=rev
Log:
Check for null value to prevent NPE

Modified:
    james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java

Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java?rev=1079296&r1=1079295&r2=1079296&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
(original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/AbstractSSLAwareChannelPipelineFactory.java
Tue Mar  8 08:36:41 2011
@@ -46,9 +46,11 @@ public abstract class AbstractSSLAwareCh
         
         // We need to copy the String array becuase of possible security issues.
         // See https://issues.apache.org/jira/browse/PROTOCOLS-18
-        this.enabledCipherSuites = new String[enabledCipherSuites.length];
-        for (int i = 0; i < enabledCipherSuites.length; i++) {
-            this.enabledCipherSuites[i] = new String(enabledCipherSuites[i]);
+        if (enabledCipherSuites != null) {
+            this.enabledCipherSuites = new String[enabledCipherSuites.length];
+            for (int i = 0; i < enabledCipherSuites.length; i++) {
+                this.enabledCipherSuites[i] = new String(enabledCipherSuites[i]);
+            }
         }
     }
 



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


Mime
View raw message