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

fix: MutableClasses: add java.util.Locale, fix reference to java.awt.Cursor #1702

Merged
merged 3 commits into from Sep 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,8 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
- Agree verb with plural subject in the description of
`SW_SWING_METHODS_INVOKED_IN_SWING_THREAD` ([#1664](https://github.com/spotbugs/spotbugs/pull/1664))
- Wrong description of the `SE_TRANSIENT_FIELD_OF_NONSERIALIZABLE_CLASS` ([#1664](https://github.com/spotbugs/spotbugs/pull/1664))
- Fixed java.util.Locale as being flagged as EI ([#1702](https://github.com/spotbugs/spotbugs/pull/1702))
- Fixed reference to java.awt.Cursor which caused it to be flagged as EI ([#1702](https://github.com/spotbugs/spotbugs/pull/1702))
- Treat types with `@com.google.errorprone.annotations.Immutable` as immutable ([#1705](https://github.com/spotbugs/spotbugs/pull/1705))
- Fix annotation check for `jdk.internal.ValueBased` ([#1706](https://github.com/spotbugs/spotbugs/pull/1706))

Expand Down
Expand Up @@ -21,7 +21,7 @@ public class MutableClasses {
"java.lang.Float", "java.lang.StackTraceElement", "java.lang.Class", "java.math.BigInteger",
"java.math.Decimal", "java.io.File", "java.awt.Font", "java.awt.BasicStroke",
"java.awt.Color", "java.awt.GradientPaint", "java.awt.LinearGradientPaint",
"java.awt.RadialGradientPaint", "java.Cursor.", "java.util.UUID", "java.net.URL",
"java.awt.RadialGradientPaint", "java.awt.Cursor", "java.util.Locale", "java.util.UUID", "java.net.URL",
"java.net.URI", "java.net.Inet4Address", "java.net.Inet6Address", "java.net.InetSocketAddress",
"java.security.Permission", "com.google.common.collect.ImmutableBiMap",
"com.google.common.collect.ImmutableClassToInstanceMap",
Expand Down
Expand Up @@ -35,6 +35,11 @@ public void TestKnownImmutable() {
Assert.assertFalse(MutableClasses.mutableSignature("Ljava/lang/String;"));
}

@Test
public void TestLocale() {
Assert.assertFalse(MutableClasses.mutableSignature("Ljava/util/Locale;"));
}

@Test
public void TestArray() {
Assert.assertTrue(MutableClasses.mutableSignature("[I"));
Expand Down