Skip to content

Instantly share code, notes, and snippets.

@MinCha
Created February 14, 2014 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MinCha/8995040 to your computer and use it in GitHub Desktop.
Save MinCha/8995040 to your computer and use it in GitHub Desktop.
Tell, Don`t Ask #1
public class ReadOnlyNotifier {
public List<String> getRelatedServices() {
return null;
}
public boolean notifyToRelatedServices(StopMessage stopMessage) {
return false;
}
}
if (readOnlyNotifier.getRelatedServices().size() > 0) {
if (readOnlyNotifier.notifyToRelatedServices(stopMessage) == false) {
throw new FailedReadOnlyNotificationException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment