private static void initializePropertiesIfNeeded ( ) { if ( translationResources != null ) { return ; } String lastException = "" ; try { translationResources = new Properties ( ) ; ClassLoader classLoader = ClassLoader . getSystemClassLoader ( ) ; translationResources . load ( classLoader . getResourceAsStream ( propertiesFileName ) ) ; } catch ( Exception exception ) { lastException = exception . toString ( ) + "\n----\n" + exception . getMessage ( ) ; } if ( translationResources == null ) { throw new RuntimeException ( "TranslationSource.initializePropertiesIfNeeded()" + "Could not load TranslationResources.properties file.\n" + "The exception follows:\n" + lastException ) ; } }
initializePropertiesIfNeeded If needed this will initialize the translation properties . If the translation properties have already been initialized then this will do nothing .