Hi guys,
here is the fix for:
http://bugs.sun.com/view_bug.do?bug_id=7143070
The main idea was eliminate test freezing on exit.
So synchronization between threads on exit was rewritten.
Patch with changes attached.
Thanks,
Oleg
---
old/test/java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java
2012-02-06 21:34:57.470138200 +0400
+++
new/test/java/awt/print/PaintSetEnabledDeadlock/PaintSetEnabledDeadlock.java
2012-02-06 21:34:56.585087600 +0400
@@ -92,6 +92,7 @@
Image image = null;
Thread thread = null;
volatile boolean active = true;
+ volatile boolean finished = false;
final Object sync = new Object();
Panel panel = this;
@@ -138,6 +139,8 @@
draw();
}
}
+ finished = true;
+ notifyAll();
}
public void stop() {
@@ -146,8 +149,10 @@
synchronized (sync) {
sync.notify();
}
- synchronized (thread) {
- thread.wait();
+ while(!finished) {
+ synchronized (thread) {
+ thread.wait(500);
+ }
}
} catch (InterruptedException ex) {
}