File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/main/java/com/danubetech/verifiablecredentials Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -245,12 +245,17 @@ public static void removeFromJsonLdObject(JsonLDObject jsonLdObject) {
245245 */
246246
247247 public Object getIssuer () {
248- return JsonLDUtils .jsonLdGetJsonValue (this .getJsonObject (), VerifiableCredentialKeywords .JSONLD_TERM_ISSUER );
248+ Object issuer = JsonLDUtils .jsonLdGetJsonValue (this .getJsonObject (), VerifiableCredentialKeywords .JSONLD_TERM_ISSUER );
249+ if (issuer instanceof String issuerString ) return JsonLDUtils .stringToUri (issuerString );
250+ if (issuer instanceof Map <?, ?> issuerMap ) return issuerMap ;
251+ return null ;
249252 }
250253
251254 public URI getIssuerUri () {
252255 Object issuer = JsonLDUtils .jsonLdGetJsonValue (this .getJsonObject (), VerifiableCredentialKeywords .JSONLD_TERM_ISSUER );
253- return (issuer instanceof String ) ? URI .create (issuer .toString ()) : URI .create ((((Map <String ,Object >)issuer ).get (VerifiableCredentialKeywords .JSONLD_TERM_ISSUER )).toString ());
256+ if (issuer instanceof String issuerString ) return JsonLDUtils .stringToUri (issuerString );
257+ if (issuer instanceof Map <?, ?> issuerMap ) return JsonLDUtils .stringToUri ((String ) issuerMap .get (VerifiableCredentialKeywords .JSONLD_TERM_ISSUER ));
258+ return null ;
254259 }
255260
256261 public Date getValidFrom () {
You can’t perform that action at this time.
0 commit comments