changeset 49686:007463851678

8200525: test java/awt/event/SequencedEvent/SequencedEventTest.java fails to compile Reviewed-by: prr, serb
author kaddepalli
date Mon, 02 Apr 2018 16:52:11 +0530
parents 26bd5cc412e1
children 23ffd7bf415e
files test/jdk/java/awt/event/SequencedEvent/SequencedEventTest.java
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/awt/event/SequencedEvent/SequencedEventTest.java	Fri Mar 30 13:57:19 2018 -0700
+++ b/test/jdk/java/awt/event/SequencedEvent/SequencedEventTest.java	Mon Apr 02 16:52:11 2018 +0530
@@ -25,7 +25,8 @@
  * @test
  * @bug 8152974
  * @key headful
- * @summary AWT hang occurrs when sequenced events arrive out of sequence
+ * @modules java.desktop/sun.awt
+ * @summary AWT hang occurs when sequenced events arrive out of sequence
  * @run main SequencedEventTest
  */
 import sun.awt.AppContext;
@@ -84,7 +85,8 @@
                     peekEvent(java.awt.event.FocusEvent.FOCUS_LAST + 1);
 
             if (ev != null)
-                throw new RuntimeException("Test case failed!");
+                throw new RuntimeException("Test case failed, since all the sequenced events" +
+                "are not flushed!" + ev);
         } catch (InterruptedException e) {
             throw new RuntimeException("Test case failed." + e.getMessage());
         }
@@ -163,7 +165,7 @@
              */
             Class<? extends AWTEvent> seqClass = (Class<? extends AWTEvent>) Class.forName("java.awt.SequencedEvent");
             Constructor<? extends AWTEvent> seqConst = seqClass.getConstructor(AWTEvent.class);
-            seqConst.setAccessible(true);;
+            seqConst.setAccessible(true);
             return seqConst.newInstance(wrapMe);
         } catch (Throwable err) {
             throw new RuntimeException("Unable to instantiate SequencedEvent",err);