commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject commons-compress git commit: [COMPRESS-368]
Date Wed, 16 Nov 2016 04:59:49 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master adf0f2a79 -> f98b32e49


[COMPRESS-368] 

Allow compressor extensions through a standard JRE ServiceLoader.
Refactor common code.

Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/f98b32e4
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/f98b32e4
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/f98b32e4

Branch: refs/heads/master
Commit: f98b32e499d502def4cc5b86b859462bbd030a79
Parents: adf0f2a
Author: Gary Gregory <ggregory@apache.org>
Authored: Tue Nov 15 20:59:46 2016 -0800
Committer: Gary Gregory <ggregory@apache.org>
Committed: Tue Nov 15 20:59:46 2016 -0800

----------------------------------------------------------------------
 .../compressors/TestCompressorStreamProvider.java     | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/f98b32e4/src/test/java/org/apache/commons/compress/compressors/TestCompressorStreamProvider.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/compressors/TestCompressorStreamProvider.java
b/src/test/java/org/apache/commons/compress/compressors/TestCompressorStreamProvider.java
index 1a50727..52092d2 100644
--- a/src/test/java/org/apache/commons/compress/compressors/TestCompressorStreamProvider.java
+++ b/src/test/java/org/apache/commons/compress/compressors/TestCompressorStreamProvider.java
@@ -21,10 +21,10 @@ package org.apache.commons.compress.compressors;
 
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.util.Collections;
-import java.util.HashSet;
 import java.util.Set;
 
+import org.apache.commons.compress.utils.Sets;
+
 public class TestCompressorStreamProvider implements CompressorStreamProvider {
 
     public static final class InvocationConfirmationException extends CompressorException
{
@@ -35,7 +35,7 @@ public class TestCompressorStreamProvider implements CompressorStreamProvider
{
             super(message);
         }
     }
-    
+
     @Override
     public CompressorInputStream createCompressorInputStream(String name, InputStream in)
throws CompressorException {
         throw new InvocationConfirmationException(name);
@@ -49,16 +49,12 @@ public class TestCompressorStreamProvider implements CompressorStreamProvider
{
 
     @Override
     public Set<String> getInputStreamCompressorNames() {
-        HashSet<String> set = new HashSet<>();
-        Collections.addAll(set, "TestInput1");
-        return set;
+        return Sets.newHashSet("TestInput1");
     }
 
     @Override
     public Set<String> getOutputStreamCompressorNames() {
-        HashSet<String> set = new HashSet<>();
-        Collections.addAll(set, "TestOutput1");
-        return set;
+        return Sets.newHashSet("TestOutput1");
     }
 
 }


Mime
View raw message