diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2cb53b7c72..2c5983af7e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,9 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
### Fixed
- Fixed false positive UPM_UNCALLED_PRIVATE_METHOD for method used in JUnit's MethodSource ([[#2379](https://github.com/spotbugs/spotbugs/issues/2379)])
+- Use java.nio to load filter files ([[#2684](https://github.com/spotbugs/spotbugs/pull/2684)])
+- Eclipse: Do not export javax.annotation packages ([[#2699](https://github.com/spotbugs/spotbugs/pull/2699)])
+- Fixed not thread safe FindOverridableMethodCall detector ([[#2701](https://github.com/spotbugs/spotbugs/issues/2701)])
### Added
- New detector finding `System.getenv()` calls, where the corresponding Java property could be used (See [ENV02-J](https://wiki.sei.cmu.edu/confluence/display/java/ENV02-J.+Do+not+trust+the+values+of+environment+variables)).
diff --git a/eclipsePlugin/META-INF/MANIFEST-TEMPLATE.MF b/eclipsePlugin/META-INF/MANIFEST-TEMPLATE.MF
index 0bba919740c..85a1a09e120 100644
--- a/eclipsePlugin/META-INF/MANIFEST-TEMPLATE.MF
+++ b/eclipsePlugin/META-INF/MANIFEST-TEMPLATE.MF
@@ -97,9 +97,6 @@ Export-Package: de.tobject.findbugs,
edu.umd.cs.findbugs.visitclass,
edu.umd.cs.findbugs.workflow,
edu.umd.cs.findbugs.xml,
- javax.annotation,
- javax.annotation.concurrent,
- javax.annotation.meta,
org.apache.bcel,
org.apache.bcel.classfile,
org.apache.bcel.generic,
diff --git a/spotbugs-tests/src/test/java/edu/umd/cs/findbugs/filter/Utf8FilterFileNameTest.java b/spotbugs-tests/src/test/java/edu/umd/cs/findbugs/filter/Utf8FilterFileNameTest.java
new file mode 100644
index 00000000000..544b09ef2b9
--- /dev/null
+++ b/spotbugs-tests/src/test/java/edu/umd/cs/findbugs/filter/Utf8FilterFileNameTest.java
@@ -0,0 +1,52 @@
+/*
+ * Contributions to SpotBugs
+ * Copyright (C) 2023, the SpotBugs authors
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+package edu.umd.cs.findbugs.filter;
+
+import static org.junit.jupiter.api.Assertions.fail;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+
+/**
+ * @author gtoison
+ */
+class Utf8FilterFileNameTest {
+ @TempDir
+ private Path folderPath;
+
+ @Test
+ void loadFilter() {
+ Path filterPath = folderPath.resolve("äéàùçæð.xml");
+
+ try {
+ Files.createFile(filterPath);
+ Files.writeString(filterPath, " This code constructs an HTTP Cookie using an untrusted HTTP parameter. If this cookie is added to an HTTP response, it will allow an HTTP response splitting
vulnerability. See http://en.wikipedia.org/wiki/HTTP_response_splitting
for more information. SpotBugs looks only for the most blatant, obvious cases of HTTP response splitting.
@@ -2053,7 +2053,7 @@ consider using a commercial static analysis or pen-testing tool.
This code directly writes an HTTP parameter to an HTTP header, which allows for an HTTP response splitting
vulnerability. See http://en.wikipedia.org/wiki/HTTP_response_splitting
for more information. SpotBugs looks only for the most blatant, obvious cases of HTTP response splitting.
@@ -3779,7 +3779,7 @@ Thus, having a mutable instance field generally creates race conditions.
This code seems to be using non-short-circuit logic (e.g., &
or |)
rather than short-circuit logic (&& or ||). In addition,
-it seem possible that, depending on the value of the left hand side, you might not
+it seems possible that, depending on the value of the left hand side, you might not
want to evaluate the right hand side (because it would have side effects, could cause an exception
or could be expensive.
@@ -3840,7 +3840,7 @@ Language Specification for details.
will only give up one lock and the notify will be unable to get both locks,
and thus the notify will not succeed.
If there is also a warning about a two lock wait, the
- probably of a bug is quite high.
+ probability of a bug is quite high.
This code calls a method and ignores the return value. However, our analysis shows that
the method (including its implementations in subclasses if any) does not produce any effect
-other than return value. Thus this call can be removed.
+other than return value. Thus, this call can be removed.
We are trying to reduce the false positives as much as possible, but in some cases this warning might be wrong.
Common false-positive cases include: This method calls equals(Object) on two references of different
class types and analysis suggests they will be to objects of different classes
at runtime. Further, examination of the equals methods that would be invoked suggest that either
-this call will always return false, or else the equals method is not be symmetric (which is
+this call will always return false, or else the equals method is not symmetric (which is
a property required by the contract
for equals in class Object).
foo(17)
, which is defined in both a superclass and in an outer method.
By the Java semantics,
it will be resolved to invoke the inherited method, but this may not be what
@@ -5099,7 +5099,7 @@ dereferencing this value will generate a null pointer exception.
This field is never initialized within any constructor, and is therefore could be null after
the object is constructed. Elsewhere, it is loaded and dereferenced without a null check.
-This could be a either an error or a questionable design, since
+This could be either an error or a questionable design, since
it means a null pointer exception will be generated if that field is dereferenced
before being initialized.
==
.
Assertions must not be used to validate arguments of public methods because the validations are not performed if assertions are disabled.
diff --git a/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindOverridableMethodCall.java b/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindOverridableMethodCall.java
index 9229111950b..69bb9fd4ac2 100644
--- a/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindOverridableMethodCall.java
+++ b/spotbugs/src/main/java/edu/umd/cs/findbugs/detect/FindOverridableMethodCall.java
@@ -59,16 +59,16 @@ private static class CallerInfo {
}
// For methods called using the standard way
- private static final Map