* Two fixes for case insensitive maps in containsKey() and get().

This commit is contained in:
hns 2006-08-09 11:04:29 +00:00
parent 16eca87022
commit 9a6757f75b

View file

@ -287,8 +287,12 @@ public class ResourceProperties extends Properties {
if ((System.currentTimeMillis() - lastCheck) > CACHE_TIME) { if ((System.currentTimeMillis() - lastCheck) > CACHE_TIME) {
update(); update();
} }
if (ignoreCase) {
return keyMap.containsKey(key.toString().toLowerCase());
} else {
return super.containsKey(key.toString()); return super.containsKey(key.toString());
} }
}
/** /**
* Returns an enumeration of all values * Returns an enumeration of all values
@ -316,7 +320,7 @@ public class ResourceProperties extends Properties {
if (strkey == null) if (strkey == null)
return null; return null;
} }
return (String) super.get(key.toString()); return (String) super.get(strkey);
} }
/** /**