Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 2161D200C05 for ; Mon, 23 Jan 2017 13:35:23 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 1CF44160B6B; Mon, 23 Jan 2017 12:35:23 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 851A7160B65 for ; Mon, 23 Jan 2017 13:35:20 +0100 (CET) Received: (qmail 51904 invoked by uid 500); 23 Jan 2017 12:35:19 -0000 Mailing-List: contact notifications-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 notifications@commons.apache.org Received: (qmail 51635 invoked by uid 99); 23 Jan 2017 12:35:18 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2017 12:35:18 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 4EA3C3A4775 for ; Mon, 23 Jan 2017 12:35:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1005408 [13/29] - in /websites/production/commons/content/proper/commons-text: ./ apidocs/ apidocs/org/apache/commons/text/ apidocs/org/apache/commons/text/translate/ apidocs/org/apache/commons/text/translate/class-use/ apidocs/src-html/or... Date: Mon, 23 Jan 2017 12:35:15 -0000 To: notifications@commons.apache.org From: chtompki@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170123123517.4EA3C3A4775@svn01-us-west.apache.org> archived-at: Mon, 23 Jan 2017 12:35:23 -0000 Modified: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.diff/index.source.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.diff/index.source.html (original) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.diff/index.source.html Mon Jan 23 12:35:12 2017 @@ -1 +1 @@ -org.apache.commons.text.diff

org.apache.commons.text.diff

< tfoot>
ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total5 of 74099%3 of 8897%372113802808
StringsComparator.java556299%37996%3501850902
EditScript.java72100%2100%080200701
ReplacementsFinder.java65100%4100%060170401
KeepCommand.java9100%n/a02040201
EditCommand.java9100%n/a02040201
InsertCommand.java9100%n/a0204< /td>0201
DeleteCommand.java9100%n/a02040201
\ No newline at end of file +org.apache.commons.text.diff

org.apache.commons.text.diff

< tfoot>
ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses
Total5 of 74099%3 of 8897%372113802808
StringsComparator.java556299%37996%3501850902
EditScript.java72100%2100%080200701
ReplacementsFinder.java65100%4100%060170401
EditCommand.java9100%n/a02040201
InsertCommand.java9100%n/a02040201
DeleteCommand.java9100%n/a02040201
KeepCommand.java9100%n/a02040201
\ No newline at end of file Modified: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.similarity/index.source.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.similarity/index.source.html (original) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.similarity/index.source.html Mon Jan 23 12:35:12 2017 @@ -1 +1 @@ -org.apache.commons.text.similarity

org.apache.commons.text.similarity

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses< /td>
Total103 of 2,34896%36 of 32289%43223274681062016
LevenshteinDetailedDistance.java4369294%189884%1767101482901
LevenshteinDistance.java1635296%45293%6364822801
SimilarityScoreFrom.java111862%1150%35392401
CosineSimilarity.java812594%41071%4112250401
EditDistanceFrom.java2379% 2100%25292401
RegexTokenizer.java3989%2467%25190201
HammingDistance.java3888%1990%171100201
LevenshteinResults.java11898%6857%6151200801
FuzzyScore.java8397%16100%1111261301
Counter.java4694%4100%142101201
JaroWinklerDistance.java284100%34100%0200490301
LongestCommonSubsequence.java211100%24100%0160320401
JaccardSimilarity.java107100%16100%0110200301
CosineDistance .java43100%n/a02090201
JaccardDistance.java33100%4100%04050201
LongestCommonSubsequenceDistance.java33100%4100%04050201
\ No newline at end of file +org.apache.commons.text.similarity

