[hidden email] wrote:
This is bad generiics. UtilProperties.getProperties() returns
Properties, which extends Hashtable<Object, Object>. The cast below
could throw a CCE.
On that note, since generalProperties has Object for it's keys, you
don't have to cast at all.
> - if (pairs.getValue().equals("DEFAULT")) {
> + if ("DEFAULT".equals(pairs.getValue())) {
> if (UtilValidate.isNotEmpty(generalProperties.get(pairs.getKey()))) {
> userPrefMap.put((String) pairs.getKey(), generalProperties.get(pairs.getKey()));
> }
>
>