MCPcopy Index your code
hub / github.com/apache/tomcat / message

Method message

java/jakarta/el/Util.java:52–73  ·  view source on GitHub ↗
(ELContext context, String name, Object... props)

Source from the content-addressed store, hash-verified

50
51
52 static String message(ELContext context, String name, Object... props) {
53 Locale locale = null;
54 if (context != null) {
55 locale = context.getLocale();
56 }
57 if (locale == null) {
58 locale = Locale.getDefault();
59 if (locale == null) {
60 return "";
61 }
62 }
63 ResourceBundle bundle = ResourceBundle.getBundle("jakarta.el.LocalStrings", locale);
64 try {
65 String template = bundle.getString(name);
66 if (props != null) {
67 template = MessageFormat.format(template, props);
68 }
69 return template;
70 } catch (MissingResourceException e) {
71 return "Missing Resource: '" + name + "' for Locale " + locale.getDisplayName();
72 }
73 }
74
75 private static final ExpressionFactoryCache factoryCache = new ExpressionFactoryCache();
76

Callers 15

importStaticMethod · 0.95
importClassMethod · 0.95
resolveClassMethod · 0.95
findClassMethod · 0.95
newInstanceMethod · 0.95
getClassNameJreDirMethod · 0.95
setValueMethod · 0.95
setValueMethod · 0.95
setValueMethod · 0.95
findMethodMethod · 0.95
findWrapperMethod · 0.95
findConstructorMethod · 0.95

Calls 4

getLocaleMethod · 0.65
getStringMethod · 0.65
formatMethod · 0.65
getDisplayNameMethod · 0.65

Tested by

no test coverage detected