Skip to content

Commit 1aa8f76

Browse files
committed
chore: Fix some compiler warnings.
Signed-off-by: Markus Sabadello <[email protected]>
1 parent 13c5862 commit 1aa8f76

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public static VerifiableCredential fromJsonLdObject(LinkedHashMap<String, Object
8080
return fromJsonLdObject(jsonLdObject, true);
8181
}
8282

83+
@SuppressWarnings("unchecked")
8384
public static VerifiableCredential fromJsonString(String jsonString, boolean validate) throws JsonParseException, IOException {
8485

8586
LinkedHashMap<String, Object> jsonLdObject = (LinkedHashMap<String, Object>) JsonUtils.fromString(jsonString);
@@ -151,6 +152,7 @@ public void setCredentialSubject(String subject) {
151152
this.getJsonLdCredentialSubject().put(JSONLD_TERM_ID, subject);
152153
}
153154

155+
@SuppressWarnings("unchecked")
154156
public List<String> getContext() {
155157

156158
return (List<String>) this.jsonLdObject.get(JsonLdConsts.CONTEXT);
@@ -164,6 +166,7 @@ public void setContext(List<String> context) {
164166
this.jsonLdObject.put(JsonLdConsts.CONTEXT, context);
165167
}
166168

169+
@SuppressWarnings("unchecked")
167170
public List<String> getType() {
168171

169172
Object object = this.jsonLdObject.get(JSONLD_TERM_TYPE);

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public static VerifiablePresentation fromJsonLdObject(LinkedHashMap<String, Obje
5757
return fromJsonLdObject(jsonLdObject, true);
5858
}
5959

60+
@SuppressWarnings("unchecked")
6061
public static VerifiablePresentation fromJsonString(String jsonString, boolean validate) throws JsonParseException, IOException {
6162

6263
LinkedHashMap<String, Object> jsonLdObject = (LinkedHashMap<String, Object>) JsonUtils.fromString(jsonString);
@@ -121,6 +122,7 @@ public static VerifiablePresentation fromJwtVerifiableCredential(JwtVerifiableCr
121122
return fromJwtVerifiableCredential(jwtVerifiableCredential, true);
122123
}
123124

125+
@SuppressWarnings("unchecked")
124126
public VerifiableCredential getVerifiableCredential() {
125127

126128
Object verifiableCredentialObject = this.getJsonLdObject().get(JSONLD_TERM_VERIFIABLE_CREDENTIAL);

src/main/java/com/danubetech/verifiablecredentials/jwt/JwtObject.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ public boolean verify_P256K_ES256K(com.nimbusds.jose.jwk.ECKey publicKey) throws
166166

167167
private static class EscapedSlashWorkaroundJWSObject extends JWSObject {
168168

169+
private static final long serialVersionUID = -587898962717783109L;
170+
169171
public EscapedSlashWorkaroundJWSObject(final JWSHeader header, final JWTClaimsSet claimsSet) {
170172

171173
super(header, new Payload(claimsSet.toJSONObject().toJSONString().replace("\\/", "/")));

src/main/java/com/danubetech/verifiablecredentials/w3ctestsuite/Generator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ static String readInput(File input) throws Exception {
153153
String line;
154154
while ((line = reader.readLine()) != null) buffer.append(line);
155155

156+
reader.close();
157+
156158
return buffer.toString();
157159
}
158160
}

0 commit comments

Comments
 (0)