-
CSR
-
Resolution: Approved
-
P4
-
None
-
behavioral
-
minimal
-
Java API
-
SE
Summary
Inconsistency in specification of java.awt.RenderingHints#entrySet() method.
Problem
The method description says that the Set, returned by the method, can be changed and these modifications will be reflected in the RenderingHints. However, the last statement of the specification prohibits any modifications of this Set. So this needs to be clarified.
Solution
The specification of the method should be updated, "and vice-versa" part should be removed
Specification
src/java.desktop/share/classes/java/awt/RenderingHints.java
* Returns a {@code Set} view of the mappings contained
* in this {@code RenderingHints}. Each element in the
* returned {@code Set} is a {@code Map.Entry}.
* The {@code Set} is backed by the {@code RenderingHints},
* so changes to the {@code RenderingHints} are reflected
- * in the {@code Set}, and vice-versa. If the
- * {@code RenderingHints} is modified while
+ * in the {@code Set}. If the {@code RenderingHints} is modified while
* while an iteration over the {@code Set} is in progress,
* the results of the iteration are undefined.
* <p>
* The entrySet returned from a {@code RenderingHints} object
* is not modifiable.
public Set<Map.Entry<Object,Object>> entrySet() {
- csr of
-
JDK-5085520 Inconsistency in spec for RenderingHints.entrySet()
-
- Resolved
-