6819601: Fix AWT JTReg tests which fail to compile
authoranthony
Tue, 31 Mar 2009 18:47:31 +0400
changeset 2475 a55ae5159045
parent 2474 7fb3026b79d1
child 2476 95a94517f011
6819601: Fix AWT JTReg tests which fail to compile Summary: Fix compilation of tests. Reviewed-by: anthony, son Contributed-by: Andrew John Hughes <ahughes@redhat.com>
jdk/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java
jdk/test/java/awt/EventQueue/6638195/bug6638195.java
--- a/jdk/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java	Mon Mar 30 16:33:39 2009 +0400
+++ b/jdk/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java	Tue Mar 31 18:47:31 2009 +0400
@@ -118,7 +118,7 @@
     public boolean     handlesWheelScrolling(){return true;};
     public void createBuffers(int numBuffers, BufferCapabilities caps) throws AWTException{};
     public Image getBackBuffer(){return null;};
-    public void flip(BufferCapabilities.FlipContents flipAction){};
+    public void flip(int x1, int y1, int x2, int y2, BufferCapabilities.FlipContents flipAction){};
     public void destroyBuffers(){};
 
     /**
--- a/jdk/test/java/awt/EventQueue/6638195/bug6638195.java	Mon Mar 30 16:33:39 2009 +0400
+++ b/jdk/test/java/awt/EventQueue/6638195/bug6638195.java	Tue Mar 31 18:47:31 2009 +0400
@@ -76,8 +76,13 @@
         Callable<Void> afterDispatchCallable =
             new Callable<Void>() {
                 public Void call() {
-                    delegate.afterDispatch(afterDispatchEventArgument[0],
-                                           afterDispatchHandleArgument[0]);
+                    try {
+                        delegate.afterDispatch(afterDispatchEventArgument[0],
+                                afterDispatchHandleArgument[0]);
+                    }
+                    catch (InterruptedException e) {
+                        throw new RuntimeException("afterDispatch interrupted", e);
+                    }
                     return null;
                 }
             };
@@ -91,8 +96,13 @@
         Callable<Object> beforeDispatchCallable =
             new Callable<Object>() {
                 public Object call() {
-                    return delegate.beforeDispatch(
-                        beforeDispatchEventArgument[0]);
+                    try {
+                        return delegate.beforeDispatch(
+                                beforeDispatchEventArgument[0]);
+                    }
+                    catch (InterruptedException e) {
+                        throw new RuntimeException("beforeDispatch interrupted", e);
+                    }
                 }
             };
         methodMap = new HashMap<String, Object>();