Merge
authorvaleriep
Wed, 02 Apr 2014 12:20:01 +0000
changeset 23705 6dbe0ae69dc3
parent 23704 c174349fcd4b (current diff)
parent 23703 8f6d9fbd6834 (diff)
child 23706 5ea287e13cdb
Merge
--- a/jdk/src/share/classes/java/beans/SimpleBeanInfo.java	Wed Apr 02 12:19:11 2014 +0000
+++ b/jdk/src/share/classes/java/beans/SimpleBeanInfo.java	Wed Apr 02 12:20:01 2014 +0000
@@ -108,7 +108,7 @@
      * It takes the name of a resource file associated with the
      * current object's class file and loads an image object
      * from that file.  Typically images will be GIFs.
-     * <p>
+     *
      * @param resourceName  A pathname relative to the directory
      *          holding the class file of the current class.  For example,
      *          "wombat.gif".
--- a/jdk/src/share/classes/java/beans/beancontext/BeanContextChildSupport.java	Wed Apr 02 12:19:11 2014 +0000
+++ b/jdk/src/share/classes/java/beans/beancontext/BeanContextChildSupport.java	Wed Apr 02 12:20:01 2014 +0000
@@ -262,7 +262,7 @@
      * the PropertyVetoException. <P>
      *
      * No event is fired if old and new are equal and non-null.
-     * <P>
+     *
      * @param name The programmatic name of the property that is about to
      * change
      *
--- a/jdk/src/share/classes/java/beans/package.html	Wed Apr 02 12:19:11 2014 +0000
+++ b/jdk/src/share/classes/java/beans/package.html	Wed Apr 02 12:20:01 2014 +0000
@@ -150,7 +150,6 @@
   <li><a href="http://java.sun.com/docs/books/tutorial/javabeans/">JavaBeans</a>, a trail in <em>The Java Tutorial</em>.
   <li><a href="http://java.sun.com/products/jfc/tsc/articles/persistence2/">Long-Term Persistence</a>, an article in <em>The Swing Connection</em>.
 </ul>
-<p>
 
 </body>
 </html>
--- a/jdk/test/java/lang/ref/EarlyTimeout.java	Wed Apr 02 12:19:11 2014 +0000
+++ b/jdk/test/java/lang/ref/EarlyTimeout.java	Wed Apr 02 12:20:01 2014 +0000
@@ -37,7 +37,7 @@
 /**
  * In order to demonstrate the issue we make several threads (two appears to be sufficient)
  * to block in ReferenceQueue#remove(timeout) at the same time.
- * Then, we force a reference to be enqueued by setting its referent to null and calling System.gs().
+ * Then, we force a reference to be enqueued by setting its referent to null and calling System.gc().
  * One of the threads gets the reference returned from the remove().
  * The other threads get null:
  * 1) with bug:  this may happen before the specified timeout is elapsed,
@@ -63,7 +63,10 @@
             threads[i] = new EarlyTimeout();
             threads[i].start();
         }
+        // The main thread waits until the threads has started and give it a chance
+        // for the threads to block on the queue.remove(TIMEOUT) call
         startedSignal.await();
+        Thread.sleep(TIMEOUT / 2);
         referent = null;
         System.gc();
         for (EarlyTimeout thread : threads) {
@@ -82,7 +85,7 @@
                 nonNullRefCount++;
             }
         }
-        if (nonNullRefCount != 1) {
+        if (nonNullRefCount > 1) {
             throw new RuntimeException("more than one references were removed from queue");
         }
     }