From 4bc562f47b46372a5ac11498fe5312846dedded4 Mon Sep 17 00:00:00 2001 From: "Gary D. Gregory" Date: Thu, 11 Oct 2012 14:02:33 +0000 Subject: [PATCH] Organize imports. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1397059 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/csv/CSVLexer.java | 8 ++++++-- src/main/java/org/apache/commons/csv/CSVParser.java | 1 - src/main/java/org/apache/commons/csv/Token.java | 2 +- .../java/org/apache/commons/csv/CSVFormatTest.java | 8 ++++++-- src/test/java/org/apache/commons/csv/CSVLexer1.java | 6 ++++-- .../java/org/apache/commons/csv/CSVLexer1306663.java | 8 ++++++-- .../java/org/apache/commons/csv/CSVLexer1306667.java | 8 ++++++-- src/test/java/org/apache/commons/csv/CSVLexer3.java | 8 ++++++-- .../java/org/apache/commons/csv/CSVLexerTest.java | 12 +++++++++--- .../java/org/apache/commons/csv/CSVParserTest.java | 10 ++++++++-- .../java/org/apache/commons/csv/CSVPrinterTest.java | 4 ++-- .../commons/csv/ExtendedBufferedReaderTest.java | 6 ++++-- 12 files changed, 58 insertions(+), 23 deletions(-) diff --git a/src/main/java/org/apache/commons/csv/CSVLexer.java b/src/main/java/org/apache/commons/csv/CSVLexer.java index 02e2f860..a17d274e 100644 --- a/src/main/java/org/apache/commons/csv/CSVLexer.java +++ b/src/main/java/org/apache/commons/csv/CSVLexer.java @@ -17,9 +17,13 @@ package org.apache.commons.csv; -import java.io.IOException; +import static org.apache.commons.csv.Token.Type.COMMENT; +import static org.apache.commons.csv.Token.Type.EOF; +import static org.apache.commons.csv.Token.Type.EORECORD; +import static org.apache.commons.csv.Token.Type.INVALID; +import static org.apache.commons.csv.Token.Type.TOKEN; -import static org.apache.commons.csv.Token.Type.*; +import java.io.IOException; class CSVLexer extends Lexer { diff --git a/src/main/java/org/apache/commons/csv/CSVParser.java b/src/main/java/org/apache/commons/csv/CSVParser.java index e8b03734..302dbf00 100644 --- a/src/main/java/org/apache/commons/csv/CSVParser.java +++ b/src/main/java/org/apache/commons/csv/CSVParser.java @@ -23,7 +23,6 @@ import java.io.IOException; import java.io.Reader; import java.io.StringReader; import java.util.ArrayList; -import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; diff --git a/src/main/java/org/apache/commons/csv/Token.java b/src/main/java/org/apache/commons/csv/Token.java index 0ceff9e3..de3f2a9e 100644 --- a/src/main/java/org/apache/commons/csv/Token.java +++ b/src/main/java/org/apache/commons/csv/Token.java @@ -17,7 +17,7 @@ package org.apache.commons.csv; -import static org.apache.commons.csv.Token.Type.*; +import static org.apache.commons.csv.Token.Type.INVALID; /** * Token is an internal token representation. diff --git a/src/test/java/org/apache/commons/csv/CSVFormatTest.java b/src/test/java/org/apache/commons/csv/CSVFormatTest.java index 2057871f..e72d7c50 100644 --- a/src/test/java/org/apache/commons/csv/CSVFormatTest.java +++ b/src/test/java/org/apache/commons/csv/CSVFormatTest.java @@ -17,6 +17,12 @@ package org.apache.commons.csv; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -24,8 +30,6 @@ import java.io.ObjectOutputStream; import org.junit.Test; -import static org.junit.Assert.*; - public class CSVFormatTest { @Test diff --git a/src/test/java/org/apache/commons/csv/CSVLexer1.java b/src/test/java/org/apache/commons/csv/CSVLexer1.java index 460ab277..022bc078 100644 --- a/src/test/java/org/apache/commons/csv/CSVLexer1.java +++ b/src/test/java/org/apache/commons/csv/CSVLexer1.java @@ -17,9 +17,11 @@ package org.apache.commons.csv; -import java.io.IOException; +import static org.apache.commons.csv.Token.Type.EOF; +import static org.apache.commons.csv.Token.Type.EORECORD; +import static org.apache.commons.csv.Token.Type.TOKEN; -import static org.apache.commons.csv.Token.Type.*; +import java.io.IOException; class CSVLexer1 extends Lexer { diff --git a/src/test/java/org/apache/commons/csv/CSVLexer1306663.java b/src/test/java/org/apache/commons/csv/CSVLexer1306663.java index 5c84a53b..54410ea5 100644 --- a/src/test/java/org/apache/commons/csv/CSVLexer1306663.java +++ b/src/test/java/org/apache/commons/csv/CSVLexer1306663.java @@ -17,9 +17,13 @@ package org.apache.commons.csv; -import java.io.IOException; +import static org.apache.commons.csv.Token.Type.COMMENT; +import static org.apache.commons.csv.Token.Type.EOF; +import static org.apache.commons.csv.Token.Type.EORECORD; +import static org.apache.commons.csv.Token.Type.INVALID; +import static org.apache.commons.csv.Token.Type.TOKEN; -import static org.apache.commons.csv.Token.Type.*; +import java.io.IOException; class CSVLexer1306663 extends Lexer { diff --git a/src/test/java/org/apache/commons/csv/CSVLexer1306667.java b/src/test/java/org/apache/commons/csv/CSVLexer1306667.java index 5d5ef13b..a04ec12a 100644 --- a/src/test/java/org/apache/commons/csv/CSVLexer1306667.java +++ b/src/test/java/org/apache/commons/csv/CSVLexer1306667.java @@ -17,9 +17,13 @@ package org.apache.commons.csv; -import java.io.IOException; +import static org.apache.commons.csv.Token.Type.COMMENT; +import static org.apache.commons.csv.Token.Type.EOF; +import static org.apache.commons.csv.Token.Type.EORECORD; +import static org.apache.commons.csv.Token.Type.INVALID; +import static org.apache.commons.csv.Token.Type.TOKEN; -import static org.apache.commons.csv.Token.Type.*; +import java.io.IOException; class CSVLexer1306667 extends Lexer { diff --git a/src/test/java/org/apache/commons/csv/CSVLexer3.java b/src/test/java/org/apache/commons/csv/CSVLexer3.java index c49e1ca6..c952625e 100644 --- a/src/test/java/org/apache/commons/csv/CSVLexer3.java +++ b/src/test/java/org/apache/commons/csv/CSVLexer3.java @@ -17,9 +17,13 @@ package org.apache.commons.csv; -import java.io.IOException; +import static org.apache.commons.csv.Token.Type.COMMENT; +import static org.apache.commons.csv.Token.Type.EOF; +import static org.apache.commons.csv.Token.Type.EORECORD; +import static org.apache.commons.csv.Token.Type.INVALID; +import static org.apache.commons.csv.Token.Type.TOKEN; -import static org.apache.commons.csv.Token.Type.*; +import java.io.IOException; /** * Experimental Lexer using enums to keep track of state and character type. diff --git a/src/test/java/org/apache/commons/csv/CSVLexerTest.java b/src/test/java/org/apache/commons/csv/CSVLexerTest.java index 5dd6d321..5ce2fdb3 100644 --- a/src/test/java/org/apache/commons/csv/CSVLexerTest.java +++ b/src/test/java/org/apache/commons/csv/CSVLexerTest.java @@ -17,14 +17,20 @@ package org.apache.commons.csv; +import static org.apache.commons.csv.Token.Type.COMMENT; +import static org.apache.commons.csv.Token.Type.EOF; +import static org.apache.commons.csv.Token.Type.EORECORD; +import static org.apache.commons.csv.Token.Type.TOKEN; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.io.IOException; import java.io.StringReader; import org.junit.Test; -import static org.apache.commons.csv.Token.Type.*; -import static org.junit.Assert.*; - public class CSVLexerTest { private Lexer getLexer(String input, CSVFormat format) { diff --git a/src/test/java/org/apache/commons/csv/CSVParserTest.java b/src/test/java/org/apache/commons/csv/CSVParserTest.java index 0940e2ba..661d0257 100644 --- a/src/test/java/org/apache/commons/csv/CSVParserTest.java +++ b/src/test/java/org/apache/commons/csv/CSVParserTest.java @@ -17,6 +17,14 @@ package org.apache.commons.csv; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; + import java.io.IOException; import java.io.Reader; import java.io.StringReader; @@ -31,8 +39,6 @@ import junit.framework.Assert; import org.junit.Ignore; import org.junit.Test; -import static org.junit.Assert.*; - /** * CSVParserTest * diff --git a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java index 739d4b5f..f542c465 100644 --- a/src/test/java/org/apache/commons/csv/CSVPrinterTest.java +++ b/src/test/java/org/apache/commons/csv/CSVPrinterTest.java @@ -17,6 +17,8 @@ package org.apache.commons.csv; +import static org.junit.Assert.assertEquals; + import java.io.IOException; import java.io.StringWriter; import java.util.List; @@ -24,8 +26,6 @@ import java.util.Random; import org.junit.Test; -import static org.junit.Assert.*; - public class CSVPrinterTest { String lineSeparator = CSVFormat.DEFAULT.getLineSeparator(); diff --git a/src/test/java/org/apache/commons/csv/ExtendedBufferedReaderTest.java b/src/test/java/org/apache/commons/csv/ExtendedBufferedReaderTest.java index 6e829be7..a296f6dd 100644 --- a/src/test/java/org/apache/commons/csv/ExtendedBufferedReaderTest.java +++ b/src/test/java/org/apache/commons/csv/ExtendedBufferedReaderTest.java @@ -17,12 +17,14 @@ package org.apache.commons.csv; +import static org.junit.Assert.assertArrayEquals; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + import java.io.StringReader; import org.junit.Test; -import static org.junit.Assert.*; - public class ExtendedBufferedReaderTest { @Test