[1/2] PHOENIX-105 Remove commons-csv source

2014-09-02 Thread greid
Repository: phoenix
Updated Branches:
  refs/heads/master 4774c6332 - c36973263


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c3697326/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java
--
diff --git a/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java 
b/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java
deleted file mode 100644
index 95cf13d..000
--- a/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.csv;
-
-import static org.apache.commons.csv.Constants.BACKSPACE;
-import static org.apache.commons.csv.Constants.CR;
-import static org.apache.commons.csv.Constants.END_OF_STREAM;
-import static org.apache.commons.csv.Constants.FF;
-import static org.apache.commons.csv.Constants.LF;
-import static org.apache.commons.csv.Constants.TAB;
-import static org.apache.commons.csv.Constants.UNDEFINED;
-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 java.io.IOException;
-
-/**
- *
- *
- * @version $Id: Lexer.java 1512650 2013-08-10 11:46:28Z britter $
- */
-final class Lexer {
-
-/**
- * Constant char to use for disabling comments, escapes and encapsulation. 
The value -2 is used because it
- * won't be confused with an EOF signal (-1), and because the Unicode 
value {@code FFFE} would be encoded as two
- * chars (using surrogates) and thus there should never be a collision 
with a real text char.
- */
-private static final char DISABLED = '\ufffe';
-
-private final char delimiter;
-private final char escape;
-private final char quoteChar;
-private final char commentStart;
-
-private final boolean ignoreSurroundingSpaces;
-private final boolean ignoreEmptyLines;
-
-/** The input stream */
-private final ExtendedBufferedReader in;
-
-/** INTERNAL API. but ctor needs to be called dynamically by 
PerformanceTest class */
-Lexer(final CSVFormat format, final ExtendedBufferedReader in) {
-this.in = in;
-this.delimiter = format.getDelimiter();
-this.escape = mapNullToDisabled(format.getEscape());
-this.quoteChar = mapNullToDisabled(format.getQuoteChar());
-this.commentStart = mapNullToDisabled(format.getCommentStart());
-this.ignoreSurroundingSpaces = format.getIgnoreSurroundingSpaces();
-this.ignoreEmptyLines = format.getIgnoreEmptyLines();
-}
-
-/**
- * Returns the next token.
- * p/
- * A token corresponds to a term, a record change or an end-of-file 
indicator.
- *
- * @param token
- *an existing Token object to reuse. The caller is responsible 
to initialize the Token.
- * @return the next token found
- * @throws java.io.IOException
- * on stream access error
- */
-Token nextToken(final Token token) throws IOException {
-
-// get the last read char (required for empty line detection)
-int lastChar = in.getLastChar();
-
-// read the next char and set eol
-int c = in.read();
-/*
- * Note: The following call will swallow LF if c == CR. But we don't 
need to know if the last char was CR or LF
- * - they are equivalent here.
- */
-boolean eol = readEndOfLine(c);
-
-// empty line detection: eol AND (last char was EOL or beginning)
-if (ignoreEmptyLines) {
-while (eol  isStartOfLine(lastChar)) {
-// go on char ahead ...
-lastChar = c;
-c = in.read();
-eol = readEndOfLine(c);
-// reached end of file without any content (empty line at the 
end)
-if (isEndOfFile(c)) {
-token.type = EOF;
-// don't set token.isReady here because no content
-return token;
- 

[1/2] PHOENIX-105 Remove commons-csv source

2014-09-02 Thread greid
Repository: phoenix
Updated Branches:
  refs/heads/3.0 b5cbb79b6 - 8e19e68bb


http://git-wip-us.apache.org/repos/asf/phoenix/blob/8e19e68b/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java
--
diff --git a/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java 
b/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java
deleted file mode 100644
index 95cf13d..000
--- a/phoenix-core/src/main/java/org/apache/commons/csv/Lexer.java
+++ /dev/null
@@ -1,431 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the License); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.csv;
-
-import static org.apache.commons.csv.Constants.BACKSPACE;
-import static org.apache.commons.csv.Constants.CR;
-import static org.apache.commons.csv.Constants.END_OF_STREAM;
-import static org.apache.commons.csv.Constants.FF;
-import static org.apache.commons.csv.Constants.LF;
-import static org.apache.commons.csv.Constants.TAB;
-import static org.apache.commons.csv.Constants.UNDEFINED;
-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 java.io.IOException;
-
-/**
- *
- *
- * @version $Id: Lexer.java 1512650 2013-08-10 11:46:28Z britter $
- */
-final class Lexer {
-
-/**
- * Constant char to use for disabling comments, escapes and encapsulation. 
The value -2 is used because it
- * won't be confused with an EOF signal (-1), and because the Unicode 
value {@code FFFE} would be encoded as two
- * chars (using surrogates) and thus there should never be a collision 
with a real text char.
- */
-private static final char DISABLED = '\ufffe';
-
-private final char delimiter;
-private final char escape;
-private final char quoteChar;
-private final char commentStart;
-
-private final boolean ignoreSurroundingSpaces;
-private final boolean ignoreEmptyLines;
-
-/** The input stream */
-private final ExtendedBufferedReader in;
-
-/** INTERNAL API. but ctor needs to be called dynamically by 
PerformanceTest class */
-Lexer(final CSVFormat format, final ExtendedBufferedReader in) {
-this.in = in;
-this.delimiter = format.getDelimiter();
-this.escape = mapNullToDisabled(format.getEscape());
-this.quoteChar = mapNullToDisabled(format.getQuoteChar());
-this.commentStart = mapNullToDisabled(format.getCommentStart());
-this.ignoreSurroundingSpaces = format.getIgnoreSurroundingSpaces();
-this.ignoreEmptyLines = format.getIgnoreEmptyLines();
-}
-
-/**
- * Returns the next token.
- * p/
- * A token corresponds to a term, a record change or an end-of-file 
indicator.
- *
- * @param token
- *an existing Token object to reuse. The caller is responsible 
to initialize the Token.
- * @return the next token found
- * @throws java.io.IOException
- * on stream access error
- */
-Token nextToken(final Token token) throws IOException {
-
-// get the last read char (required for empty line detection)
-int lastChar = in.getLastChar();
-
-// read the next char and set eol
-int c = in.read();
-/*
- * Note: The following call will swallow LF if c == CR. But we don't 
need to know if the last char was CR or LF
- * - they are equivalent here.
- */
-boolean eol = readEndOfLine(c);
-
-// empty line detection: eol AND (last char was EOL or beginning)
-if (ignoreEmptyLines) {
-while (eol  isStartOfLine(lastChar)) {
-// go on char ahead ...
-lastChar = c;
-c = in.read();
-eol = readEndOfLine(c);
-// reached end of file without any content (empty line at the 
end)
-if (isEndOfFile(c)) {
-token.type = EOF;
-// don't set token.isReady here because no content
-return token;
-