ADDITIONAL SYSTEM INFORMATION :
Available in any OS and browser combinations.
A DESCRIPTION OF THE PROBLEM :
In the documentation [1], under Parameters: section, it says that "This is the entry that will be removed it this method returns true." It should be corrected as "This is the entry that will be removed if this method returns true."
[1] https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just move to the LinkedHashMap, method removeEldestEntry in the documentation: https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Parameters:
eldest - The least recently inserted entry in the map, or if this is an access-ordered map, the least recently accessed entry. This is the entry that will be removed if this method returns true. If the map was empty prior to the put or putAll invocation resulting in this invocation, this will be the entry that was just inserted; in other words, if the map contains a single entry, the eldest entry is also the newest.
ACTUAL -
Parameters:
eldest - The least recently inserted entry in the map, or if this is an access-ordered map, the least recently accessed entry. This is the entry that will be removed it this method returns true. If the map was empty prior to the put or putAll invocation resulting in this invocation, this will be the entry that was just inserted; in other words, if the map contains a single entry, the eldest entry is also the newest.
CUSTOMER SUBMITTED WORKAROUND :
No workarounds, other than the end user recognizing it as a flaw and imagining the substitution which should be used.
FREQUENCY : always
Available in any OS and browser combinations.
A DESCRIPTION OF THE PROBLEM :
In the documentation [1], under Parameters: section, it says that "This is the entry that will be removed it this method returns true." It should be corrected as "This is the entry that will be removed if this method returns true."
[1] https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just move to the LinkedHashMap, method removeEldestEntry in the documentation: https://docs.oracle.com/javase/8/docs/api/java/util/LinkedHashMap.html#removeEldestEntry-java.util.Map.Entry-
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Parameters:
eldest - The least recently inserted entry in the map, or if this is an access-ordered map, the least recently accessed entry. This is the entry that will be removed if this method returns true. If the map was empty prior to the put or putAll invocation resulting in this invocation, this will be the entry that was just inserted; in other words, if the map contains a single entry, the eldest entry is also the newest.
ACTUAL -
Parameters:
eldest - The least recently inserted entry in the map, or if this is an access-ordered map, the least recently accessed entry. This is the entry that will be removed it this method returns true. If the map was empty prior to the put or putAll invocation resulting in this invocation, this will be the entry that was just inserted; in other words, if the map contains a single entry, the eldest entry is also the newest.
CUSTOMER SUBMITTED WORKAROUND :
No workarounds, other than the end user recognizing it as a flaw and imagining the substitution which should be used.
FREQUENCY : always
- duplicates
-
JDK-8267088 Spelling mistake in java docs in LinkedHashMap.java class file.
-
- Closed
-