You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2006/04/24 09:50:41 UTC
svn commit: r396473 -
/geronimo/branches/1.1/modules/upgrade/src/java/org/apache/geronimo/upgrade/Upgrade1_0To1_1.java
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) {