Skip to content

Commit

Permalink
#83: sonar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
firaja committed Oct 18, 2022
1 parent 508e126 commit 4a1d636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/main/java/com/password4j/Password.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
*/
package com.password4j;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This class provides the two main operations on password: hash and verify.
Expand All @@ -36,7 +34,7 @@ public class Password

static
{
Utils.printBanner(System.out);
Utils.printBanner(System.out); //NOSONAR
}

private Password()
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/password4j/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -561,8 +561,9 @@ static void printBanner(PrintStream printStream)
{
String pbkdf2Banner;
List<String> pbkd2s = AlgorithmFinder.getAllPBKDF2Variants();
if (pbkd2s.size() > 0) {
pbkdf2Banner = "✅ PBKDF2-" + String.join("/", pbkd2s).replaceAll("PBKDF2WithHmac", "");
if (!pbkd2s.isEmpty())
{
pbkdf2Banner = "✅ PBKDF2-" + String.join("/", pbkd2s).replace("PBKDF2WithHmac", "");
}
else
{
Expand Down

0 comments on commit 4a1d636

Please sign in to comment.