Skip to content

Commit

Permalink
Fixed jti null exception
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungBaeJeon committed Jan 16, 2020
1 parent 453acd6 commit 8039594
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>

<groupId>com.metadium</groupId>
<version>0.1.5</version>
<version>0.1.6</version>
<artifactId>verifiable-credential-java</artifactId>
<packaging>jar</packaging>

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/metadium/vc/Verifiable.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ public void setId(URI id) {
* @return id of verifiable credential
*/
public URI getId() {
return URI.create((String)jsonObject.get(JSONLD_KEY_ID));
String id = (String)jsonObject.get(JSONLD_KEY_ID);
return id == null ? null : URI.create(id);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/metadium/vc/VerifiableCredential.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public void setIssuer(URI issuer) {
* @return issuer of credential
*/
public URI getIssuer() {
return URI.create((String)jsonObject.get(JSONLD_KEY_ISSUSER));
String iss = (String)jsonObject.get(JSONLD_KEY_ISSUSER);
return iss == null ? null : URI.create(iss);
}

/**
Expand Down

0 comments on commit 8039594

Please sign in to comment.