Minor cleanup
This commit is contained in:
parent
13a6a75613
commit
c42d164dd3
9 changed files with 44 additions and 37 deletions
|
@ -177,7 +177,7 @@ class PmdOperationTest {
|
|||
void testJavaSecurity() {
|
||||
var pmd = newPmdOperation().ruleSets("category/java/security.xml")
|
||||
.inputPaths(Path.of("src/test/resources/java/Security.java"));
|
||||
assertThat(pmd.performPmdAnalysis(TEST, pmd.initConfiguration(COMMAND_NAME))).isEqualTo(0);
|
||||
assertThat(pmd.performPmdAnalysis(TEST, pmd.initConfiguration(COMMAND_NAME))).isEqualTo(1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;/**
|
||||
package java;
|
||||
|
||||
/**
|
||||
* BestPractices class
|
||||
*
|
||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;/**
|
||||
package java;
|
||||
|
||||
/**
|
||||
* Design class
|
||||
*
|
||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;/**
|
||||
package java;
|
||||
|
||||
/**
|
||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||
* @since 1.0
|
||||
*/
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;/**
|
||||
package java;
|
||||
|
||||
/**
|
||||
* ErrorProne class
|
||||
*
|
||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;import java.text.SimpleDateFormat;
|
||||
package java;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
/**
|
||||
* MultiThreading class
|
||||
|
|
|
@ -14,7 +14,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;/**
|
||||
package java;
|
||||
|
||||
/**
|
||||
* Performance class
|
||||
*
|
||||
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package java;import java.security.SecureRandom;
|
||||
package java;
|
||||
|
||||
/**
|
||||
* Security class
|
||||
|
@ -24,11 +24,6 @@ package java;import java.security.SecureRandom;
|
|||
*/
|
||||
public class Security {
|
||||
void bad() {
|
||||
byte[] iv = new byte[] { 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, };
|
||||
SecretKeySpec secretKeySpec = new SecretKeySpec("my secret here".getBytes(), "AES");
|
||||
}
|
||||
|
||||
void alsoBad() {
|
||||
byte[] iv = "secret iv in here".getBytes();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue