servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r680273 - /servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
Date Mon, 28 Jul 2008 07:35:42 GMT
Author: gnodet
Date: Mon Jul 28 00:35:41 2008
New Revision: 680273

URL: http://svn.apache.org/viewvc?rev=680273&view=rev
Log:
Avoid exceptions when trying to convert to a maven URL

Modified:
    servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java

Modified: servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java?rev=680273&r1=680272&r2=680273&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
(original)
+++ servicemix/smx4/kernel/trunk/main/src/main/java/org/apache/servicemix/kernel/main/Main.java
Mon Jul 28 00:35:41 2008
@@ -514,14 +514,14 @@
         String[] parts = location.split("\\|");
         if (convertToMavenUrls) {
             String[] p = parts[1].split("/");
-            String groupId = null;
-            String artifactId = p[p.length-3];
-            String version = p[p.length-2];
-            String classifier;
-            String type;
-            String artifactIdVersion = artifactId + "-" + version;
-            StringBuffer sb = new StringBuffer();
-            if (p.length >= 4 && p[p.length-1].startsWith(artifactIdVersion))
{
+            if (p.length >= 4 && p[p.length-1].startsWith(p[p.length-3] + "-"
+ p[p.length-2])) {
+                String groupId = null;
+                String artifactId = p[p.length-3];
+                String version = p[p.length-2];
+                String classifier;
+                String type;
+                String artifactIdVersion = artifactId + "-" + version;
+                StringBuffer sb = new StringBuffer();
                 if (p[p.length-1].charAt(artifactIdVersion.length()) == '-') {
                     classifier = p[p.length-1].substring(artifactIdVersion.length() + 1,
p[p.length-1].lastIndexOf('.'));
                 } else {



Mime
View raw message