Skip to content

Commit

Permalink
fix: MutableClasses: add java.util.regex.Pattern
Browse files Browse the repository at this point in the history
java.util.regex.Pattern is immutable
  • Loading branch information
candrews authored and KengoTODA committed Oct 7, 2021
1 parent b221290 commit e256ea5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
## Changed
- Add bug code to report in fancy-hist.xsl ([#1688](https://github.com/spotbugs/spotbugs/pull/1688))
- Bump Saxon-HE from 10.5 to 10.6 ([#1715](https://github.com/spotbugs/spotbugs/pull/1715))
- Fixed immutable java.util.regex.Pattern as being flagged as EI ([#1695](https://github.com/spotbugs/spotbugs/pull/1738))

### Fixed
- Fixed immutable java.lang.Class as being flagged as EI ([#1695](https://github.com/spotbugs/spotbugs/pull/1695))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class MutableClasses {
"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.awt.Cursor", "java.util.Locale", "java.util.UUID", "java.net.URL",
"java.util.regex.Pattern",
"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
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public void TestKnownImmutablePackage() {
@Test
public void TestKnownImmutable() {
Assert.assertFalse(MutableClasses.mutableSignature("Ljava/lang/String;"));
Assert.assertFalse(MutableClasses.mutableSignature("Ljava/util/regex/Pattern;"));
}

@Test
Expand Down

0 comments on commit e256ea5

Please sign in to comment.