Skip to content

Commit

Permalink
Addded assertions on parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Aug 29, 2013
1 parent 6d99d5f commit 8a65cb9
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.jboss.forge.addon.projects.Project;
import org.jboss.forge.addon.projects.spi.ProjectCache;
import org.jboss.forge.addon.resource.DirectoryResource;
import org.jboss.forge.furnace.util.Assert;

/**
* A simple in-memory {@link ProjectCache}.
Expand All @@ -28,6 +29,7 @@ public class InMemoryProjectCache implements ProjectCache
@Override
public Project get(DirectoryResource dir)
{
Assert.notNull(dir, "Directory Resource should not be null");
return projects.get(dir.getFullyQualifiedName());
}

Expand All @@ -40,6 +42,7 @@ public void invalidate()
@Override
public void store(Project project)
{
Assert.notNull(project, "Project should not be null");
this.projects.put(project.getProjectRoot().getFullyQualifiedName(), project);
}

Expand Down

0 comments on commit 8a65cb9

Please sign in to comment.