geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r396473 - /geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
Date Mon, 24 Apr 2006 07:50:41 GMT
Author: djencks
Date: Mon Apr 24 00:50:40 2006
New Revision: 396473

URL: http://svn.apache.org/viewcvs?rev=396473&view=rev
Log:
another tweak for upgrader

Modified:
    geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java

Modified: geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java?rev=396473&r1=396472&r2=396473&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
(original)
+++ geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
Mon Apr 24 00:50:40 2006
@@ -152,7 +152,7 @@
         Artifact artifact;
         if (cursor.getName().getLocalPart().equals("uri")) {
             String uri = cursor.getTextValue();
-            artifact = Artifact.create(uri);
+            artifact = toArtifact(uri);
         } else {
             checkName(cursor, "groupId");
             String groupId = cursor.getTextValue();
@@ -192,13 +192,17 @@
         QName attrQName = new QName(null, attrName);
         if ((attrValue = cursor.getAttributeText(attrQName)) != null) {
             cursor.removeAttribute(attrQName);
-            try {
-                return Artifact.create(attrValue);
-            } catch (Exception e) {
-                return new Artifact(DEFAULT_GROUPID, attrValue.replace('/', '_'), DEFAULT_VERSION,
"car");
-            }
+            return toArtifact(attrValue);
         }
         return null;
+    }
+
+    private static Artifact toArtifact(String attrValue) {
+        try {
+            return Artifact.create(attrValue);
+        } catch (Exception e) {
+            return new Artifact(DEFAULT_GROUPID, attrValue.replace('/', '_'), DEFAULT_VERSION,
"car");
+        }
     }
 
     private static boolean extractSuppressDefaultEnvironment(XmlCursor cursor) {



Mime
View raw message