158159160161162163164165166167168
return null; } } } finally { pool.drain(); } } /**
354355356357358359360361362363364
// No Hearthstone window was found return 0; } finally { pool.drain(); } } @Override
405406407408409410411412413414415
} } catch (Exception ex) { ex.printStackTrace(System.err); throw new RuntimeException("Unable to find program " + bundleIdentifier + " due to exception", ex); } finally { pool.drain(); } return 0; }
469470471472473474475476477478479
return new Rectangle(x, y, width, height); } } } finally { pool.drain(); } // Couldn't find the Hearthstone window so return null... this will break the calling code. debugLog.warn("Unable to find position of Hearthstone window."); return null;
504505506507508509510511512513514
} } catch (Exception ex) { ex.printStackTrace(System.err); throw new RuntimeException("Unable to find program " + _bundleIdentifier + " due to exception", ex); } finally { pool.drain(); } return false; } }
2627282930313233343536
NSUserNotificationCenter defaultNotificationCenter = NSUserNotificationCenter.CLASS.defaultUserNotificationCenter(); defaultNotificationCenter.setDelegate(defaultNotificationCenter); defaultNotificationCenter.deliverNotification(nsUserNotification); } finally { pool.drain(); } }
41424344454647484950
final NSAutoreleasePool pool = NSAutoreleasePool.new_(); try { NSUserNotificationCenter defaultNotificationCenter = NSUserNotificationCenter.CLASS.defaultUserNotificationCenter(); defaultNotificationCenter.removeAllDeliveredNotifications(); } finally { pool.drain(); } } }