Skip to content
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

feat: remove unneeded mutability #139

Merged
merged 6 commits into from
Apr 24, 2022
Merged

feat: remove unneeded mutability #139

merged 6 commits into from
Apr 24, 2022

Conversation

rhwood
Copy link
Owner

@rhwood rhwood commented Apr 24, 2022

This was flagged by spotbugs as EI_EXPOSE_REP and EI_EXPOSE_REP2, but since the fix means that setting the preferences on a Validation by copying it (and then using the copy) is now easier than it used to be for dependent code, the fix for these is being treated as a feature enhancement, not as a bug fix (the original code was package private or protected, so it was mostly internal).

If you have subclassed JInputVerifier and are setting the preferences on a Validation in your subclass, replace code like this.setValidationPreferences(this.myValidation); with this.myValidation = new Validation(this.myValidation, this.getPreferences());

@rhwood rhwood added the enhancement New feature or request label Apr 24, 2022
@rhwood rhwood added this to the 0.9 milestone Apr 24, 2022
@rhwood rhwood self-assigned this Apr 24, 2022
@sonarcloud
Copy link

sonarcloud bot commented Apr 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@rhwood rhwood merged commit 32b7aab into main Apr 24, 2022
@rhwood rhwood deleted the spotbugs-checks branch April 24, 2022 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant