From commits-return-23493-apmail-commons-commits-archive=commons.apache.org@commons.apache.org Wed Nov 9 14:26:32 2011 Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E6A1272E3 for ; Wed, 9 Nov 2011 14:26:31 +0000 (UTC) Received: (qmail 68734 invoked by uid 500); 9 Nov 2011 14:26:31 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 68676 invoked by uid 500); 9 Nov 2011 14:26:31 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 68669 invoked by uid 99); 9 Nov 2011 14:26:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2011 14:26:31 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Nov 2011 14:26:30 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2D42F23889DA for ; Wed, 9 Nov 2011 14:26:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1199769 - /commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Date: Wed, 09 Nov 2011 14:26:10 -0000 To: commits@commons.apache.org From: ebourg@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111109142610.2D42F23889DA@eris.apache.org> Author: ebourg Date: Wed Nov 9 14:26:09 2011 New Revision: 1199769 URL: http://svn.apache.org/viewvc?rev=1199769&view=rev Log: Changed the visibility of the Token types and the protected methods to package private Modified: commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Modified: commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java URL: http://svn.apache.org/viewvc/commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1199769&r1=1199768&r2=1199769&view=diff ============================================================================== --- commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java (original) +++ commons/sandbox/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Wed Nov 9 14:26:09 2011 @@ -21,6 +21,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.util.ArrayList; +import java.util.List; /** @@ -51,32 +52,23 @@ import java.util.ArrayList; */ public class CSVParser { - /** - * length of the initial token (content-)buffer - */ + /** length of the initial token (content-)buffer */ private static final int INITIAL_TOKEN_LENGTH = 50; // the token types - /** - * Token has no valid content, i.e. is in its initialized state. - */ - protected static final int TT_INVALID = -1; - /** - * Token with content, at beginning or in the middle of a line. - */ - protected static final int TT_TOKEN = 0; - /** - * Token (which can have content) when end of file is reached. - */ - protected static final int TT_EOF = 1; - /** - * Token with content when end of a line is reached. - */ - protected static final int TT_EORECORD = 2; + /** Token has no valid content, i.e. is in its initialized state. */ + static final int TT_INVALID = -1; + + /** Token with content, at beginning or in the middle of a line. */ + static final int TT_TOKEN = 0; + + /** Token (which can have content) when end of file is reached. */ + static final int TT_EOF = 1; + + /** Token with content when end of a line is reached. */ + static final int TT_EORECORD = 2; - /** - * Immutable empty String array. - */ + /** Immutable empty String array. */ private static final String[] EMPTY_STRING_ARRAY = new String[0]; // the input stream @@ -88,7 +80,7 @@ public class CSVParser { /** * A record buffer for getLine(). Grows as necessary and is reused. */ - private final ArrayList record = new ArrayList(); + private final List record = new ArrayList(); private final Token reusableToken = new Token(); private final CharBuffer wsBuf = new CharBuffer(); private final CharBuffer code = new CharBuffer(4); @@ -202,7 +194,7 @@ public class CSVParser { * @throws IOException on parse error or input read-failure */ public String[][] getAllValues() throws IOException { - ArrayList records = new ArrayList(); + List records = new ArrayList(); String[] values; String[][] ret = null; while ((values = getLine()) != null) { @@ -307,7 +299,7 @@ public class CSVParser { /** * Convenience method for nextToken(null). */ - protected Token nextToken() throws IOException { + Token nextToken() throws IOException { return nextToken(new Token()); } @@ -322,7 +314,7 @@ public class CSVParser { * @return the next token found * @throws IOException on stream access error */ - protected Token nextToken(Token tkn) throws IOException { + Token nextToken(Token tkn) throws IOException { wsBuf.clear(); // reuse // get the last read char (required for empty line detection) @@ -538,7 +530,7 @@ public class CSVParser { * @return the decoded character * @throws IOException on wrong unicode escape sequence or read error */ - protected int unicodeEscapeLexer(int c) throws IOException { + private int unicodeEscapeLexer(int c) throws IOException { int ret = 0; // ignore 'u' (assume c==\ now) and read 4 hex digits c = in.read();