Skip to content

Commit 6832476

Browse files
committed
Fix warning:
Type safety: A generic array of Comparator<File> is created for a varargs parameter git-svn-id: https://svn.apache.org/repos/asf/commons/proper/io/trunk@1441284 13f79535-47bb-0310-9956-ffa450edef68
1 parent f42abad commit 6832476

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/test/java/org/apache/commons/io/comparator/CompositeFileComparatorTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ public CompositeFileComparatorTest(final String name) {
3939
@Override
4040
protected void setUp() throws Exception {
4141
super.setUp();
42-
comparator = new CompositeFileComparator(SizeFileComparator.SIZE_COMPARATOR,
43-
ExtensionFileComparator.EXTENSION_COMPARATOR);
42+
comparator = new CompositeFileComparator(
43+
new AbstractFileComparator[] {
44+
SizeFileComparator.SIZE_COMPARATOR,
45+
ExtensionFileComparator.EXTENSION_COMPARATOR});
4446
reverse = new ReverseComparator(comparator);
4547
final File dir = getTestDirectory();
4648
lessFile = new File(dir, "xyz.txt");

0 commit comments

Comments
 (0)