8139574: ReentrantReadWriteLock documentation example has compile time error
authordl
Wed, 25 Nov 2015 18:51:06 -0800
changeset 34346 09f5f3df8fa8
parent 34345 a0cedba337d2
child 34347 4a17f9e90a0f
8139574: ReentrantReadWriteLock documentation example has compile time error Reviewed-by: martin, psandoz, chegar, shade, plevart
jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java
--- a/jdk/src/java.base/share/classes/java/util/concurrent/locks/ReentrantReadWriteLock.java	Wed Nov 25 18:45:53 2015 -0800
+++ b/jdk/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) {