System.getProperty("java.vm.version"));
for (int i = 0; i < setup.monitorConfigs.length; i++) {
System.out.println("Printing out status of "+ setup.monitorConfigs[i].id);
System.out.println("==================================");
JavaMonitor monitor = (JavaMonitor) setup.monitorConfigs[i].getMonitor();
if (monitor == null) {
System.out.println("monitor = null");
continue;
}
try {
System.out.println("monitor.getName()"+ monitor.getName());
} catch (CorruptDataException e) {
assertNotNull(e.getCorruptData());
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("\nmonitor.getEntersWaiters():");
Iterator enters = monitor.getEnterWaiters().iterator();
while (enters.hasNext()) {
Object next = enters.next();
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());