geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tki...@apache.org
Subject svn commit: r1069071 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Date Wed, 09 Feb 2011 20:26:21 GMT
Author: tkirby
Date: Wed Feb  9 20:26:21 2011
New Revision: 1069071

URL: http://svn.apache.org/viewvc?rev=1069071&view=rev
Log:
GERONIMODEVTOOLS-704 fix NPE when defining new server where existingParms is null...

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java?rev=1069071&r1=1069070&r2=1069071&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.core/src/main/java/org/apache/geronimo/st/v30/core/GeronimoServerBehaviourDelegate.java
Wed Feb  9 20:26:21 2011
@@ -160,10 +160,15 @@ abstract public class GeronimoServerBeha
      * @return
      */
     private String getServerProgramArgs(String existingProgArgs, GeronimoServerDelegate serverDelegate)
{
-        List<String> parms = new ArrayList<String>(Arrays.asList(existingProgArgs.split("\\s+")));
         Set<String> parmsSet = serverDelegate.getProgramArgs();
         Set<String> parmsNotSet = serverDelegate.getProgramArgsNotSet();
         Set<String> parmsSeen = new HashSet<String>(parmsSet.size());
+        List<String> parms;
+        if (existingProgArgs == null) {
+            parms = new ArrayList<String>(parmsSet.size());
+        } else {
+            parms = new ArrayList<String>(Arrays.asList(existingProgArgs.split("\\s+")));
+        }
         // remove notSet and duplicate set paramaters from the list
         for(ListIterator<String> iterator = parms.listIterator(); iterator.hasNext();)
{
             String parm = iterator.next();



Mime
View raw message