Fix some sonar findings
Fix some sonar findings
This commit is contained in:
@@ -77,9 +77,14 @@ public class JpaAutoConfirmationStatus extends AbstractJpaTenantAwareBaseEntity
|
||||
final String remarkMessage = StringUtils.hasText(remark) ? remark : "n/a";
|
||||
final String formattedInitiator = StringUtils.hasText(initiator) ? initiator : "n/a";
|
||||
final String createdByRolloutsUser = StringUtils.hasText(getCreatedBy()) ? getCreatedBy() : "n/a";
|
||||
return String.format("Assignment automatically confirmed by initiator '%s'. \n\n" //
|
||||
+ "Auto confirmation activated by system user: '%s' \n\n" //
|
||||
+ "Remark: %s", formattedInitiator, createdByRolloutsUser, remarkMessage);
|
||||
// https://docs.oracle.com/en/java/javase/17/text-blocks/index.html#normalization-of-line-terminators
|
||||
// nevertheless of the end of line of the file (\r\n, \n or \r) the result will contains \n
|
||||
return """
|
||||
Assignment automatically confirmed by initiator '%s'.\040
|
||||
|
||||
Auto confirmation activated by system user: '%s'\040
|
||||
|
||||
Remark: %s""".formatted(formattedInitiator, createdByRolloutsUser, remarkMessage);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -118,6 +118,7 @@ public class ControllerPreAuthenticatedSecurityHeaderFilter extends AbstractCont
|
||||
* if we find the hash in any the trusted CA chain to accept this request for
|
||||
* this tenant.
|
||||
*/
|
||||
@SuppressWarnings("java:S2629") // check if debug is enabled is maybe heavier then evaluation
|
||||
private String getIssuerHashHeader(final DmfTenantSecurityToken securityToken, final String knownIssuerHashes) {
|
||||
// there may be several knownIssuerHashes configured for the tenant
|
||||
final List<String> knownHashes = splitMultiHashBySemicolon(knownIssuerHashes);
|
||||
|
||||
@@ -227,6 +227,7 @@ public class ArtifactUploadState implements Serializable {
|
||||
return inProgressCount;
|
||||
}
|
||||
|
||||
@SuppressWarnings("java:S2629") // error shall be enable almost every time and evaluation is light
|
||||
private static void assertFileStateConsistency(final int inProgressCount, final int overallUploadCount,
|
||||
final int succeededUploadCount, final int failedUploadCount) {
|
||||
if (inProgressCount < 0) {
|
||||
|
||||
Reference in New Issue
Block a user