changeset 13134:650819b6f600

8139574: ReentrantReadWriteLock documentation example has compile time error Reviewed-by: martin, psandoz, chegar, shade, plevart
author dl
date Wed, 25 Nov 2015 18:51:06 -0800
parents de6ab0c3bd26
children 2103ed2d51f5
files src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Wed Nov 25 18:45:53 2015 -0800
+++ b/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Wed Nov 25 18:51:06 2015 -0800
@@ -188,9 +188,9 @@
  *     try { return m.get(key); }
  *     finally { r.unlock(); }
  *   }
- *   public String[] allKeys() {
+ *   public List<String> allKeys() {
  *     r.lock();
- *     try { return m.keySet().toArray(); }
+ *     try { return new ArrayList<>(m.keySet()); }
  *     finally { r.unlock(); }
  *   }
  *   public Data put(String key, Data value) {