Commit 41c9e08b authored by David Trott's avatar David Trott

Change dependency from google collections to Guava.

Fixed the usage of the join static to be consistent with the new Guava Pattern.
parent 68720e28
......@@ -84,9 +84,9 @@
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>com.google.collections</groupId>
<artifactId>google-collections</artifactId>
<version>0.8</version>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>15.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
......
......@@ -19,6 +19,7 @@ package org.apache.thrift.maven;
* under the License.
*/
import com.google.common.base.Joiner;
import com.google.common.collect.ImmutableSet;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.repository.ArtifactRepository;
......@@ -40,7 +41,6 @@ import java.util.Set;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import static com.google.common.base.Join.join;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
......@@ -321,9 +321,12 @@ abstract class AbstractThriftMojo extends AbstractMojo {
ImmutableSet<File> findThriftFilesInDirectory(File directory) throws IOException {
checkNotNull(directory);
checkArgument(directory.isDirectory(), "%s is not a directory", directory);
final Joiner joiner = Joiner.on(',');
// TODO(gak): plexus-utils needs generics
@SuppressWarnings("unchecked")
List<File> thriftFilesInDirectory = getFiles(directory, join(",", includes), join(",", excludes));
List<File> thriftFilesInDirectory = getFiles(directory, joiner.join(includes), joiner.join(excludes));
return ImmutableSet.copyOf(thriftFilesInDirectory);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment