Skip to content

Commit

Permalink
fix sonar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Jul 18, 2023
1 parent 2087f4e commit 68a6c64
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,16 +268,18 @@ _%>
}

private String getMappedMessageKey(Throwable err) {
if(err instanceof MethodArgumentNotValidException)
if(err instanceof MethodArgumentNotValidException) {
return ErrorConstants.ERR_VALIDATION;
<%_ if (!databaseTypeNo && !databaseTypeCassandra) { _%>
else if(err instanceof ConcurrencyFailureException
|| err.getCause() != null && err.getCause() instanceof ConcurrencyFailureException)
} else if(err instanceof ConcurrencyFailureException
|| err.getCause() != null && err.getCause() instanceof ConcurrencyFailureException) {
return ErrorConstants.ERR_CONCURRENCY_FAILURE;
<%_ } _%>
<%_ if (reactive) { _%>
else if (err instanceof WebExchangeBindException) return ErrorConstants.ERR_VALIDATION;
} else if (err instanceof WebExchangeBindException) {
return ErrorConstants.ERR_VALIDATION;
<%_ } _%>
}
return null;
}

Expand Down

0 comments on commit 68a6c64

Please sign in to comment.