mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-11 14:12:36 +08:00
style: resolve some FCBL_FIELD_COULD_BE_LOCAL
warnings (#5764)
style: make simple fields local
This commit is contained in:
@ -9,14 +9,12 @@ import org.junit.jupiter.api.Test;
|
||||
public class A5CipherTest {
|
||||
|
||||
private A5Cipher a5Cipher;
|
||||
private BitSet sessionKey;
|
||||
private BitSet frameCounter;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
// Initialize the session key and frame counter
|
||||
sessionKey = BitSet.valueOf(new long[] {0b1010101010101010L});
|
||||
frameCounter = BitSet.valueOf(new long[] {0b0000000000000001L});
|
||||
final var sessionKey = BitSet.valueOf(new long[] {0b1010101010101010L});
|
||||
final var frameCounter = BitSet.valueOf(new long[] {0b0000000000000001L});
|
||||
a5Cipher = new A5Cipher(sessionKey, frameCounter);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ import org.junit.jupiter.api.Test;
|
||||
public class A5KeyStreamGeneratorTest {
|
||||
|
||||
private A5KeyStreamGenerator keyStreamGenerator;
|
||||
private BitSet sessionKey;
|
||||
private BitSet frameCounter;
|
||||
|
||||
@BeforeEach
|
||||
@ -20,7 +19,7 @@ public class A5KeyStreamGeneratorTest {
|
||||
keyStreamGenerator = new A5KeyStreamGenerator();
|
||||
|
||||
// Initialize session key and frame counter for testing
|
||||
sessionKey = BitSet.valueOf(new long[] {0b1010101010101010L}); // Example 16-bit key
|
||||
final var sessionKey = BitSet.valueOf(new long[] {0b1010101010101010L}); // Example 16-bit key
|
||||
frameCounter = BitSet.valueOf(new long[] {0b0000000000000001L}); // Example 16-bit frame counter
|
||||
keyStreamGenerator.initialize(sessionKey, frameCounter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user