Fix sonar issue RandomPasswordGenerator
authoredyta <edyta.krukowska@nokia.com>
Mon, 6 Apr 2020 05:20:28 +0000 (07:20 +0200)
committeredyta <edyta.krukowska@nokia.com>
Mon, 6 Apr 2020 07:25:33 +0000 (09:25 +0200)
Issue-ID: AAF-1118
Signed-off-by: Edyta Krukowska <edyta.krukowska@nokia.com>
Change-Id: Idfd7e957b6dda043d7343ddffe334c5400620217

certServiceClient/src/main/java/org/onap/aaf/certservice/client/certification/conversion/RandomPasswordGenerator.java

index ad3ae20..6515ea5 100644 (file)
@@ -38,14 +38,15 @@ class RandomPasswordGenerator {
     //we are using new SecureRandom which provides
     //cryptographic security
     Password generate(int passwordLength) {
-        return new Password(RandomStringUtils.random(
+        return new Password(RandomStringUtils.random(//NOSONAR
                 passwordLength,
                 START_POSITION_IN_ASCII_CHARS,
                 END_POSITION_IN_ASCII_CHARS,
                 USE_LETTERS_ONLY,
                 USE_NUMBERS_ONLY,
                 SET_OF_CHARS,
-                new SecureRandom())); //NOSONAR
+                new SecureRandom())
+        );
     }
 }