geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hanhongf...@apache.org
Subject svn commit: r1203090 - in /geronimo/devtools/eclipse-plugin/branches/2.2/plugins: org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/ org.apache.geronimo....
Date Thu, 17 Nov 2011 07:50:30 GMT
Author: hanhongfang
Date: Thu Nov 17 07:50:29 2011
New Revision: 1203090

URL: http://svn.apache.org/viewvc?rev=1203090&view=rev
Log:
GERONIMODEVTOOLS-774 java.lang.NullPointerException error happened for web application automatically
redeploying after renamed the name of the project. Thanks Yi Xiao for the patch.

Modified:
    geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
    geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServerBehaviourDelegate.java
    geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/ModuleArtifactMapper.java
    geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviourDelegate.java

Modified: geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java?rev=1203090&r1=1203089&r2=1203090&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
Thu Nov 17 07:50:29 2011
@@ -73,7 +73,7 @@ public class ModuleArtifactMapper {
 		artifactEntries.put(project.getName(), configId);
 	}
 
-	public void removeEntry(IServer server, IProject project) {
+	public void removeEntry(IServer server, IModule module) {
 
 		if (!SocketUtil.isLocalhost(server.getHost()))
 			return;
@@ -81,14 +81,18 @@ public class ModuleArtifactMapper {
 		File runtimeLoc = server.getRuntime().getLocation().toFile();
 		Map artifactEntries = (Map) serverEntries.get(runtimeLoc);
 		if (artifactEntries != null) {
-			artifactEntries.remove(project.getName());
+			artifactEntries.remove(module.getName());
 		}
 	}
 
 	public String resolve(IServer server, IModule module) {
 		Map artifactEntries = (Map) serverEntries.get(server.getRuntime().getLocation().toFile());
-		if (artifactEntries != null && module != null && module.getProject() !=
null) {
-			return (String) artifactEntries.get(module.getProject().getName());
+		if (artifactEntries != null && module != null) {
+		    if(module.getProject() != null) {
+		        return (String) artifactEntries.get(module.getProject().getName());
+		    } else {
+		        return (String) artifactEntries.get(module.getName());
+		    }
 		}
 		return null;
 	}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServerBehaviourDelegate.java?rev=1203090&r1=1203089&r2=1203090&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/GeronimoServerBehaviourDelegate.java
Thu Nov 17 07:50:29 2011
@@ -670,7 +670,7 @@ abstract public class GeronimoServerBeha
 			doFail(status, Messages.UNDEPLOY_FAIL);
 		}
 		
-		ModuleArtifactMapper.getInstance().removeEntry(getServer(), module.getProject());
+		ModuleArtifactMapper.getInstance().removeEntry(getServer(), module);
 
         Trace.tracePoint("Exit ", "GeronimoServerBehaviourDelegate.doRemoved");
 	}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/ModuleArtifactMapper.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/ModuleArtifactMapper.java?rev=1203090&r1=1203089&r2=1203090&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/ModuleArtifactMapper.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v11.core/src/main/java/org/apache/geronimo/st/v11/core/ModuleArtifactMapper.java
Thu Nov 17 07:50:29 2011
@@ -73,7 +73,7 @@ public class ModuleArtifactMapper {
 		artifactEntries.put(project.getName(), configId);
 	}
 
-	public void removeEntry(IServer server, IProject project) {
+	public void removeEntry(IServer server, IModule module) {
 
 		if (!SocketUtil.isLocalhost(server.getHost()))
 			return;
@@ -81,14 +81,18 @@ public class ModuleArtifactMapper {
 		File runtimeLoc = server.getRuntime().getLocation().toFile();
 		Map artifactEntries = (Map) serverEntries.get(runtimeLoc);
 		if (artifactEntries != null) {
-			artifactEntries.remove(project.getName());
+			artifactEntries.remove(module.getName());
 		}
 	}
 
 	public String resolve(IServer server, IModule module) {
 		Map artifactEntries = (Map) serverEntries.get(server.getRuntime().getLocation().toFile());
-		if (artifactEntries != null && module != null && module.getProject() !=
null) {
-			return (String) artifactEntries.get(module.getProject().getName());
+		if (artifactEntries != null && module != null) {
+		    if(module.getProject() != null) {
+		        return (String) artifactEntries.get(module.getProject().getName());
+		    } else {
+		        return (String) artifactEntries.get(module.getName());
+		    }
 		}
 		return null;
 	}

Modified: geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviourDelegate.java?rev=1203090&r1=1203089&r2=1203090&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviourDelegate.java
(original)
+++ geronimo/devtools/eclipse-plugin/branches/2.2/plugins/org.apache.geronimo.st.v21.core/src/main/java/org/apache/geronimo/st/v21/core/GeronimoServerBehaviourDelegate.java
Thu Nov 17 07:50:29 2011
@@ -671,7 +671,7 @@ abstract public class GeronimoServerBeha
 			doFail(status, Messages.UNDEPLOY_FAIL);
 		}
 		
-		ModuleArtifactMapper.getInstance().removeEntry(getServer(), module.getProject());
+		ModuleArtifactMapper.getInstance().removeEntry(getServer(), module);
 
         Trace.tracePoint("Exit ", "GeronimoServerBehaviourDelegate.doRemoved");
 	}



Mime
View raw message