Skip to content

Commit

Permalink
Fix #24115 Reason phrase is not printed in the validation error message
Browse files Browse the repository at this point in the history
Signed-off-by: kaido207 <kaido.hiroki@fujitsu.com>
  • Loading branch information
kaido207 committed Sep 26, 2022
1 parent 04a44a1 commit e036ab5
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,22 +113,12 @@ public String interpolate(String message, Context context, Locale locale) {
// if the message is not already in the cache we have to run step 1-3 of the message resolution
if (resolvedMessage == null) {
ResourceBundle userResourceBundle = new ContextResourceBundle(context, locale);
ClassLoader cl;
if (System.getSecurityManager()!=null) {
cl = AccessController.doPrivileged(new PrivilegedAction<ClassLoader>() {
@Override
public ClassLoader run() {
return MessageInterpolator.class.getClassLoader();
}
});
} else {
cl = MessageInterpolator.class.getClassLoader();
}
ClassLoader classLoader = MessageInterpolatorImpl.class.getClassLoader();
ResourceBundle defaultResourceBundle = null;
try {
defaultResourceBundle = ResourceBundle.getBundle(DEFAULT_VALIDATION_MESSAGES,
locale,
cl);
classLoader);
}
catch (MissingResourceException mre) {
// defaultResourceBundle is already null
Expand Down

0 comments on commit e036ab5

Please sign in to comment.