-
Notifications
You must be signed in to change notification settings - Fork 10
Description
Describe the bug When attempting to validate an OB3 achievement credential that uses BitStringStatusList Credential statuses (per https://w3c.github.io/vc-bitstring-status-list/), a NullPointerException occurs. The problem appears to be caused by this.didResolver resolving to null in BitstringStatusListCredentialInspector. This results in a crash when the code tries to use the DID resolver to process credential statuses.
Impacted file inspector-vc/src/main/java/org/oneedtech/inspect/vc/BitstringStatusListCredentialInspector.java
Line of concern The property this.didResolver is coming up as null:
Java
this.didResolver = (DidResolver) builder.getInjected(RunContextKey.DID_RESOLVER).orElse(null);
Steps to reproduce
Attempt to validate an OB3 achievement credential that references BitStringStatusList Credential statuses.
The program throws a NullPointerException.
Expected behavior The validator should correctly resolve the DID and process BitStringStatusList statuses without throwing a NullPointerException.
Environment
Repository: 1EdTech/digital-credentials-public-validator
Class: BitstringStatusListCredentialInspector
Additional context
Related spec: https://w3c.github.io/vc-bitstring-status-list/
Sample credential: https://hu.achievementstudio.today/milestone/v2api/api/AchievementCredential/8ebfcaeb-2ad6-48da-abf0-274cc07f7df6/json
Exception from validator:
Code
Cannot invoke "org.oneedtech.inspect.vc.probe.did.DidResolver.resolve(java.net.URI, com.apicatalog. jsonld.loader.DocumentLoader)" because "didResolver" is null
Version: Current version of OB3 validator