# HG changeset patch
# User Andrew John Hughes <ahughes@redhat.com>
# Date 1238451595 -3600
# Node ID 111759f6793eb028d576d4c8c888af69ca5ea926
# Parent  8306f3df15ff9a6d6fdfab4e3d7cc638339f8ff2
Fix for bug 100012 (https://bugs.openjdk.java.net/show_bug.cgi?id=100012).

 * jdk/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java:
   Add missing arguments to implementation of
   flip(int,int,int,int,FlipContents).
 * jdk/test/java/awt/EventQueue/6638195/bug6638195.java:
   Handle InterruptedException by wrapping in and throwing
   a RuntimeException.

diff --git a/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java b/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java
--- a/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java
+++ b/test/java/awt/Component/isLightweightCrash/StubPeerCrash.java
@@ -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(){};
 
     /**
diff --git a/test/java/awt/EventQueue/6638195/bug6638195.java b/test/java/awt/EventQueue/6638195/bug6638195.java
--- a/test/java/awt/EventQueue/6638195/bug6638195.java
+++ b/test/java/awt/EventQueue/6638195/bug6638195.java
@@ -76,9 +76,14 @@
         Callable<Void> afterDispatchCallable =
             new Callable<Void>() {
                 public Void call() {
+		  try {
                     delegate.afterDispatch(afterDispatchEventArgument[0],
                                            afterDispatchHandleArgument[0]);
-                    return null;
+		  }
+		  catch (InterruptedException e) { 
+		    throw new RuntimeException("afterDispatch interrupted", e);
+		  }
+		  return null;
                 }
             };
         methodMap = new HashMap<String, Object>();
@@ -91,8 +96,13 @@
         Callable<Object> beforeDispatchCallable =
             new Callable<Object>() {
                 public Object call() {
+		  try {
                     return delegate.beforeDispatch(
                         beforeDispatchEventArgument[0]);
+		  }
+		  catch (InterruptedException e) {
+		    throw new RuntimeException("beforeDispatch interrupted", e);
+		  }
                 }
             };
         methodMap = new HashMap<String, Object>();