org.apache.commons.text.similarity

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethodsMissedClasses< /td>
Total103 of 2,34896%36 of 32289%43223274681062016
LevenshteinDetailedDistance.java4369294%189884%1767101482901
LevenshteinDistance.java1635296%45293%6364822801
SimilarityScoreFrom.java111862%1150%35392401
CosineSimilarity.java812594%41071%4112250401
EditDistanceFrom.java2379% 2100%25292401
RegexTokenizer.java3989%2467%25190201
HammingDistance.java3888%1990%171100201
LevenshteinResults.java11898%6857%6151200801
FuzzyScore.java8397%16100%1111261301
Counter.java4694%4100%142101201
JaroWinklerDistance.java284100%34100%0200490301
LongestCommonSubsequence.java211100%24100%0160320401
JaccardSimilarity.java107100%16100%0110200301
CosineDistance .java43100%n/a02090201
LongestCommonSubsequenceDistance.java33100%4100%04050201
JaccardDistance.java33100%4100%04050201
\ No newline at end of file Modified: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CharSequenceTranslator.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CharSequenceTranslator.html (original) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CharSequenceTranslator.html Mon Jan 23 12:35:12 2017 @@ -1 +1 @@ -CharSequenceTranslator

CharSequenceTranslator

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total6 of 19197%2 of 1889%21523606
translate(CharSequence)61976%2100%022701
translate(CharSequence, Writer)68100%21488%2902201
static {...}68100%n/a01010 1
with(CharSequenceTranslator[])22100%n/a010401
hex(int)5100%n/a010101
CharSequenceTranslator()3100%n/a010101
\ No newline at end of file +CharSequenceTranslator

