diff options
author | Abhishek Koneru <akoneru@redhat.com> | 2012-06-11 16:21:26 -0400 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2012-06-15 17:12:15 -0500 |
commit | 10326ad4fe1b3db620f43feb3f47c4fd008f3f33 (patch) | |
tree | 4d4a0f719bbbea6d6db53ef3fab5f3717411cfb9 /base/silent | |
parent | c53ca291e21761f1de5417ef596afba395a7f5d1 (diff) | |
download | pki-10326ad4fe1b3db620f43feb3f47c4fd008f3f33.tar.gz pki-10326ad4fe1b3db620f43feb3f47c4fd008f3f33.tar.xz pki-10326ad4fe1b3db620f43feb3f47c4fd008f3f33.zip |
Fixes for Coverity issues of type Stringbuffer, NO_EQUALS_METHOD , REVERSE_INULL,Wrong_Map_Iterators
Diffstat (limited to 'base/silent')
-rw-r--r-- | base/silent/src/com/netscape/pkisilent/common/CMSProperties.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java b/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java index 16f18500c..5cf513417 100644 --- a/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java +++ b/base/silent/src/com/netscape/pkisilent/common/CMSProperties.java @@ -675,4 +675,29 @@ class CMSProperties extends Hashtable<String, String> { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + + @Override + public int hashCode() { + final int prime = 31; + int result = super.hashCode(); + result = prime * result + ((defaults == null) ? 0 : defaults.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (!super.equals(obj)) + return false; + if (getClass() != obj.getClass()) + return false; + CMSProperties other = (CMSProperties) obj; + if (defaults == null) { + if (other.defaults != null) + return false; + } else if (!defaults.equals(other.defaults)) + return false; + return true; + } } |