Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Last active December 11, 2015 07:18
Show Gist options
  • Select an option

  • Save edipofederle/4564978 to your computer and use it in GitHub Desktop.

Select an option

Save edipofederle/4564978 to your computer and use it in GitHub Desktop.
// Code From Clean Code Book
public void registerItem(Item item) {
if (item != null) {
ItemRegistry registry = peristentStore.getItemRegistry();
if (registry != null) {
Item existing = registry.getItem(item.getID());
if (existing.getBillingPeriod().hasRetailOwner()) {
existing.register(item);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment