cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1179686 - /cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
Date Thu, 06 Oct 2011 16:14:52 GMT
Author: dkulp
Date: Thu Oct  6 16:14:51 2011
New Revision: 1179686

URL: http://svn.apache.org/viewvc?rev=1179686&view=rev
Log:
Avoid potential NPE if optional attributes aren't specified

Modified:
    cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java

Modified: cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java?rev=1179686&r1=1179685&r2=1179686&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
(original)
+++ cxf/trunk/rt/transports/http-jetty/src/main/java/org/apache/cxf/transport/http_jetty/spring/JettyHTTPServerEngineBeanDefinitionParser.java
Thu Oct  6 16:14:51 2011
@@ -137,8 +137,12 @@ public class JettyHTTPServerEngineBeanDe
     private static ThreadingParameters toThreadingParameters(
                                     ThreadingParametersType paramtype) {
         ThreadingParameters params = new ThreadingParameters();
-        params.setMaxThreads(paramtype.getMaxThreads());
-        params.setMinThreads(paramtype.getMinThreads());
+        if (paramtype.getMaxThreads() != null) {
+            params.setMaxThreads(paramtype.getMaxThreads());
+        }
+        if (paramtype.getMinThreads() != null) {
+            params.setMinThreads(paramtype.getMinThreads());
+        }
         return params;
     }
     



Mime
View raw message