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 17C22200C43 for ; Sun, 12 Mar 2017 03:08:11 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 16A6B160B8E; Sun, 12 Mar 2017 02:08:11 +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 87895160B93 for ; Sun, 12 Mar 2017 03:08:09 +0100 (CET) Received: (qmail 52280 invoked by uid 500); 12 Mar 2017 02:08:08 -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 52177 invoked by uid 99); 12 Mar 2017 02:08:08 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Mar 2017 02:08:08 +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 3F7733A47DC for ; Sun, 12 Mar 2017 02:08:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1008161 [16/44] - in /websites/production/commons/content/proper/commons-text: ./ apidocs/ apidocs/org/apache/commons/text/ apidocs/org/apache/commons/text/class-use/ apidocs/org/apache/commons/text/diff/ apidocs/org/apache/commons/text/di... Date: Sun, 12 Mar 2017 02:08:05 -0000 To: notifications@commons.apache.org From: chtompki@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170312020807.3F7733A47DC@svn01-us-west.apache.org> archived-at: Sun, 12 Mar 2017 02:08:11 -0000 Modified: websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeEscaper.html ============================================================================== --- websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeEscaper.html (original) +++ websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeEscaper.html Sun Mar 12 02:08:01 2017 @@ -34,115 +34,118 @@ 026 */ 027public class UnicodeEscaper extends CodePointTranslator { 028 -029 private final int below; -030 private final int above; -031 private final boolean between; -032 -033 /** -034 * <p>Constructs a <code>UnicodeEscaper</code> for all characters. </p> -035 */ -036 public UnicodeEscaper(){ -037 this(0, Integer.MAX_VALUE, true); -038 } -039 -040 /** -041 * <p>Constructs a <code>UnicodeEscaper</code> for the specified range. This is -042 * the underlying method for the other constructors/builders. The <code>below</code> -043 * and <code>above</code> boundaries are inclusive when <code>between</code> is -044 * <code>true</code> and exclusive when it is <code>false</code>. </p> -045 * -046 * @param below int value representing the lowest codepoint boundary -047 * @param above int value representing the highest codepoint boundary -048 * @param between whether to escape between the boundaries or outside them -049 */ -050 protected UnicodeEscaper(final int below, final int above, final boolean between) { -051 this.below = below; -052 this.above = above; -053 this.between = between; -054 } -055 -056 /** -057 * <p>Constructs a <code>UnicodeEscaper</code> below the specified value (exclusive). </p> -058 * -059 * @param codepoint below which to escape -060 * @return the newly created {@code UnicodeEscaper} instance -061 */ -062 public static UnicodeEscaper below(final int codepoint) { -063 return outsideOf(codepoint, Integer.MAX_VALUE); -064 } -065 -066 /** -067 * <p>Constructs a <code>UnicodeEscaper</code> above the specified value (exclusive). </p> -068 * -069 * @param codepoint above which to escape -070 * @return the newly created {@code UnicodeEscaper} instance -071 */ -072 public static UnicodeEscaper above(final int codepoint) { -073 return outsideOf(0, codepoint); -074 } -075 -076 /** -077 * <p>Constructs a <code>UnicodeEscaper</code> outside of the specified values (exclusive). </p> -078 * -079 * @param codepointLow below which to escape -080 * @param codepointHigh above which to escape -081 * @return the newly created {@code UnicodeEscaper} instance -082 */ -083 public static UnicodeEscaper outsideOf(final int codepointLow, final int codepointHigh) { -084 return new UnicodeEscaper(codepointLow, codepointHigh, false); -085 } -086 -087 /** -088 * <p>Constructs a <code>UnicodeEscaper</code> between the specified values (inclusive). </p> -089 * -090 * @param codepointLow above which to escape -091 * @param codepointHigh below which to escape -092 * @return the newly created {@code UnicodeEscaper} instance -093 */ -094 public static UnicodeEscaper between(final int codepointLow, final int codepointHigh) { -095 return new UnicodeEscaper(codepointLow, codepointHigh, true); -096 } -097 -098 /** -099 * {@inheritDoc} -100 */ -101 @Override -102 public boolean translate(final int codepoint, final Writer out) throws IOException { -103 if (between) { -104 if (codepoint < below || codepoint > above) { -105 return false; -106 } -107 } else { -108 if (codepoint >= below && codepoint <= above) { +029 /** int value representing the lowest codepoint boundary. */ +030 private final int below; +031 /** int value representing the highest codepoint boundary. */ +032 private final int above; +033 /** whether to escape between the boundaries or outside them. */ +034 private final boolean between; +035 +036 /** +037 * <p>Constructs a <code>UnicodeEscaper</code> for all characters. +038 * </p> +039 */ +040 public UnicodeEscaper() { +041 this(0, Integer.MAX_VALUE, true); +042 } +043 +044 /** +045 * <p>Constructs a <code>UnicodeEscaper</code> for the specified range. This is +046 * the underlying method for the other constructors/builders. The <code>below</code> +047 * and <code>above</code> boundaries are inclusive when <code>between</code> is +048 * <code>true</code> and exclusive when it is <code>false</code>. </p> +049 * +050 * @param below int value representing the lowest codepoint boundary +051 * @param above int value representing the highest codepoint boundary +052 * @param between whether to escape between the boundaries or outside them +053 */ +054 protected UnicodeEscaper(final int below, final int above, final boolean between) { +055 this.below = below; +056 this.above = above; +057 this.between = between; +058 } +059 +060 /** +061 * <p>Constructs a <code>UnicodeEscaper</code> below the specified value (exclusive). </p> +062 * +063 * @param codepoint below which to escape +064 * @return the newly created {@code UnicodeEscaper} instance +065 */ +066 public static UnicodeEscaper below(final int codepoint) { +067 return outsideOf(codepoint, Integer.MAX_VALUE); +068 } +069 +070 /** +071 * <p>Constructs a <code>UnicodeEscaper</code> above the specified value (exclusive). </p> +072 * +073 * @param codepoint above which to escape +074 * @return the newly created {@code UnicodeEscaper} instance +075 */ +076 public static UnicodeEscaper above(final int codepoint) { +077 return outsideOf(0, codepoint); +078 } +079 +080 /** +081 * <p>Constructs a <code>UnicodeEscaper</code> outside of the specified values (exclusive). </p> +082 * +083 * @param codepointLow below which to escape +084 * @param codepointHigh above which to escape +085 * @return the newly created {@code UnicodeEscaper} instance +086 */ +087 public static UnicodeEscaper outsideOf(final int codepointLow, final int codepointHigh) { +088 return new UnicodeEscaper(codepointLow, codepointHigh, false); +089 } +090 +091 /** +092 * <p>Constructs a <code>UnicodeEscaper</code> between the specified values (inclusive). </p> +093 * +094 * @param codepointLow above which to escape +095 * @param codepointHigh below which to escape +096 * @return the newly created {@code UnicodeEscaper} instance +097 */ +098 public static UnicodeEscaper between(final int codepointLow, final int codepointHigh) { +099 return new UnicodeEscaper(codepointLow, codepointHigh, true); +100 } +101 +102 /** +103 * {@inheritDoc} +104 */ +105 @Override +106 public boolean translate(final int codepoint, final Writer out) throws IOException { +107 if (between) { +108 if (codepoint < below || codepoint > above) { 109 return false; 110 } -111 } -112 -113 // TODO: Handle potential + sign per various Unicode escape implementations -114 if (codepoint > 0xffff) { -115 out.write(toUtf16Escape(codepoint)); -116 } else { -117 out.write("\\u"); -118 out.write(HEX_DIGITS[(codepoint >> 12) & 15]); -119 out.write(HEX_DIGITS[(codepoint >> 8) & 15]); -120 out.write(HEX_DIGITS[(codepoint >> 4) & 15]); -121 out.write(HEX_DIGITS[(codepoint) & 15]); -122 } -123 return true; -124 } -125 -126 /** -127 * Converts the given codepoint to a hex string of the form {@code "\\uXXXX"} -128 * -129 * @param codepoint -130 * a Unicode code point -131 * @return the hex string for the given codepoint -132 * -133 */ -134 protected String toUtf16Escape(final int codepoint) { -135 return "\\u" + hex(codepoint); -136 } -137} +111 } else { +112 if (codepoint >= below && codepoint <= above) { +113 return false; +114 } +115 } +116 +117 if (codepoint > 0xffff) { +118 out.write(toUtf16Escape(codepoint)); +119 } else { +120 out.write("\\u"); +121 out.write(HEX_DIGITS[(codepoint >> 12) & 15]); +122 out.write(HEX_DIGITS[(codepoint >> 8) & 15]); +123 out.write(HEX_DIGITS[(codepoint >> 4) & 15]); +124 out.write(HEX_DIGITS[(codepoint) & 15]); +125 } +126 return true; +127 } +128 +129 /** +130 * Converts the given codepoint to a hex string of the form {@code "\\uXXXX"}. +131 * +132 * @param codepoint +133 * a Unicode code point +134 * @return the hex string for the given codepoint +135 * +136 */ +137 protected String toUtf16Escape(final int codepoint) { +138 return "\\u" + hex(codepoint); +139 } +140} Modified: websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeUnescaper.html ============================================================================== --- websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeUnescaper.html (original) +++ websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeUnescaper.html Sun Mar 12 02:08:01 2017 @@ -13,9 +13,9 @@ 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at -008 * +008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 -010 * +010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -28,8 +28,8 @@ 020import java.io.Writer; 021 022/** -023 * Translates escaped Unicode values of the form \\u+\d\d\d\d back to -024 * Unicode. It supports multiple 'u' characters and will work with or +023 * Translates escaped Unicode values of the form \\u+\d\d\d\d back to +024 * Unicode. It supports multiple 'u' characters and will work with or 025 * without the +. 026 * 027 * @since 1.0 @@ -64,12 +64,13 @@ 056 } 057 return i + 4; 058 } -059 throw new IllegalArgumentException("Less than 4 hex digits in unicode value: '" + input.subSequence(index, input.length()) -060 + "' due to end of CharSequence"); -061 } -062 return 0; -063 } -064} +059 throw new IllegalArgumentException("Less than 4 hex digits in unicode value: '" +060 + input.subSequence(index, input.length()) +061 + "' due to end of CharSequence"); +062 } +063 return 0; +064 } +065} Modified: websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.html ============================================================================== --- websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.html (original) +++ websites/production/commons/content/proper/commons-text/apidocs/src-html/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.html Sun Mar 12 02:08:01 2017 @@ -34,7 +34,7 @@ 026 */ 027public class UnicodeUnpairedSurrogateRemover extends CodePointTranslator { 028 /** -029 * Implementation of translate that throws out unpaired surrogates. +029 * Implementation of translate that throws out unpaired surrogates. 030 * {@inheritDoc} 031 */ 032 @Override Modified: websites/production/commons/content/proper/commons-text/changes-report.html ============================================================================== --- websites/production/commons/content/proper/commons-text/changes-report.html (original) +++ websites/production/commons/content/proper/commons-text/changes-report.html Sun Mar 12 02:08:01 2017 @@ -1,13 +1,13 @@ - + Commons Text – Apache Commons Text Changes @@ -38,8 +38,8 @@ Apache Commons Text ™
-

Release TBA – TBA

+

Release 1.0 – 2017-03-04

@@ -318,6 +318,22 @@ + + + + + + + + + + + + + + + +
TypeBy
FixInvestigate locale issue in ExtendedMessageFormatTest. Fixes TEXT-64. Thanks to chtompki.kinow
FixResolve PMD/CMD Violations. Fixes TEXT-69.chtompki
RemoveEscape HTML characters only once: revert. Fixes TEXT-40.sebb
FixFixing the 200 checkstyle errors present in 1.0-beta-1. Fixes TEXT-65.chtompki
Fix Mutable fields should be private. Fixes TEXT-63. sebb