[OLINGO-350] Minor code clean up
This commit is contained in:
parent
412a9901f7
commit
a1621331c1
|
@ -35,9 +35,11 @@ import org.slf4j.LoggerFactory;
|
|||
public abstract class ODataTranslatedException extends ODataException {
|
||||
|
||||
private static final long serialVersionUID = -1210541002198287561L;
|
||||
private static final Logger log = LoggerFactory.getLogger(ODataTranslatedException.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ODataTranslatedException.class);
|
||||
private static final Locale DEFAULT_LOCALE = Locale.ENGLISH;
|
||||
|
||||
protected static final String DEFAULT_SERVER_BUNDLE_NAME = "server-core-exceptions-i18n";
|
||||
|
||||
public static interface MessageKey {
|
||||
public String getKey();
|
||||
}
|
||||
|
@ -96,7 +98,7 @@ public abstract class ODataTranslatedException extends ODataException {
|
|||
try {
|
||||
return ResourceBundle.getBundle(getBundleName(), locale == null ? DEFAULT_LOCALE : locale);
|
||||
} catch (final MissingResourceException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
LOG.error(e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,6 @@ public class ODataSerializerException extends ODataTranslatedException {
|
|||
|
||||
@Override
|
||||
protected String getBundleName() {
|
||||
return "server-core-exceptions-i18n";
|
||||
return DEFAULT_SERVER_BUNDLE_NAME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,6 @@ public class ContentNegotiatorException extends ODataTranslatedException {
|
|||
|
||||
@Override
|
||||
protected String getBundleName() {
|
||||
return "server-core-exceptions-i18n";
|
||||
return DEFAULT_SERVER_BUNDLE_NAME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,6 @@ public class ODataHandlerException extends ODataTranslatedException {
|
|||
|
||||
@Override
|
||||
protected String getBundleName() {
|
||||
return "server-core-exceptions-i18n";
|
||||
return DEFAULT_SERVER_BUNDLE_NAME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,6 @@ abstract public class UriParserException extends ODataTranslatedException {
|
|||
|
||||
@Override
|
||||
protected String getBundleName() {
|
||||
return "server-core-exceptions-i18n";
|
||||
return DEFAULT_SERVER_BUNDLE_NAME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,6 +69,6 @@ public class UriValidationException extends ODataTranslatedException {
|
|||
|
||||
@Override
|
||||
protected String getBundleName() {
|
||||
return "server-core-exceptions-i18n";
|
||||
return DEFAULT_SERVER_BUNDLE_NAME;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue