You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2025. It is now read-only.
Fix to compile warnings due to code issues.
* Minor logic errors.
* Generic declarations and casts.
* Resources not closed (now use try-with-resources)
Resolve issues in existing Javadoc.
Fixes for actual bugs flagged by Checkstyle
* Two (static) utility classes with public constructors.
* Peer class had equals() implementation but no hashCode().
Change-Id: I5484a93b3b36cb27761b297aaa33f8321f0f4d02
Signed-off-by: Mark S. Lewis <Mark_Lewis@uk.ibm.com>
thrownewChaincodeEndorsementPolicyParseException(format("%s expected to have list but found %s.", key, "" + vo));
95
+
thrownewChaincodeEndorsementPolicyParseException(format("%s expected to have list but found %s.", key, String.valueOf(vo)));
97
96
}
98
-
if (((List) vo).size() < matchNo) {
99
97
100
-
thrownewChaincodeEndorsementPolicyParseException(format("%s expected to have at least %d items to match but only found %d.", key, matchNo, ((List) vo).size()));
thrownewChaincodeEndorsementPolicyParseException(format("%s expected to have at least %d items to match but only found %d.", key, matchNo, voList.size()));
thrownewChaincodeEndorsementPolicyParseException(format("In identities with key %s value expected Map for role got %s ", key, role == null ? "null" : role.getClass().getName()));
151
154
}
155
+
finalMap<?, ?> roleMap = (Map<?, ?>)role;
152
156
153
-
Objectname = ((Map) role).get("name");
157
+
Objectname = (roleMap).get("name");
154
158
155
159
if (!(nameinstanceofString)) {
156
160
thrownewChaincodeEndorsementPolicyParseException(format("In identities with key %s name expected String in role got %s ", key, name == null ? "null" : name.getClass().getName()));
0 commit comments