Hide utility class constructors
Update all utility classes so that they have a private constructor. This prevents users from accidentally creating an instance, when they should just use the static methods directly. Issue gh-8945
This commit is contained in:
@@ -28,8 +28,6 @@ public class Base64Tests {
|
||||
|
||||
@Test
|
||||
public void isBase64ReturnsTrueForValidBase64() {
|
||||
new Base64(); // unused
|
||||
|
||||
assertThat(Base64.isBase64(new byte[] { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D' })).isTrue();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,10 @@ import org.junit.AssumptionViolatedException;
|
||||
|
||||
import org.springframework.security.crypto.encrypt.AesBytesEncryptor.CipherAlgorithm;
|
||||
|
||||
public class CryptoAssumptions {
|
||||
public final class CryptoAssumptions {
|
||||
|
||||
private CryptoAssumptions() {
|
||||
}
|
||||
|
||||
public static void assumeGCMJCE() {
|
||||
assumeAes256(CipherAlgorithm.GCM);
|
||||
|
||||
Reference in New Issue
Block a user