LocaleUtils.java_dots_ to_underscores_i18n _bundles


I am developing a plugin named like xxx.server.openfire.yyy, following the naming convention of a bigger project and using that as root package name for the plugin's classes.

The resource bundle for internationalization was named like the plugin, but was not found since the file had dots in its name and the classloader would look for it in folders that are not there (and won't get packaged by the ant script if you make them).

The solution was to rename the file with underscores xxx_server_openfire_yyy_i18n.properties and apply this patch.

This should not break any other plugin in the source tree.
It should be documented on the plugin developer guide.




Daryl Herzmann
October 27, 2014, 6:11 PM
Daryl Herzmann
April 30, 2014, 5:43 PM

Moving unfixed 3.9.2 issues to 3.9.3 for consideration.

March 6, 2014, 4:24 PM

Reviewed the patch. It should work fine.

The problem is that java.util.ResourceBundle treats dots as packages/folders:

It generates a path name from the candidate bundle name by replacing all "." characters with "/" and appending the string ".properties".

Daryl Herzmann
February 13, 2014, 9:52 PM

assigning to next release in hopes of a code review.



Dave Cridland


Andrea Ratto