if (next instanceof CorruptData) {
System.out.println("enter waiter corrupt: "+ next);
continue;
}
JavaThread thread = (JavaThread) next;
try {
System.out.println("EnterWaiter: "+thread.getName());
} catch (CorruptDataException e) {
assertNotNull(e.getCorruptData());
// TODO Auto-generated catch block
e.printStackTrace();
}
}
System.out.println("\nmonitor.getNotifyWaiters():");
Iterator notifiers = monitor.getNotifyWaiters().iterator();
while (notifiers.hasNext()) {
Object next = notifiers.next();
if (next instanceof CorruptData) {
System.out.println("notify waiter corrupt: "+ next);
continue;
}
JavaThread thread = (JavaThread) next;
try {
System.out.println("NotifyWaiter: "+thread.getName());
} catch (CorruptDataException e) {
assertNotNull(e.getCorruptData());
// TODO Auto-generated catch block
e.printStackTrace();
}
}
JavaThread thread;
try {
thread = monitor.getOwner();
if (thread == null) {
System.out.println("Owner thread = null");
} else {
try {
System.out.println("Owner thread = "+thread.getName());
} catch (CorruptDataException e) {
assertNotNull(e.getCorruptData());
// TODO Auto-generated catch block
e.printStackTrace();
}