geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From de...@apache.org
Subject svn commit: r812833 - /geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
Date Wed, 09 Sep 2009 08:48:42 GMT
Author: delos
Date: Wed Sep  9 08:48:42 2009
New Revision: 812833

URL: http://svn.apache.org/viewvc?rev=812833&view=rev
Log:
GERONIMODEVTOOLS-361 Avoid NullPointer exception when using module version

Modified:
    geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java

Modified: geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java?rev=812833&r1=812832&r2=812833&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1.5/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/internal/DependencyHelper.java
Wed Sep  9 08:48:42 2009
@@ -112,12 +112,20 @@
 	                            parent.setVersion( dep.getVersion() );
 	                            parent.setType( dep.getType() );
 	                           
-	                            String configId = dep.getGroupId().concat("/")
-	              				  .concat(dep.getArtifactId()).concat("/")
-	              				  .concat(dep.getVersion()).concat("/")
-	              				  .concat(dep.getType());
+	                            StringBuilder configId = new StringBuilder();
+	                            if (dep.getGroupId()!=null)
+	                            	configId.append(dep.getGroupId());
+	                            configId.append("/");
+	                            if (dep.getArtifactId()!=null)
+	                            	configId.append(dep.getArtifactId());
+	                            configId.append("/");
+	                            if (dep.getVersion()!=null)
+	                            	configId.append(dep.getVersion());
+	                            configId.append("/");
+	                            if (dep.getType()!=null)
+	                            	configId.append(dep.getType());
               
-					            if (!DeploymentUtils.isInstalledModule(server,configId))
+					            if (!DeploymentUtils.isInstalledModule(server,configId.toString()))
 					                 	dm.addDependency( child, parent );
 	                        }
 	                    }



Mime
View raw message