You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ha...@apache.org on 2011/11/17 08:18:43 UTC
svn commit: r1203087 - in
/geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core:
GeronimoServerBehaviourDelegate.java ModuleArtifactMapper.java
Author: hanhongfang
Date: Thu Nov 17 07:18:43 2011
New Revision: 1203087
URL: http://svn.apache.org/viewvc?rev=1203087&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.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java
Modified: geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java?rev=1203087&r1=1203086&r2=1203087&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoServerBehaviourDelegate.java Thu Nov 17 07:18:43 2011
@@ -668,7 +668,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.1/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.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java?rev=1203087&r1=1203086&r2=1203087&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java (original)
+++ geronimo/devtools/eclipse-plugin/branches/2.1/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/ModuleArtifactMapper.java Thu Nov 17 07:18:43 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,19 @@ 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) {
- 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;
}