]> git.mxchange.org Git - jcore.git/commitdiff
bundle is now static as only one instance is enough + initBundle() added
authorRoland Haeder <roland@mxchange.org>
Thu, 6 Aug 2015 09:11:37 +0000 (11:11 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 6 Aug 2015 09:11:37 +0000 (11:11 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/BaseFrameworkSystem.java

index 606361149e3378da8c176474d5a18898e7a905f5..bbaf0a4b2a87f6987c5db48f56812374e77c428d 100644 (file)
@@ -61,7 +61,7 @@ public class BaseFrameworkSystem implements FrameworkInterface {
        /**
         * Bundle instance
         */
-       private final ResourceBundle bundle;
+       private static ResourceBundle bundle;
 
        /**
         * Client instance
@@ -88,7 +88,6 @@ public class BaseFrameworkSystem implements FrameworkInterface {
         */
        {
                LOG = LogManager.getLogger(this);
-               bundle = ResourceBundle.getBundle(FrameworkInterface.I18N_BUNDLE_FILE); // NOI18N
        }
 
        /**
@@ -99,6 +98,20 @@ public class BaseFrameworkSystem implements FrameworkInterface {
                this.initProperties();
        }
 
+       /**
+        * Initializes i18n bundles
+        */
+       protected void initBundle () {
+               // Is the bundle set?
+               if (bundle instanceof ResourceBundle) {
+                       // Is already set
+                       throw new IllegalStateException("called twice");
+               }
+
+               // Set instance
+               bundle = ResourceBundle.getBundle(FrameworkInterface.I18N_BUNDLE_FILE); // NOI18N
+       }
+
        /**
         * Application instance
         *