summaryrefslogtreecommitdiff
path: root/external/ikvm/openjdk/java/util/ResourceBundle.java
diff options
context:
space:
mode:
Diffstat (limited to 'external/ikvm/openjdk/java/util/ResourceBundle.java')
-rw-r--r--external/ikvm/openjdk/java/util/ResourceBundle.java29
1 files changed, 15 insertions, 14 deletions
diff --git a/external/ikvm/openjdk/java/util/ResourceBundle.java b/external/ikvm/openjdk/java/util/ResourceBundle.java
index b572875ec8..98ee3c5195 100644
--- a/external/ikvm/openjdk/java/util/ResourceBundle.java
+++ b/external/ikvm/openjdk/java/util/ResourceBundle.java
@@ -55,6 +55,8 @@ import java.security.PrivilegedExceptionAction;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.jar.JarEntry;
+
+import sun.reflect.CallerSensitive;
import sun.reflect.Reflection;
import sun.util.locale.BaseLocale;
import sun.util.locale.LocaleObjectCache;
@@ -412,11 +414,10 @@ public abstract class ResourceBundle {
/*
* Automatic determination of the ClassLoader to be used to load
- * resources on behalf of the client. N.B. The client is getLoader's
- * caller's caller.
+ * resources on behalf of the client.
*/
- private static ClassLoader getLoader(Class c) {
- ClassLoader cl = (c == null) ? null : c.getClassLoader();
+ private static ClassLoader getLoader(Class<?> caller) {
+ ClassLoader cl = caller == null ? null : caller.getClassLoader();
if (cl == null) {
// When the caller's loader is the boot class loader, cl is null
// here. In that case, ClassLoader.getSystemClassLoader() may
@@ -714,12 +715,12 @@ public abstract class ResourceBundle {
* if no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and the default locale
*/
- @ikvm.internal.HasCallerID
+ @CallerSensitive
public static final ResourceBundle getBundle(String baseName)
{
return getBundleImpl(baseName, Locale.getDefault(),
/* must determine loader here, else we break stack invariant */
- getLoader(Reflection.getCallerClass(2)),
+ getLoader(Reflection.getCallerClass()),
Control.INSTANCE);
}
@@ -757,12 +758,12 @@ public abstract class ResourceBundle {
* needed.
* @since 1.6
*/
- @ikvm.internal.HasCallerID
+ @CallerSensitive
public static final ResourceBundle getBundle(String baseName,
Control control) {
return getBundleImpl(baseName, Locale.getDefault(),
/* must determine loader here, else we break stack invariant */
- getLoader(Reflection.getCallerClass(2)),
+ getLoader(Reflection.getCallerClass()),
control);
}
@@ -787,13 +788,13 @@ public abstract class ResourceBundle {
* if no resource bundle for the specified base name can be found
* @return a resource bundle for the given base name and locale
*/
- @ikvm.internal.HasCallerID
+ @CallerSensitive
public static final ResourceBundle getBundle(String baseName,
Locale locale)
{
return getBundleImpl(baseName, locale,
/* must determine loader here, else we break stack invariant */
- getLoader(Reflection.getCallerClass(2)),
+ getLoader(Reflection.getCallerClass()),
Control.INSTANCE);
}
@@ -834,12 +835,12 @@ public abstract class ResourceBundle {
* needed.
* @since 1.6
*/
- @ikvm.internal.HasCallerID
+ @CallerSensitive
public static final ResourceBundle getBundle(String baseName, Locale targetLocale,
Control control) {
return getBundleImpl(baseName, targetLocale,
/* must determine loader here, else we break stack invariant */
- getLoader(Reflection.getCallerClass(2)),
+ getLoader(Reflection.getCallerClass()),
control);
}
@@ -1675,9 +1676,9 @@ public abstract class ResourceBundle {
* @since 1.6
* @see ResourceBundle.Control#getTimeToLive(String,Locale)
*/
- @ikvm.internal.HasCallerID
+ @CallerSensitive
public static final void clearCache() {
- clearCache(getLoader(Reflection.getCallerClass(2)));
+ clearCache(getLoader(Reflection.getCallerClass()));
}
/**