Skip to content

Commit

Permalink
Merge pull request #456 from /issues/455-PowerAuthClientException-NPE
Browse files Browse the repository at this point in the history
Fix #455: PowerAuthClientException#getPowerAuthError is nullable
  • Loading branch information
banterCZ authored Oct 20, 2023
2 parents 214c6f3 + ee22456 commit 6be94f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@
<spring-boot.version>3.1.4</spring-boot.version>
<commons-text.version>1.10.0</commons-text.version>
<bcprov.version>1.76</bcprov.version>

<wultra-core.version>1.7.0</wultra-core.version>
<powerauth.version>1.5.0</powerauth.version>
<powerauth.version>1.6.0-SNAPSHOT</powerauth.version>
<powerauth-crypto.version>1.5.1</powerauth-crypto.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ public ActivationLayer1Response createActivation(ActivationLayer1Request request
}
}
} catch (PowerAuthClientException ex) {
if (ex.getPowerAuthError() instanceof final PowerAuthErrorRecovery errorRecovery) {
if (ex.getPowerAuthError().orElse(null) instanceof final PowerAuthErrorRecovery errorRecovery) {
logger.debug("Invalid recovery code, current PUK index: {}", errorRecovery.getCurrentRecoveryPukIndex());
throw new PowerAuthRecoveryException(ex.getMessage(), "INVALID_RECOVERY_CODE", errorRecovery.getCurrentRecoveryPukIndex());
}
Expand Down

0 comments on commit 6be94f8

Please sign in to comment.