[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster-devel] plugin problem



Title: plugin problem

Hi,

I think there is a bug in xmlBlaster(0.91) concering plugins.
When you write a plugin (eg. the example in requirement engine.runlevel.howto) and
your plugin class (class implementing I_Plugin) is not in a package
(I know not a good way of programming), your plugin cannot be loaded by xmlblaster.

You'll get an IndexOutOfBoundsException in
org.xmlBlaster.util.classloader.PluginClassLoader one line 35:

============ org.xmlBlaster.util.classloader.PluginClassLoader ===============

34 this.pluginName = pluginInfo.getClassName();
35 this.pluginPackage = pluginName.substring(0, pluginName.lastIndexOf("."));

============ org.xmlBlaster.util.classloader.PluginClassLoader ===============


If the plugin class is not in a package, pluginName does not contain any "."
So pluginName.lastIndexOf(".") = -1; resulting in the IndexOutOfBoundsException for the substring method.

If a plugin resides in a package there is no problem.

Kind regards,
Nicolas.
- - - - - - - DISCLAIMER - - - - - - - -
Unless indicated otherwise, the information contained in this message is privileged and confidential, and is intended only for the use of the addressee(s) named above and others who have been specifically authorized to receive it. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message and/or attachments is strictly prohibited. The company accepts no liability for any damage caused by any virus transmitted by this email. Furthermore, the company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. If you have received this message in error, please contact the sender and delete the message. Thank you.