8200525: test java/awt/event/SequencedEvent/SequencedEventTest.java fails to compile
authorkaddepalli
Mon, 02 Apr 2018 16:52:11 +0530
changeset 49686 007463851678
parent 49685 26bd5cc412e1
child 49687 23ffd7bf415e
8200525: test java/awt/event/SequencedEvent/SequencedEventTest.java fails to compile Reviewed-by: prr, serb
test/jdk/java/awt/event/SequencedEvent/SequencedEventTest.java
--- 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);