Skip to content

Commit

Permalink
MODE-1129 Eliminated dependency on Google Collections
Browse files Browse the repository at this point in the history
Created a Multimap interface and several implementations to replace the corresponding classes in the Google Collections library. Also added unit tests, and all uses of Google Collections were changed to the new ModeShape multimap classes.

All unit and integration tests pass with these changes.
  • Loading branch information
rhauch committed Apr 14, 2011
1 parent bfbf241 commit 9fe63a1
Show file tree
Hide file tree
Showing 36 changed files with 3,650 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

<!-- 3rd party dependencies required by the ModeShape JCR engine -->
<include>joda-time:joda-time</include>
<include>com.google.collections:google-collections</include>
<include>org.apache.lucene:lucene-core</include>
<include>org.apache.lucene:lucene-analyzers</include>
<include>org.apache.lucene:lucene-snowball</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ deploy/modeshape-jboss-beans.xml
deploy/modeshape-services.jar/
deploy/modeshape-services.jar/META-INF/
deploy/modeshape-services.jar/aperture-1.1.0.Beta1.jar
deploy/modeshape-services.jar/google-collections-1.0.jar
deploy/modeshape-services.jar/joda-time-1.6.jar
deploy/modeshape-services.jar/lucene-analyzers-3.0.2.jar
deploy/modeshape-services.jar/lucene-core-3.0.2.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ JcrConfiguration config = new JcrConfiguration().loadFrom("/configRepository.xml
<listitem><para>modeshape-common</para></listitem>
<listitem><para>modeshape-graph</para></listitem>
<listitem><para>modeshape-connector-infinispan</para></listitem>
<listitem><para>google-collections</para></listitem>
<listitem><para>joda-time</para></listitem>
</itemizedlist>
Only these libraries contain the classes that are used to store content within Infinispan.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,6 @@ deploy/modeshape-jboss-beans.xml
deploy/modeshape-services.jar/
deploy/modeshape-services.jar/META-INF/
deploy/modeshape-services.jar/aperture-1.1.0.Beta1.jar
deploy/modeshape-services.jar/google-collections-1.0.jar
deploy/modeshape-services.jar/joda-time-1.6.jar
deploy/modeshape-services.jar/lucene-analyzers-3.0.2.jar
deploy/modeshape-services.jar/lucene-core-3.0.2.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
| + log4j.properties (Optional)
+ /lib
| + aperture-1.1.0.Beta1.jar
| + google-collections-1.0.jar
| + hamcrest-core-1.1.jar
| + jakarta-regexp-1.4.jar
| + jcr-2.0.jar
Expand Down Expand Up @@ -1075,7 +1074,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/ma
| + activation-1.1.jar
| + commons-codec-1.2.jar
| + commons-httpclient-3.1.jar
| + google-collections-1.0.jar
| + hamcrest-core-1.1.jar
| + httpclient-4.0.jar
| + httpcore-4.0.1.jar
Expand Down
4 changes: 0 additions & 4 deletions extensions/modeshape-connector-store-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
</dependency>
<!--
Testing (note the scope)
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.modeshape.common.collection.LinkedListMultimap;
import org.modeshape.connector.store.jpa.JpaConnectorI18n;
import org.modeshape.connector.store.jpa.JpaSource;
import org.modeshape.graph.ExecutionContext;
Expand All @@ -20,7 +21,6 @@
import org.modeshape.graph.request.InvalidRequestException;
import org.modeshape.graph.request.ReadBranchRequest;
import org.modeshape.graph.request.processor.RequestProcessor;
import com.google.common.collect.LinkedListMultimap;

/**
* Extension of the {@link MapRequestProcessor} that provides a {@link #process(ReadBranchRequest)} implementation optimized for
Expand Down
4 changes: 0 additions & 4 deletions extensions/modeshape-search-lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@
<artifactId>lucene-misc</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
</dependency>
<!--
Testing (note the scope)
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import org.modeshape.common.collection.HashMultimap;
import org.modeshape.common.collection.Multimap;

public class LuceneConfigurationsTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.modeshape.common.collection.ArrayListMultimap;
import org.modeshape.common.collection.Multimap;
import org.modeshape.common.collection.Problems;
import org.modeshape.common.collection.SimpleProblems;
import org.modeshape.common.i18n.I18n;
Expand All @@ -43,8 +45,6 @@
import org.modeshape.graph.property.basic.LocalNamespaceRegistry;
import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;

/**
* Utility class to generate a CND file from an ECore model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import java.util.HashSet;
import java.util.Map;
import java.util.UUID;
import org.modeshape.common.collection.ArrayListMultimap;
import org.modeshape.common.collection.Multimap;
import org.modeshape.common.text.Jsr283Encoder;
import org.modeshape.common.text.TextEncoder;
import org.modeshape.graph.ExecutionContext;
Expand All @@ -40,8 +42,6 @@
import org.modeshape.graph.property.ValueFactories;
import org.modeshape.graph.property.ValueFactory;
import org.modeshape.graph.property.ValueFormatException;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import java.util.Set;
import java.util.UUID;
import org.modeshape.common.annotation.NotThreadSafe;
import org.modeshape.common.collection.ArrayListMultimap;
import org.modeshape.common.collection.Multimap;
import org.modeshape.common.text.Jsr283Encoder;
import org.modeshape.common.text.TextEncoder;
import org.modeshape.graph.JcrLexicon;
Expand All @@ -58,8 +60,6 @@
import org.modeshape.sequencer.teiid.lexicon.VdbLexicon;
import org.modeshape.sequencer.teiid.lexicon.XmiLexicon;
import org.modeshape.sequencer.teiid.lexicon.XsiLexicon;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;

/**
*
Expand Down
Loading

0 comments on commit 9fe63a1

Please sign in to comment.