geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jb...@apache.org
Subject svn commit: r631760 - /geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Date Wed, 27 Feb 2008 22:34:50 GMT
Author: jbohn
Date: Wed Feb 27 14:34:49 2008
New Revision: 631760

URL: http://svn.apache.org/viewvc?rev=631760&view=rev
Log:
GERONIMO-3866 return fabricated meta-data for plugin being exported and avoid NPE

Modified:
    geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java

Modified: geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java?rev=631760&r1=631759&r2=631760&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java
Wed Feb 27 14:34:49 2008
@@ -420,7 +420,19 @@
      *                 The configId must be fully resolved (isResolved() == true)
      */
     public PluginType getPluginMetadata(Artifact moduleId) {
-        return localSourceRepository.extractPluginMetadata(moduleId);
+        PluginType type = localSourceRepository.extractPluginMetadata(moduleId);
+        if (null == type) {
+            try {
+                type = createDefaultMetadata(moduleId);
+            } catch (InvalidConfigException e) {
+                e.printStackTrace();
+                log.warn("Unable to generate metadata for " + moduleId, e);
+            } catch (Exception e) {
+                e.printStackTrace();
+                log.warn("Error generating metadata for " + moduleId, e);
+            }
+        }
+        return type;
     }
 
     /**



Mime
View raw message