com.sap.it.commons.nls.NlsResourceBundleImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-core Show documentation
Show all versions of odata-core Show documentation
SAP Cloud Platform SDK for service development
The newest version!
package com.sap.it.commons.nls;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.MissingResourceException;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;
import com.sap.it.commons.tools.StringTools;
class NlsResourceBundleImpl implements NlsResourceBundle {
private final ResourceBundle messages;
private NlsResourceBundleImpl(ResourceBundle messages) {
this.messages = messages;
}
static NlsResourceBundleImpl createAndInitialize(final String baseName, final Class> hostClass) {
NlsResourceBundleImpl lret = null;
if (System.getSecurityManager() == null) {
ResourceBundle messages;
messages = load(baseName, hostClass);
lret = new NlsResourceBundleImpl(messages);
} else {
lret = (NlsResourceBundleImpl) AccessController.doPrivileged(new PrivilegedAction
© 2015 - 2025 Weber Informatics LLC | Privacy Policy