geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yunfen...@apache.org
Subject svn commit: r682569 - /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/MarshallerListener.java
Date Tue, 05 Aug 2008 03:00:42 GMT
Author: yunfengma
Date: Mon Aug  4 20:00:42 2008
New Revision: 682569

URL: http://svn.apache.org/viewvc?rev=682569&view=rev
Log:
GERONIMODEVTOOLS-457 Empty Web Container setting causes 'xml problem for web app' during deployment

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

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/MarshallerListener.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/MarshallerListener.java?rev=682569&r1=682568&r2=682569&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/MarshallerListener.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/jaxb/MarshallerListener.java
Mon Aug  4 20:00:42 2008
@@ -31,31 +31,31 @@
 			Security security = (Security)source;
 			if (security.getRoleMappings() != null && security.getRoleMappings().getRole().size()
== 0) {
 				security.setRoleMappings(null);
-			}
+            } 
 		} else if (source instanceof WebApp) {
-			WebApp webapp = (WebApp)source;
-			GbeanLocator gbeanlocator = webapp.getWebContainer();
-			if (isEmpty(gbeanlocator.getGbeanLink()) && isEmpty(gbeanlocator.getPattern()))
{
-				webapp.setWebContainer(null);
-			}
-		}
+            WebApp webapp = (WebApp)source;
+            GbeanLocator gbeanlocator = webapp.getWebContainer();
+            if (isEmpty(gbeanlocator.getGbeanLink()) && isEmpty(gbeanlocator.getPattern()))
{
+                webapp.setWebContainer(null);
+            }
+        }
 	}
-	
+		
 	private boolean isEmpty(Pattern pattern) {
 		if ( pattern == null ) {
 			return true;
 		}
-		if ( ( pattern.getGroupId() == null || pattern.getGroupId().trim().equals("") ) &&
-			 ( pattern.getArtifactId() == null || pattern.getArtifactId().trim().equals("") ) &&
-			 ( pattern.getModule() == null || pattern.getModule().trim().equals("") ) &&
-			 ( pattern.getName() == null || pattern.getName().trim().equals("") ) &&
-			 ( pattern.getVersion() == null || pattern.getVersion().trim().equals("") ) ) {
+		if ( isEmpty(pattern.getGroupId()) && isEmpty(pattern.getArtifactId()) &&
+				isEmpty(pattern.getModule()) && isEmpty(pattern.getName()) &&
+				isEmpty(pattern.getVersion()) ) {
 			return true;
 		}
 		return false;
 	}
 	
 	private boolean isEmpty(String value) {
+		
 		return (value == null || value.trim().equals(""));
 	}
+
 }



Mime
View raw message