-
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
Spotbugs 4.1.4 reports EQ_UNUSUAL on Java 15 record #1367
Comments
Thanks for opening your first issue here! 😃 |
Same with Spotbugs 4.2.0:
Spotbugs reports the following warning:
Details:
My expectation: Spotbugs should accept the default implementation of Java records. |
Same happens on recently released JDK 16+SpotBugs 4.2.2 |
note:
SpotBugs needs to ignore classes that extend |
Note that users can write their own equals and hash code implementations for records. |
SpotBugs should only execute the equals check if the class extending |
Includes bugfix: 'false positive EQ_UNUSUAL with record classes' spotbugs/spotbugs#1367 Fix spotbugs errors that result OOS to upgrade further, 4.3.0 yields 955 violations
* Use passiveExpiringMap for IamService cache Eliminates the need for AuthorizedCacheValue, we now delegate expiration to the map implementation. Convert AuthorizedCacheKey to record to eliminate boilerplate. * Remove references to now-unused datarepo.authCacheSize config Not used in PassiveExpiringMap. * Add unit test * Update spotbugs 4.2.2 -> 4.2.3 Includes bugfix: 'false positive EQ_UNUSUAL with record classes' spotbugs/spotbugs#1367 Fix spotbugs errors that result OOS to upgrade further, 4.3.0 yields 955 violations * Fix violations exposed by :spotbugsTest * spotlessJavaApply * Suppress Spotbugs DMI_RANDOM_USED_ONLY_ONCE warnings rather than misuse SecureRandom * Add warnings around cache TTL in Swagger profile policy member change endpoints
This will be reported on a very simple record:
public record SomeClass(String firstName, String lastName, String middleName) { }
The text was updated successfully, but these errors were encountered: