You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/uniresolver/driver/did/btc1/syntax/DidBtc1IdentifierDecoding.java
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,9 @@ public static IdentifierComponents didBtc1IdentifierDecoding(DID identifier) thr
34
34
// If components[0] is not “did”, raise invalidDid error.
35
35
// If components[1] is not “btc1”, raise methodNotSupported error.
36
36
37
-
if (components.length != 3) thrownewResolutionException(ResolutionException.ERROR_INVALIDDID, "Invalid number of ':' characters (must be 3): " + identifier.getDidString());
38
-
if (! "did".equals(components[0])) thrownewResolutionException(ResolutionException.ERROR_INVALIDDID, "Invalid URI scheme (must be 'did'): " + identifier.getDidString());
39
-
if (! "btc1".equals(components[1])) thrownewResolutionException(ResolutionException.ERROR_METHODNOTSUPPORTED, "Unsupported DID method (must be 'btc1'): " + identifier.getDidString());
37
+
if (components.length != 3) thrownewResolutionException(ResolutionException.ERROR_INVALID_DID, "Invalid number of ':' characters (must be 3): " + identifier.getDidString());
38
+
if (! "did".equals(components[0])) thrownewResolutionException(ResolutionException.ERROR_INVALID_DID, "Invalid URI scheme (must be 'did'): " + identifier.getDidString());
39
+
if (! "btc1".equals(components[1])) thrownewResolutionException(ResolutionException.ERROR_METHOD_NOT_SUPPORTED, "Unsupported DID method (must be 'btc1'): " + identifier.getDidString());
40
40
41
41
// Set encodedString to components[2].
42
42
@@ -49,7 +49,7 @@ public static IdentifierComponents didBtc1IdentifierDecoding(DID identifier) thr
if (this.nextByteIndex >= this.dataBytes.length) thrownewResolutionException(ResolutionException.ERROR_INVALIDDID, "Mot enough bytes left at index " + this.nextByteIndex + ": " + Hex.encodeHexString(this.dataBytes));
154
+
if (this.nextByteIndex >= this.dataBytes.length) thrownewResolutionException(ResolutionException.ERROR_INVALID_DID, "Mot enough bytes left at index " + this.nextByteIndex + ": " + Hex.encodeHexString(this.dataBytes));
0 commit comments