Joe, Can we remove the extra e.printStackTrace() calls as the full exception will be logged?
Jarek On Wed, Feb 27, 2008 at 5:34 PM, <[EMAIL PROTECTED]> wrote: > 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; > } > > /** > > >