CharSequenceTranslator

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total28 of 19185%2 of 1889%31563616
with(CharSequenceTranslator[])220%n/a114411
translate(CharSequence)61976%2100%022701
translate(CharSequence, Writer)68100%21488%2902201
static {...}68100%n/a010101
hex(int)5100%n/a010101
CharSequenceTranslator()3100%n/a010101
\ No newline at end of file Modified: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CharSequenceTranslator.java.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CharSequenceTranslator.java.html (original) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CharSequenceTranslator.java.html Mon Jan 23 12:35:12 2017 @@ -115,10 +115,10 @@ import java.util.Locale; * @return CharSequenceTranslator merging this translator with the others */ public final CharSequenceTranslator with(final CharSequenceTranslator... translators) { - final CharSequenceTranslator[] newArray = new CharSequenceTranslator[translators.length + 1]; - newArray[0] = this; - System.arraycopy(translators, 0, newArray, 1, translators.length); - return new AggregateTranslator(newArray); + final CharSequenceTranslator[] newArray = new CharSequenceTranslator[translators.length + 1]; + newArray[0] = this; + System.arraycopy(translators, 0, newArray, 1, translators.length); + return new AggregateTranslator(newArray); } /** Added: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators$CsvEscaper.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators$CsvEscaper.html (added) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators$CsvEscaper.html Mon Jan 23 12:35:12 2017 @@ -0,0 +1 @@ +CsvTranslators.CsvEscaper

CsvTranslators.CsvEscaper

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 27100%0 of 2100%030802
translateWhole(CharSequence, Writer)24100%2100%020701
CsvTranslators.CsvEscaper()3100%n/a010101
\ No newline at end of file Added: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators$CsvUnescaper.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators$CsvUnescaper.html (added) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators$CsvUnescaper.html Mon Jan 23 12:35:12 2017 @@ -0,0 +1 @@ +CsvTranslators.CsvUnescaper

CsvTranslators.CsvUnescaper

< td class="ctr1">1
ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 46100%1 of 683%50902
translateWhole(CharSequence, Writer)43100%1583%140801
CsvTranslators.CsvUnescaper()3100%n/a010101
\ No newline at end of file Added: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators.html (added) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators.html Mon Jan 23 12:35:12 2017 @@ -0,0 +1 @@ +CsvTranslators

CsvTranslators

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total3 of 3591%0 of 0n/a12 1412
CsvTranslators()30%n/a111111
static {...}32100%n/a010301
\ No newline at end of file Added: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators.java.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators.java.html (added) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/CsvTranslators.java.html Mon Jan 23 12:35:12 2017 @@ -0,0 +1,83 @@ +CsvTranslators.java

CsvTranslators.java

/*
+ * 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.text.translate;
+
+import org.apache.commons.lang3.CharUtils;
+import org.apache.commons.lang3.StringUtils;
+
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * This class holds inner classes for escaping/unescaping Comma Separated Values.
+ */
+public class CsvTranslators {
+
+    private static final char CSV_DELIMITER = ',';
+    private static final char CSV_QUOTE = '"';
+    private static final String CSV_QUOTE_STR = String.valueOf(CSV_QUOTE);
+    private static final String CSV_ESCAPED_QUOTE_STR = CSV_QUOTE_STR + CSV_QUOTE_STR;
+    private static final char[] CSV_SEARCH_CHARS =
+            new char[] {CSV_DELIMITER, CSV_QUOTE, CharUtils.CR, CharUtils.LF};
+
+    private CsvTranslators() { }
+
+    /**
+     * Translator for escaping Comma Separated Values.
+     */
+    public static class CsvEscaper extends SinglePassTranslator {
+
+        @Override
+        void translateWhole(final CharSequence input, final Writer out) throws IOException {
+            final String inputSting = input.toString();
+            if (StringUtils.containsNone(inputSting, CSV_SEARCH_CHARS)) {
+                out.write(inputSting);
+            } else {
+                // input needs quoting
+                out.write(CSV_QUOTE);
+                out.write(StringUtils.replace(inputSting, CSV_QUOTE_STR, CSV_ESCAPED_QUOTE_STR));
+                out.write(CSV_QUOTE);
+            }
+        }
+    }
+
+    /**
+     * Translator for unescaping escaped Comma Separated Value entries.
+     */
+    public static class CsvUnescaper extends SinglePassTranslator {
+
+        @Override
+        void translateWhole(final CharSequence input, final Writer out) throws IOException {
+            // is input not quoted?
+            if (input.charAt(0) != CSV_QUOTE || input.charAt(input.length() - 1) != CSV_QUOTE) {
+                out.write(input.toString());
+                return;
+            }
+
+            // strip quotes
+            final String quoteless = input.subSequence(1, input.length() - 1).toString();
+
+            if (StringUtils.containsAny(quoteless, CSV_SEARCH_CHARS)) {
+                // deal with escaped quotes; ie) ""
+                out.write(StringUtils.replace(quoteless, CSV_ESCAPED_QUOTE_STR, CSV_QUOTE_STR));
+            } else {
+                out.write(input.toString());
+            }
+        }
+    }
+}
+
\ No newline at end of file Modified: websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/EntityArrays.html ============================================================================== --- websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/EntityArrays.html (original) +++ websites/production/commons/content/proper/commons-text/jacoco/org.apache.commons.text.translate/EntityArrays.html Mon Jan 23 12:35:12 2017 @@ -1 +1 @@ -EntityArrays

EntityArrays

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 3,463100%0 of 2100%014 026013
static {...}3,385100%n/a0101001
invert(String[][])35100%2100%020501
ISO8859_1_ESCAPE()100%n/a010101
ISO8859_1_UNESCAPE()100%n/a010101
HTML40_EXTENDED_ESCAPE()100%n/a010101
HTML40_EXTENDED_UNESCAPE()100%n/a010101
BASIC_ESCAPE()100%n/a010101
BASIC_UNESCAPE()100%n/a010101
APOS_ESCAPE()100%n/a010101
APOS_UNESCAPE()100%n/a010101
JAVA_CTRL_CHARS_ESCAPE()100%n/a010101
JAVA_CTRL_CHARS_UNESC APE()100%n/a010101
EntityArrays()100%n/a010101
\ No newline at end of file +EntityArrays

EntityArrays

ElementMissed InstructionsCov.Missed BranchesCov.MissedCxtyMissedLinesMissedMethods
Total0 of 1,374100%0 of 2100%04< /td>028003
static {...}1,346100%n/a01027401
invert(Map)25100%2100%020501
EntityArrays()100%n/a010101
\ No newline at end of file