Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
Fixing NullPointerException in IndexerGroup init, not being able to f…
Browse files Browse the repository at this point in the history
…ind java.http.Servlet, integration test not working b/c server not started (connection refused)
  • Loading branch information
escowles committed Aug 20, 2013
1 parent f94e6ac commit b8a8bed
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
21 changes: 21 additions & 0 deletions pom.xml
Expand Up @@ -75,6 +75,27 @@
<version>${activemq.version}</version>
</dependency>
<!-- test gear -->
<!-- adding the glassfish/jersey deps fixes problem of missing Java EE classes, but still not getting a server running -->
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2-servlet</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/fcrepo/indexer/IndexerGroup.java
Expand Up @@ -18,6 +18,7 @@

import java.io.IOException;
import java.io.StringReader;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -81,6 +82,9 @@ public void setIndexers(Set indexers) {
for (Iterator it = indexers.iterator(); it.hasNext();) {
Object o = it.next();
if (o instanceof Indexer) {
if (this.indexers == null) {
this.indexers = new HashSet<Indexer>();
}
this.indexers.add( (Indexer)o );
}
}
Expand Down

0 comments on commit b8a8bed

Please sign in to comment.