changeset 1069:3a9ae1117c12

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>
author anthony
date Tue, 31 Mar 2009 18:47:31 +0400
parents 9d26016be6fa
children 1cb2e3e0631f
files test/java/awt/Component/isLightweightCrash/StubPeerCrash.java test/java/awt/EventQueue/6638195/bug6638195.java
diffstat 2 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java	Mon Mar 30 16:33:39 2009 +0400
+++ b/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/test/java/awt/EventQueue/6638195/bug6638195.java	Mon Mar 30 16:33:39 2009 +0400
+++ b/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>();