Skip to content

Instantly share code, notes, and snippets.

@hakanai
Created August 2, 2010 04:43
Show Gist options
  • Select an option

  • Save hakanai/504115 to your computer and use it in GitHub Desktop.

Select an option

Save hakanai/504115 to your computer and use it in GitHub Desktop.
//
// Find the bug. :-)
//
interface HeavyLifting {
void doSomeBlockingStuff() throws InterruptedException;
}
// meanwhile, somewhere else in the universe:
class MyUsefulUtility {
private final HeavyLifting lifter;
public MyUsefulUtility(HeavyLifting lifter) {
this.lifter = lifter;
}
public void liftStuff() {
try {
lifter.doSomeBlockingStuff();
} catch (Exception e) {
Logger.getLogger(getClass()).error("It didn't work, bro.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment