Skip to content

Remove static from test variables - #1723

Open
Mohit-Rajbhar100698 wants to merge 1 commit into
IBM:mainfrom
Mohit-Rajbhar100698:fix/remove-static-variable
Open

Remove static from test variables#1723
Mohit-Rajbhar100698 wants to merge 1 commit into
IBM:mainfrom
Mohit-Rajbhar100698:fix/remove-static-variable

Conversation

@Mohit-Rajbhar100698

@Mohit-Rajbhar100698 Mohit-Rajbhar100698 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Remove the static modifier from the test variables to ensure each instance maintains its own state and to support future multithreaded test execution.
Changes:

  • In src/test/java/ibm/jceplus/junit/tests/TestAESCCM.java file.

Signed-off-by: Mohit Rajbhar mohit.rajbhar@ibm.com

@Mohit-Rajbhar100698
Mohit-Rajbhar100698 force-pushed the fix/remove-static-variable branch 3 times, most recently from 1398f49 to 5a625c1 Compare August 21, 2026 04:57
@Mohit-Rajbhar100698 Mohit-Rajbhar100698 changed the title Remove static from test variable Remove static from test variables Aug 21, 2026
Comment thread src/test/java/ibm/jceplus/junit/tests/TestAESCCM.java
@Mohit-Rajbhar100698
Mohit-Rajbhar100698 force-pushed the fix/remove-static-variable branch from 5a625c1 to c5274c2 Compare August 28, 2026 16:04

// This CCM TAG LENGTH is specified in bits. Valid values are: 32, 48, 64, 60, 96, 112, and 128
// Although initialized here, the ccmTagLength will actually be selected randomly for each iteration.
public static int ccmTagLength = 128;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a dead variable . There is no any references to this variable.
Should I remove it ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. If not referenced please remove it.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed

Comment thread src/test/java/ibm/jceplus/junit/tests/TestAESCCM.java
Remove the static modifier from the test variables to ensure each
instance maintains its own state and to support future multithreaded
test execution and remove unreferenced variable.

Changes:
- In src/test/java/ibm/jceplus/junit/tests/TestAESCCM.java file.
- In src/test/java/ibm/jceplus/junit/tests/TestAESCCM2.java file.

Signed-off-by: Mohit Rajbhar <mohit.rajbhar@ibm.com>
@Mohit-Rajbhar100698
Mohit-Rajbhar100698 force-pushed the fix/remove-static-variable branch from 9760761 to d015ee4 Compare August 31, 2026 07:58

@jasonkatonica jasonkatonica left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants