Index: /modules/luni/src/main/java/java/util/ResourceBundle.java =================================================================== --- /modules/luni/src/main/java/java/util/ResourceBundle.java (revision 409283) +++ /modules/luni/src/main/java/java/util/ResourceBundle.java (working copy) @@ -32,8 +32,9 @@ * * @see Properties * @see PropertyResourceBundle + * @since 1.1 */ -abstract public class ResourceBundle { +public abstract class ResourceBundle { /** * The parent of this ResourceBundle. @@ -43,7 +44,7 @@ private Locale locale; static class MissingBundle extends ResourceBundle { - public Enumeration getKeys() { + public Enumeration getKeys() { return null; } @@ -52,11 +53,11 @@ } } - private static ResourceBundle MISSING = new MissingBundle(); + private static final ResourceBundle MISSING = new MissingBundle(); - private static ResourceBundle MISSINGBASE = new MissingBundle(); + private static final ResourceBundle MISSINGBASE = new MissingBundle(); - private static WeakHashMap cache = new WeakHashMap(); + private static final WeakHashMap> cache = new WeakHashMap>(); /** * Constructs a new instance of this class. @@ -158,7 +159,7 @@ * * @return an Enumeration of the resource names */ - public abstract Enumeration getKeys(); + public abstract Enumeration getKeys(); /** * Gets the Locale of this ResourceBundle. @@ -232,7 +233,7 @@ cache.put(cacheKey, loaderCache); } } - ResourceBundle result = (ResourceBundle) loaderCache.get(bundleName); + ResourceBundle result = loaderCache.get(bundleName); if (result != null) { if (result == MISSINGBASE) return null; Index: /modules/luni/src/main/java/java/util/PropertyResourceBundle.java =================================================================== --- /modules/luni/src/main/java/java/util/PropertyResourceBundle.java (revision 409283) +++ /modules/luni/src/main/java/java/util/PropertyResourceBundle.java (working copy) @@ -26,9 +26,10 @@ * * @see ResourceBundle * @see Properties + * @since 1.1 */ public class PropertyResourceBundle extends ResourceBundle { - + //TODO Generify when Properties is generified Properties resources; /** @@ -50,15 +51,15 @@ * * @return an Enumeration of the resource names */ - public Enumeration getKeys() { + public Enumeration getKeys() { if (parent == null) return resources.keys(); - return new Enumeration() { - Enumeration local = resources.keys(); + return new Enumeration() { + Enumeration local = resources.keys(); - Enumeration pEnum = parent.getKeys(); + Enumeration pEnum = parent.getKeys(); - Object nextElement = null; + String nextElement; private boolean findNext() { if (nextElement != null) @@ -79,11 +80,11 @@ return findNext(); } - public Object nextElement() { + public String nextElement() { if (local.hasMoreElements()) return local.nextElement(); if (findNext()) { - Object result = nextElement; + String result = nextElement; nextElement = null; return result; } Index: /modules/luni/src/main/java/java/util/ListResourceBundle.java =================================================================== --- /modules/luni/src/main/java/java/util/ListResourceBundle.java (revision 409283) +++ /modules/luni/src/main/java/java/util/ListResourceBundle.java (working copy) @@ -22,9 +22,10 @@ * the list of resources. * * @see ResourceBundle + * @since 1.1 */ public abstract class ListResourceBundle extends ResourceBundle { - + //TODO Generify when Hashtable is generified Hashtable table; /** @@ -41,24 +42,24 @@ * * @return a Object array containing the resources */ - abstract protected Object[][] getContents(); + protected abstract Object[][] getContents(); /** * Answers the names of the resources contained in this ListResourceBundle. * * @return an Enumeration of the resource names */ - public Enumeration getKeys() { + public Enumeration getKeys() { if (table == null) initializeTable(); if (parent == null) return table.keys(); - return new Enumeration() { - Enumeration local = table.keys(); + return new Enumeration() { + Enumeration local = table.keys(); - Enumeration pEnum = parent.getKeys(); + Enumeration pEnum = parent.getKeys(); - Object nextElement = null; + String nextElement = null; private boolean findNext() { if (nextElement != null) @@ -79,11 +80,11 @@ return findNext(); } - public Object nextElement() { + public String nextElement() { if (local.hasMoreElements()) return local.nextElement(); if (findNext()) { - Object result = nextElement; + String result = nextElement; nextElement = null; return result; }