Update of /var/cvs/src/org/mmbase/util
In directory james.mmbase.org:/tmp/cvs-serv3335
Modified Files:
SortedBundle.java
Log Message:
Added some @Override
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util
Index: SortedBundle.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/SortedBundle.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- SortedBundle.java 6 Sep 2008 14:05:59 -0000 1.37
+++ SortedBundle.java 27 Apr 2009 12:02:59 -0000 1.38
@@ -29,7 +29,7 @@
*
* @author Michiel Meeuwissen
* @since MMBase-1.8
- * @version $Id: SortedBundle.java,v 1.37 2008/09/06 14:05:59 michiel Exp $
+ * @version $Id: SortedBundle.java,v 1.38 2009/04/27 12:02:59 michiel Exp $
*/
public class SortedBundle {
@@ -50,9 +50,11 @@
// cache of maps.
private static final Cache<String, SortedMap<?, String>> knownResources =
new Cache<String, SortedMap<?, String>>(100) {
+ @Override
public String getName() {
return "ConstantBundles";
}
+ @Override
public String getDescription() {
return "A cache for constant bundles, to avoid a lot of
reflection.";
}
@@ -94,6 +96,7 @@
return 0;
}
}
+ @Override
public boolean equals(Object o) {
if (o == this) return true;
if (o == null) return false;
@@ -112,6 +115,7 @@
/**
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
int result = 0;
result = HashCodeUtil.hashCode(result, key);
@@ -140,6 +144,7 @@
*/
public static <C> SortedMap<C, String> getResource(final String baseName,
Locale locale, final ClassLoader loader, final Map<String, Object>
constantsProvider, final Class<?> wrapper, Comparator<? super Object>
comparator) {
String resourceKey = baseName + '/' + locale + (constantsProvider ==
null ? "" : "" + constantsProvider.hashCode()) + "/" + (comparator == null ? ""
: "" + comparator.hashCode()) + "/" + (wrapper == null ? "" :
wrapper.getName());
+ @SuppressWarnings("unchecked")
SortedMap<C, String> m = (SortedMap<C, String>)
knownResources.get(resourceKey);
if (locale == null) locale = LocalizedString.getDefault();
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs