-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Treat unit test setup methods as constructors for UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR #453
Labels
Comments
any updates on this? |
We also start seeing this with JUnit 5 and its annotation |
Would need @BeforeAll as well. |
gtoison
added a commit
to gtoison/spotbugs
that referenced
this issue
Feb 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
JUnit and TestNG test classes typically initialise their fields within a
setup
method, rather than the constructor, which often results in UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR. Can appropriately-annotated setup methods (@Before
,@BeforeMethod
,@BeforeClass
) be treated as constructors for this purpose?The text was updated successfully, but these errors were encountered: