-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
Correct misstatement in API.
-
Java API
-
SE
Summary
Correct a typo in ElementFilter
to make it clear that argument collections are not backing stores of collections returned by the filtering methods.
Problem
A missing "not" misstates the semantic relations between the argument and returned collections.
Solution
Add the missing "not" and make related improvements.
Specification
diff --git a/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java b/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java
index 9df7959d8b9..71b1f3823b5 100644
--- a/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java
+++ b/src/java.compiler/share/classes/javax/lang/model/util/ElementFilter.java
@@ -45,13 +45,13 @@ import javax.lang.model.element.ModuleElement.UsesDirective;
/**
* Filters for selecting just the elements of interest from a
* collection of elements. The returned sets and lists are new
- * collections and do use the argument as a backing store. The
+ * collections that do <em>not</em> use the argument collection as a backing store. The
* methods in this class do not make any attempts to guard against
* concurrent modifications of the arguments. The returned sets and
- * lists are mutable but unsafe for concurrent access. A returned set
- * has the same iteration order as the argument set to a method.
+ * lists are mutable and unsafe for concurrent access. A returned set
+ * from a method has the same iteration order as the argument set to the method.
*
- * <p>If iterables and sets containing {@code null} are passed as
+ * <p>If iterables or sets containing {@code null} are passed as
* arguments to methods in this class, a {@code NullPointerException}
* will be thrown.
*
- csr of
-
JDK-8309416 Misstatement in semantics of methods in javax.lang.model.ElementFilter
-
- Resolved
-