Fix 2 TODO items:
[jvcard.git] / src / be / nikiroo / jvcard / resources / FixedResourceBundleControl.java
index ca3114e4ccf6014ab7a6e7d83e3f304839a8a4f6..25832a2f7a9c3092ef805eb928d95bc0ae6d2fa2 100644 (file)
@@ -35,6 +35,7 @@ class FixedResourceBundleControl extends Control {
                this.outsideWorld = outsideWorld;
        }
 
+       @Override
        public ResourceBundle newBundle(String baseName, Locale locale,
                        String format, ClassLoader loader, boolean reload)
                        throws IllegalAccessException, InstantiationException, IOException {
@@ -56,9 +57,8 @@ class FixedResourceBundleControl extends Control {
                } else {
                        // New code to support outside resources:
                        if (outsideWorld != null) {
-                               String pkg = this.getClass().getPackage().getName()
-                                               .replaceAll("\\.", File.separator)
-                                               + File.separator;
+                               String pkg = this.getClass().getPackage().getName();
+                               pkg = pkg.replaceAll("\\.", File.separator) + File.separator;
 
                                if (resourceName.startsWith(pkg)) {
                                        try {