Skip to content

Commit 5060b2d

Browse files
committed
fix: Avoid potential concurrent modification exception.
1 parent dab4ff0 commit 5060b2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/danubetech/verifiablecredentials/CredentialSubject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static void removeFromJsonLdObject(JsonLDObject jsonLdObject) {
9999

100100
public Map<String, Object> getClaims() {
101101
Map<String, Object> claims = new LinkedHashMap<>(this.getJsonObject());
102-
for (String key : claims.keySet()) if (Keywords.contains(key)) claims.remove(key);
102+
for (String key : this.getJsonObject().keySet()) if (Keywords.contains(key)) claims.remove(key);
103103
claims.remove(JsonLDKeywords.JSONLD_TERM_ID);
104104
claims.remove(JsonLDKeywords.JSONLD_TERM_TYPE);
105105
return claims;

0 commit comments

Comments
 (0)