Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/test/java/org/apache/commons/csv/CSVFormatTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,28 +166,28 @@ public void testEqualsHash() throws Exception {
for (final Class<?> cls : method.getParameterTypes()) {
final String type = cls.getCanonicalName();
if ("boolean".equals(type)) {
final Object defTrue = method.invoke(CSVFormat.DEFAULT, new Object[] {Boolean.TRUE});
final Object defFalse = method.invoke(CSVFormat.DEFAULT, new Object[] {Boolean.FALSE});
final Object defTrue = method.invoke(CSVFormat.DEFAULT, Boolean.TRUE);
final Object defFalse = method.invoke(CSVFormat.DEFAULT, Boolean.FALSE);
assertNotEquals(name, type ,defTrue, defFalse);
} else if ("char".equals(type)){
final Object a = method.invoke(CSVFormat.DEFAULT, new Object[] {'a'});
final Object b = method.invoke(CSVFormat.DEFAULT, new Object[] {'b'});
final Object a = method.invoke(CSVFormat.DEFAULT, 'a');
final Object b = method.invoke(CSVFormat.DEFAULT, 'b');
assertNotEquals(name, type, a, b);
} else if ("java.lang.Character".equals(type)){
final Object a = method.invoke(CSVFormat.DEFAULT, new Object[] {null});
final Object b = method.invoke(CSVFormat.DEFAULT, new Object[] {new Character('d')});
final Object b = method.invoke(CSVFormat.DEFAULT, new Character('d'));
assertNotEquals(name, type, a, b);
} else if ("java.lang.String".equals(type)){
final Object a = method.invoke(CSVFormat.DEFAULT, new Object[] {null});
final Object b = method.invoke(CSVFormat.DEFAULT, new Object[] {"e"});
final Object b = method.invoke(CSVFormat.DEFAULT, "e");
assertNotEquals(name, type, a, b);
} else if ("java.lang.String[]".equals(type)){
final Object a = method.invoke(CSVFormat.DEFAULT, new Object[] {new String[] {null, null}});
final Object b = method.invoke(CSVFormat.DEFAULT, new Object[] {new String[] {"f", "g"}});
assertNotEquals(name, type, a, b);
} else if ("org.apache.commons.csv.QuoteMode".equals(type)){
final Object a = method.invoke(CSVFormat.DEFAULT, new Object[] {QuoteMode.MINIMAL});
final Object b = method.invoke(CSVFormat.DEFAULT, new Object[] {QuoteMode.ALL});
final Object a = method.invoke(CSVFormat.DEFAULT, QuoteMode.MINIMAL);
final Object b = method.invoke(CSVFormat.DEFAULT, QuoteMode.ALL);
assertNotEquals(name, type, a, b);
} else if ("java.lang.Object[]".equals(type)){
final Object a = method.invoke(CSVFormat.DEFAULT, new Object[] {new Object[] {null, null}});
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/org/apache/commons/csv/CSVPrinterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ public void testExcelPrintAllIterableOfLists() throws IOException {
final StringWriter sw = new StringWriter();
try (final CSVPrinter printer = new CSVPrinter(sw, CSVFormat.EXCEL)) {
printer.printRecords(
Arrays.asList(new List[] { Arrays.asList("r1c1", "r1c2"), Arrays.asList("r2c1", "r2c2") }));
Arrays.asList(Arrays.asList("r1c1", "r1c2"), Arrays.asList("r2c1", "r2c2")));
assertEquals("r1c1,r1c2" + recordSeparator + "r2c1,r2c2" + recordSeparator, sw.toString());
}
}
Expand Down