Skip to content

Commit

Permalink
fix Extensions.fromMap
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamVe committed Nov 20, 2024
1 parent abac677 commit 5ad1555
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@

public class Extensions {

public static Extensions empty() {
return new Extensions(Collections.emptyMap());
}

@Nullable
public static Extensions fromMap(@Nullable Map<String, ?> input) {
return new Extensions(input);
return input != null ? new Extensions(input) : null;
}

@Nullable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public PublicKeyCredentialCreationOptions(
this.excludeCredentials = excludeCredentials != null ? excludeCredentials : Collections.emptyList();
this.authenticatorSelection = authenticatorSelection;
this.attestation = attestation != null ? attestation : AttestationConveyancePreference.NONE;
this.extensions = extensions != null ? extensions : Extensions.empty();
this.extensions = extensions;
}

public PublicKeyCredentialRpEntity getRp() {
Expand Down

0 comments on commit 5ad1555

Please sign in to comment.