geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r1327236 - /geronimo/server/branches/3.0-beta/framework/modules/geronimo-shell-diagnose/src/main/java/org/apache/geronimo/shell/diagnose/PackageUsesHelper.java
Date Tue, 17 Apr 2012 19:27:18 GMT
Author: gawor
Date: Tue Apr 17 19:27:18 2012
New Revision: 1327236

URL: http://svn.apache.org/viewvc?rev=1327236&view=rev
Log:
GERONIMO-6328: Diagnose "package uses conflict" caused by split package

Modified:
    geronimo/server/branches/3.0-beta/framework/modules/geronimo-shell-diagnose/src/main/java/org/apache/geronimo/shell/diagnose/PackageUsesHelper.java

Modified: geronimo/server/branches/3.0-beta/framework/modules/geronimo-shell-diagnose/src/main/java/org/apache/geronimo/shell/diagnose/PackageUsesHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/3.0-beta/framework/modules/geronimo-shell-diagnose/src/main/java/org/apache/geronimo/shell/diagnose/PackageUsesHelper.java?rev=1327236&r1=1327235&r2=1327236&view=diff
==============================================================================
--- geronimo/server/branches/3.0-beta/framework/modules/geronimo-shell-diagnose/src/main/java/org/apache/geronimo/shell/diagnose/PackageUsesHelper.java
(original)
+++ geronimo/server/branches/3.0-beta/framework/modules/geronimo-shell-diagnose/src/main/java/org/apache/geronimo/shell/diagnose/PackageUsesHelper.java
Tue Apr 17 19:27:18 2012
@@ -59,6 +59,9 @@ public class PackageUsesHelper {
                 edges.put(importPackage, edge);
             }
         }
+        for (ExportPackageDescription exportPackage : bundle.getExportPackages()) {
+            processExportPackage(graph, exportPackage, null);
+        }
 
         for (Map.Entry<String, Map<PackageNode, ImportPackageSpecification>>
entry : graph.getPackageMap().entrySet()) {
             Map<PackageNode, ImportPackageSpecification> versions = entry.getValue();
@@ -77,9 +80,16 @@ public class PackageUsesHelper {
                 
                 // just display one path to each conflicting package version found
                 for (Map.Entry<PackageNode, ImportPackageSpecification> version : versions.entrySet())
{
-                    PackageEdge edge = edges.get(version.getValue());
-                    PackagePath path = edge.findPathToPackage(version.getKey());
-                    System.out.println(path.toString(level + 1));                    
+                    PackageNode node = version.getKey();
+                    ImportPackageSpecification importPackage = version.getValue();
+                    if (importPackage == null) {
+                        System.out.println(Utils.formatErrorMessage(level + 1, Utils.bundleToString(node.getPackageExporter())
+ " exports " + Utils.exportPackageToString(node.getExportPackage())));                  
         
+                        System.out.println();
+                    } else {
+                        PackageEdge edge = edges.get(importPackage);
+                        PackagePath path = edge.findPathToPackage(node);
+                        System.out.println(path.toString(level + 1));
+                    }
                 }
             }
         }



Mime
View raw message