commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject svn commit: r1005408 [25/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 GMT
Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/package-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/package-frame.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/package-frame.html Mon Jan 23 12:35:12 2017
@@ -19,6 +19,9 @@
             	<a href="AlphabetConverterTest.html" target="classFrame">AlphabetConverterTest</a>
           	</li>
           	          	<li>
+            	<a href="CharacterPredicatesTest.html" target="classFrame">CharacterPredicatesTest</a>
+          	</li>
+          	          	<li>
             	<a href="CompositeFormatTest.html" target="classFrame">CompositeFormatTest</a>
           	</li>
           	          	<li>
@@ -43,6 +46,9 @@
             	<a href="ExtendedMessageFormatTest.html" target="classFrame">OverrideShortDateFormatFactory</a>
           	</li>
           	          	<li>
+            	<a href="FormattableUtilsTest.html" target="classFrame">SimplestFormattable</a>
+          	</li>
+          	          	<li>
             	<a href="StrBuilderAppendInsertTest.html" target="classFrame">StrBuilderAppendInsertTest</a>
           	</li>
           	          	<li>

Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/package-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/package-summary.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/package-summary.html Mon Jan 23 12:35:12 2017
@@ -42,6 +42,11 @@
             	</tr>
 				            	<tr>
               		<td>
+                		<a href="CharacterPredicatesTest.html" target="classFrame">CharacterPredicatesTest</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
                 		<a href="CompositeFormatTest.html" target="classFrame">CompositeFormatTest</a>
               		</td>
             	</tr>
@@ -81,6 +86,11 @@
               		</td>
             	</tr>
 				            	<tr>
+              		<td>
+                		<a href="FormattableUtilsTest.html" target="classFrame">SimplestFormattable</a>
+              		</td>
+            	</tr>
+				            	<tr>
               		<td>
                 		<a href="StrBuilderAppendInsertTest.html" target="classFrame">StrBuilderAppendInsertTest</a>
               		</td>

Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/AggregateTranslatorTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/AggregateTranslatorTest.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/AggregateTranslatorTest.html Mon Jan 23 12:35:12 2017
@@ -28,44 +28,50 @@
 <a class="jxr_linenumber" name="L20" href="#L20">20</a>  
 <a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> java.io.IOException;
 <a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> java.io.StringWriter;
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> java.util.HashMap;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> java.util.Map;
 <a class="jxr_linenumber" name="L25" href="#L25">25</a>  
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <em class="jxr_javadoccomment"> * Unit tests for {@link org.apache.commons.text.translate.AggregateTranslator}.</em>
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/text/translate/AggregateTranslatorTest.html">AggregateTranslatorTest</a> {
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>  
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>      @Test
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNullConstructor() <strong class="jxr_keyword">throws</strong> Exception {
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>          <strong class="jxr_keyword">final</strong> String testString = <span class="jxr_string">"foo"</span>;
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>          <strong class="jxr_keyword">final</strong> AggregateTranslator subject = <strong class="jxr_keyword">new</strong> AggregateTranslator((CharSequenceTranslator[]) <strong class="jxr_keyword">null</strong>);
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>          assertEquals(testString, subject.translate(testString));
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>      }
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>      
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>      @Test
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNullVarargConstructor() <strong class="jxr_keyword">throws</strong> Exception {
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>          <strong class="jxr_keyword">final</strong> String testString = <span class="jxr_string">"foo"</span>;
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>          <strong class="jxr_keyword">final</strong> AggregateTranslator subject = <strong class="jxr_keyword">new</strong> AggregateTranslator((CharSequenceTranslator) <strong class="jxr_keyword">null</strong>);
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>          assertEquals(testString, subject.translate(testString));
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>      }
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>  
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>      @Test
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNonNull() <strong class="jxr_keyword">throws</strong> IOException{
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>          <strong class="jxr_keyword">final</strong> CharSequenceTranslator translator1 = <strong class="jxr_keyword">new</strong> LookupTranslator(<strong class="jxr_keyword">new</strong> CharSequence[][] { { <span class="jxr_string">"one"</span>, <span class="jxr_string">"two"</span> } });
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>          <strong class="jxr_keyword">final</strong> CharSequenceTranslator translator2 = <strong class="jxr_keyword">new</strong> LookupTranslator(<strong class="jxr_keyword">new</strong> CharSequence[][] { { <span class="jxr_string">"three"</span>, <span class="jxr_string">"four"</span> } });
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>          <strong class="jxr_keyword">final</strong> AggregateTranslator subject = <strong class="jxr_keyword">new</strong> AggregateTranslator(translator1, translator2);
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>          <strong class="jxr_keyword">final</strong> StringWriter out1 = <strong class="jxr_keyword">new</strong> StringWriter();
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result1 = subject.translate(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"one"</span>), 0, out1);
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 3, result1);
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"two"</span>, out1.toString());
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>          <strong class="jxr_keyword">final</strong> StringWriter out2 = <strong class="jxr_keyword">new</strong> StringWriter();
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result2 = subject.translate(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"three"</span>), 0, out2);
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 5, result2);
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"four"</span>, out2.toString());
-<a class="jxr_linenumber" name="L58" href="#L58">58</a>      }
-<a class="jxr_linenumber" name="L59" href="#L59">59</a>  
-<a class="jxr_linenumber" name="L60" href="#L60">60</a>  }
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> * Unit tests for {@link AggregateTranslator}.</em>
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/text/translate/AggregateTranslatorTest.html">AggregateTranslatorTest</a> {
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>      @Test
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNullConstructor() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>          <strong class="jxr_keyword">final</strong> String testString = <span class="jxr_string">"foo"</span>;
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>          <strong class="jxr_keyword">final</strong> AggregateTranslator subject = <strong class="jxr_keyword">new</strong> AggregateTranslator((CharSequenceTranslator[]) <strong class="jxr_keyword">null</strong>);
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>          assertEquals(testString, subject.translate(testString));
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      }
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>      @Test
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNullVarargConstructor() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>          <strong class="jxr_keyword">final</strong> String testString = <span class="jxr_string">"foo"</span>;
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>          <strong class="jxr_keyword">final</strong> AggregateTranslator subject = <strong class="jxr_keyword">new</strong> AggregateTranslator((CharSequenceTranslator) <strong class="jxr_keyword">null</strong>);
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>          assertEquals(testString, subject.translate(testString));
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>      }
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>  
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>      @Test
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNonNull() <strong class="jxr_keyword">throws</strong> IOException{
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>          <strong class="jxr_keyword">final</strong> Map&lt;CharSequence, CharSequence&gt; oneTwoMap = <strong class="jxr_keyword">new</strong> HashMap&lt;&gt;();
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>          oneTwoMap.put(<span class="jxr_string">"one"</span>, <span class="jxr_string">"two"</span>);
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>          <strong class="jxr_keyword">final</strong> Map&lt;CharSequence, CharSequence&gt; threeFourMap = <strong class="jxr_keyword">new</strong> HashMap&lt;&gt;();
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>          threeFourMap.put(<span class="jxr_string">"three"</span>, <span class="jxr_string">"four"</span>);
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>          <strong class="jxr_keyword">final</strong> CharSequenceTranslator translator1 = <strong class="jxr_keyword">new</strong> LookupTranslator(oneTwoMap);
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>          <strong class="jxr_keyword">final</strong> CharSequenceTranslator translator2 = <strong class="jxr_keyword">new</strong> LookupTranslator(threeFourMap);
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>          <strong class="jxr_keyword">final</strong> AggregateTranslator subject = <strong class="jxr_keyword">new</strong> AggregateTranslator(translator1, translator2);
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>          <strong class="jxr_keyword">final</strong> StringWriter out1 = <strong class="jxr_keyword">new</strong> StringWriter();
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result1 = subject.translate(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"one"</span>), 0, out1);
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 3, result1);
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"two"</span>, out1.toString());
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>          <strong class="jxr_keyword">final</strong> StringWriter out2 = <strong class="jxr_keyword">new</strong> StringWriter();
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result2 = subject.translate(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"three"</span>), 0, out2);
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 5, result2);
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"four"</span>, out2.toString());
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>      }
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>  
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>  }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2014&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/EntityArraysTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/EntityArraysTest.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/EntityArraysTest.html Mon Jan 23 12:35:12 2017
@@ -27,92 +27,112 @@
 <a class="jxr_linenumber" name="L19" href="#L19">19</a>  
 <a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
 <a class="jxr_linenumber" name="L21" href="#L21">21</a>  
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> java.util.HashSet;
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> java.util.Set;
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertTrue;
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> java.io.BufferedReader;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> java.io.FileReader;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> java.util.Map;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
 <a class="jxr_linenumber" name="L27" href="#L27">27</a>  
 <a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> * Unit tests for {@link org.apache.commons.text.translate.EntityArrays}.</em>
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> * Unit tests for {@link EntityArrays}.</em>
 <a class="jxr_linenumber" name="L30" href="#L30">30</a>  <em class="jxr_javadoccomment"> */</em>
 <a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/text/translate/EntityArraysTest.html">EntityArraysTest</a>  {
 <a class="jxr_linenumber" name="L32" href="#L32">32</a>  
 <a class="jxr_linenumber" name="L33" href="#L33">33</a>      @Test
 <a class="jxr_linenumber" name="L34" href="#L34">34</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testConstructorExists() {
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>          <strong class="jxr_keyword">new</strong> org.apache.commons.text.translate.EntityArrays();
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>          <strong class="jxr_keyword">new</strong> EntityArrays();
 <a class="jxr_linenumber" name="L36" href="#L36">36</a>      }
 <a class="jxr_linenumber" name="L37" href="#L37">37</a>  
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <em class="jxr_comment">// LANG-659 - check arrays for duplicate entries</em>
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>      <em class="jxr_comment">// LANG-659, LANG-658 - avoid duplicate entries</em>
 <a class="jxr_linenumber" name="L39" href="#L39">39</a>      @Test
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testHTML40_EXTENDED_ESCAPE(){
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>          <strong class="jxr_keyword">final</strong> Set&lt;String&gt; col0 = <strong class="jxr_keyword">new</strong> HashSet&lt;&gt;();
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>          <strong class="jxr_keyword">final</strong> Set&lt;String&gt; col1 = <strong class="jxr_keyword">new</strong> HashSet&lt;&gt;();
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>          <strong class="jxr_keyword">final</strong> String [][] sa = org.apache.commons.text.translate.EntityArrays.HTML40_EXTENDED_ESCAPE();
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>          <strong class="jxr_keyword">for</strong>(<strong class="jxr_keyword">int</strong> i =0; i &lt;sa.length; i++){
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>              assertTrue(<span class="jxr_string">"Already added entry 0: "</span>+i+<span class="jxr_string">" "</span>+sa[i][0],col0.add(sa[i][0]));
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>              assertTrue(<span class="jxr_string">"Already added entry 1: "</span>+i+<span class="jxr_string">" "</span>+sa[i][1],col1.add(sa[i][1]));
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>          }
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>      }
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>  
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>     <em class="jxr_comment">// LANG-658 - check arrays for duplicate entries</em>
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>      @Test
-<a class="jxr_linenumber" name="L52" href="#L52">52</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testISO8859_1_ESCAPE(){
-<a class="jxr_linenumber" name="L53" href="#L53">53</a>          <strong class="jxr_keyword">final</strong> Set&lt;String&gt; col0 = <strong class="jxr_keyword">new</strong> HashSet&lt;&gt;();
-<a class="jxr_linenumber" name="L54" href="#L54">54</a>          <strong class="jxr_keyword">final</strong> Set&lt;String&gt; col1 = <strong class="jxr_keyword">new</strong> HashSet&lt;&gt;();
-<a class="jxr_linenumber" name="L55" href="#L55">55</a>          <strong class="jxr_keyword">final</strong> String [][] sa = EntityArrays.ISO8859_1_ESCAPE();
-<a class="jxr_linenumber" name="L56" href="#L56">56</a>          <strong class="jxr_keyword">boolean</strong> success = <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L57" href="#L57">57</a>          <strong class="jxr_keyword">for</strong>(<strong class="jxr_keyword">int</strong> i =0; i &lt;sa.length; i++){
-<a class="jxr_linenumber" name="L58" href="#L58">58</a>              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">boolean</strong> add0 = col0.add(sa[i][0]);
-<a class="jxr_linenumber" name="L59" href="#L59">59</a>              <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">boolean</strong> add1 = col1.add(sa[i][1]);
-<a class="jxr_linenumber" name="L60" href="#L60">60</a>              <strong class="jxr_keyword">if</strong> (!add0) { 
-<a class="jxr_linenumber" name="L61" href="#L61">61</a>                  success = false;
-<a class="jxr_linenumber" name="L62" href="#L62">62</a>                  System.out.println(<span class="jxr_string">"Already added entry 0: "</span>+i+<span class="jxr_string">" "</span>+sa[i][0]+<span class="jxr_string">" "</span>+sa[i][1]);
-<a class="jxr_linenumber" name="L63" href="#L63">63</a>              }
-<a class="jxr_linenumber" name="L64" href="#L64">64</a>              <strong class="jxr_keyword">if</strong> (!add1) {
-<a class="jxr_linenumber" name="L65" href="#L65">65</a>                  success = false;
-<a class="jxr_linenumber" name="L66" href="#L66">66</a>                  System.out.println(<span class="jxr_string">"Already added entry 1: "</span>+i+<span class="jxr_string">" "</span>+sa[i][0]+<span class="jxr_string">" "</span>+sa[i][1]);
-<a class="jxr_linenumber" name="L67" href="#L67">67</a>              }
-<a class="jxr_linenumber" name="L68" href="#L68">68</a>          }
-<a class="jxr_linenumber" name="L69" href="#L69">69</a>          assertTrue(<span class="jxr_string">"One or more errors detected"</span>,success);
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testForDuplicatedDeclaredMapKeys() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>          <strong class="jxr_keyword">try</strong> (BufferedReader br = <strong class="jxr_keyword">new</strong> BufferedReader(<strong class="jxr_keyword">new</strong> FileReader(<span class="jxr_string">"src/main/java/org/apache/commons/text/translate/EntityArrays.java"</span>))) {
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>              String line;
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>              <strong class="jxr_keyword">int</strong> mapDeclarationCounter = 0;
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>              <strong class="jxr_keyword">while</strong> ((line = br.readLine()) != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>                  <em class="jxr_comment">//Start with map declaration and count put lines</em>
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>                  <strong class="jxr_keyword">if</strong> (line.contains(<span class="jxr_string">"new HashMap&lt;&gt;();"</span>)) {
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>                      mapDeclarationCounter = 0;
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>                  } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (line.contains(<span class="jxr_string">".put("</span>)) {
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>                      mapDeclarationCounter++;
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>                  } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (line.contains(<span class="jxr_string">"Collections.unmodifiableMap(initialMap);"</span>)) {
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>                      String mapVariableName = line.split(<span class="jxr_string">"="</span>)[0].trim();
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>                      Map&lt;String,String&gt; mapValue = (Map)EntityArrays.<strong class="jxr_keyword">class</strong>.getDeclaredField(mapVariableName).get(EntityArrays.<strong class="jxr_keyword">class</strong>);
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>                      <em class="jxr_comment">// Validate that we are not inserting into the same key twice in the map declaration. If this,</em>
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>                      <em class="jxr_comment">// indeed was the case the keySet().size() would be smaller than the number of put() statements</em>
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>                      assertEquals(mapDeclarationCounter, mapValue.keySet().size());
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>                  }
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>              }
+<a class="jxr_linenumber" name="L58" href="#L58">58</a>          }
+<a class="jxr_linenumber" name="L59" href="#L59">59</a>      }
+<a class="jxr_linenumber" name="L60" href="#L60">60</a>  
+<a class="jxr_linenumber" name="L61" href="#L61">61</a>      @Test
+<a class="jxr_linenumber" name="L62" href="#L62">62</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testForDuplicateDeclaredMapValuesISO8859Map() {
+<a class="jxr_linenumber" name="L63" href="#L63">63</a>          assertEquals(EntityArrays.ISO8859_1_ESCAPE.keySet().size(),
+<a class="jxr_linenumber" name="L64" href="#L64">64</a>                  EntityArrays.ISO8859_1_UNESCAPE.keySet().size());
+<a class="jxr_linenumber" name="L65" href="#L65">65</a>      }
+<a class="jxr_linenumber" name="L66" href="#L66">66</a>  
+<a class="jxr_linenumber" name="L67" href="#L67">67</a>      @Test
+<a class="jxr_linenumber" name="L68" href="#L68">68</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testISO8859Map() {
+<a class="jxr_linenumber" name="L69" href="#L69">69</a>          testEscapeVsUnescapeMaps(EntityArrays.ISO8859_1_ESCAPE, EntityArrays.ISO8859_1_UNESCAPE);
 <a class="jxr_linenumber" name="L70" href="#L70">70</a>      }
 <a class="jxr_linenumber" name="L71" href="#L71">71</a>  
 <a class="jxr_linenumber" name="L72" href="#L72">72</a>      @Test
-<a class="jxr_linenumber" name="L73" href="#L73">73</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testISO8859Arrays() {
-<a class="jxr_linenumber" name="L74" href="#L74">74</a>          testEscapeVsUnescapeArrays(EntityArrays.ISO8859_1_ESCAPE(), EntityArrays.ISO8859_1_UNESCAPE());
-<a class="jxr_linenumber" name="L75" href="#L75">75</a>      }
-<a class="jxr_linenumber" name="L76" href="#L76">76</a>  
-<a class="jxr_linenumber" name="L77" href="#L77">77</a>      @Test
-<a class="jxr_linenumber" name="L78" href="#L78">78</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testHtml40ExtendedArrays() {
-<a class="jxr_linenumber" name="L79" href="#L79">79</a>          testEscapeVsUnescapeArrays(EntityArrays.HTML40_EXTENDED_ESCAPE(), EntityArrays.HTML40_EXTENDED_UNESCAPE());
-<a class="jxr_linenumber" name="L80" href="#L80">80</a>      }
-<a class="jxr_linenumber" name="L81" href="#L81">81</a>  
-<a class="jxr_linenumber" name="L82" href="#L82">82</a>      @Test
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testAposArrays() {
-<a class="jxr_linenumber" name="L84" href="#L84">84</a>          testEscapeVsUnescapeArrays(EntityArrays.APOS_ESCAPE(), EntityArrays.APOS_UNESCAPE());
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>      }
-<a class="jxr_linenumber" name="L86" href="#L86">86</a>  
-<a class="jxr_linenumber" name="L87" href="#L87">87</a>      @Test
-<a class="jxr_linenumber" name="L88" href="#L88">88</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testBasicArrays() {
-<a class="jxr_linenumber" name="L89" href="#L89">89</a>          testEscapeVsUnescapeArrays(EntityArrays.BASIC_ESCAPE(), EntityArrays.BASIC_UNESCAPE());
-<a class="jxr_linenumber" name="L90" href="#L90">90</a>      }
-<a class="jxr_linenumber" name="L91" href="#L91">91</a>  
-<a class="jxr_linenumber" name="L92" href="#L92">92</a>      @Test
-<a class="jxr_linenumber" name="L93" href="#L93">93</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testJavaCntrlCharsArrays() {
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>          testEscapeVsUnescapeArrays(EntityArrays.JAVA_CTRL_CHARS_ESCAPE(), EntityArrays.JAVA_CTRL_CHARS_ESCAPE());
-<a class="jxr_linenumber" name="L95" href="#L95">95</a>      }
-<a class="jxr_linenumber" name="L96" href="#L96">96</a>  
-<a class="jxr_linenumber" name="L97" href="#L97">97</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> testEscapeVsUnescapeArrays(<strong class="jxr_keyword">final</strong> String[][] escapeArray, <strong class="jxr_keyword">final</strong> String[][] unescapeArray) {
-<a class="jxr_linenumber" name="L98" href="#L98">98</a>          <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String[] escapeElement : escapeArray) {
-<a class="jxr_linenumber" name="L99" href="#L99">99</a>              <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> String[] unescapeElement : unescapeArray) {
-<a class="jxr_linenumber" name="L100" href="#L100">100</a>                 <strong class="jxr_keyword">if</strong> (escapeElement[0] == unescapeElement[1]) {
-<a class="jxr_linenumber" name="L101" href="#L101">101</a>                     assertEquals(escapeElement[1], unescapeElement[0]);
-<a class="jxr_linenumber" name="L102" href="#L102">102</a>                 }
-<a class="jxr_linenumber" name="L103" href="#L103">103</a>             }
-<a class="jxr_linenumber" name="L104" href="#L104">104</a>         }
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>     }
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>     
-<a class="jxr_linenumber" name="L107" href="#L107">107</a> }
+<a class="jxr_linenumber" name="L73" href="#L73">73</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testForDuplicateDeclaredMapValuesHtml40ExtendedMap() {
+<a class="jxr_linenumber" name="L74" href="#L74">74</a>          assertEquals(EntityArrays.HTML40_EXTENDED_ESCAPE.keySet().size(),
+<a class="jxr_linenumber" name="L75" href="#L75">75</a>                  EntityArrays.HTML40_EXTENDED_UNESCAPE.keySet().size());
+<a class="jxr_linenumber" name="L76" href="#L76">76</a>      }
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>  
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>      @Test
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testHtml40ExtendedMap() {
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>          testEscapeVsUnescapeMaps(EntityArrays.HTML40_EXTENDED_ESCAPE, EntityArrays.HTML40_EXTENDED_UNESCAPE);
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>      }
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>  
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>      @Test
+<a class="jxr_linenumber" name="L84" href="#L84">84</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testForDuplicateDeclaredMapValuesAposMap() {
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>          assertEquals(EntityArrays.APOS_ESCAPE.keySet().size(),
+<a class="jxr_linenumber" name="L86" href="#L86">86</a>                  EntityArrays.APOS_UNESCAPE.keySet().size());
+<a class="jxr_linenumber" name="L87" href="#L87">87</a>      }
+<a class="jxr_linenumber" name="L88" href="#L88">88</a>  
+<a class="jxr_linenumber" name="L89" href="#L89">89</a>      @Test
+<a class="jxr_linenumber" name="L90" href="#L90">90</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testAposMap() {
+<a class="jxr_linenumber" name="L91" href="#L91">91</a>          testEscapeVsUnescapeMaps(EntityArrays.APOS_ESCAPE, EntityArrays.APOS_UNESCAPE);
+<a class="jxr_linenumber" name="L92" href="#L92">92</a>      }
+<a class="jxr_linenumber" name="L93" href="#L93">93</a>  
+<a class="jxr_linenumber" name="L94" href="#L94">94</a>      @Test
+<a class="jxr_linenumber" name="L95" href="#L95">95</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testForDuplicateDeclaredMapValuesBasicMap() {
+<a class="jxr_linenumber" name="L96" href="#L96">96</a>          assertEquals(EntityArrays.BASIC_ESCAPE.keySet().size(),
+<a class="jxr_linenumber" name="L97" href="#L97">97</a>                  EntityArrays.BASIC_UNESCAPE.keySet().size());
+<a class="jxr_linenumber" name="L98" href="#L98">98</a>      }
+<a class="jxr_linenumber" name="L99" href="#L99">99</a>  
+<a class="jxr_linenumber" name="L100" href="#L100">100</a>     @Test
+<a class="jxr_linenumber" name="L101" href="#L101">101</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testBasicMap() {
+<a class="jxr_linenumber" name="L102" href="#L102">102</a>         testEscapeVsUnescapeMaps(EntityArrays.BASIC_ESCAPE, EntityArrays.BASIC_UNESCAPE);
+<a class="jxr_linenumber" name="L103" href="#L103">103</a>     }
+<a class="jxr_linenumber" name="L104" href="#L104">104</a> 
+<a class="jxr_linenumber" name="L105" href="#L105">105</a>     @Test
+<a class="jxr_linenumber" name="L106" href="#L106">106</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testForDuplicateDeclaredMapValuesJavaCtrlCharsMap() {
+<a class="jxr_linenumber" name="L107" href="#L107">107</a>         assertEquals(EntityArrays.JAVA_CTRL_CHARS_ESCAPE.keySet().size(),
+<a class="jxr_linenumber" name="L108" href="#L108">108</a>                 EntityArrays.JAVA_CTRL_CHARS_UNESCAPE.keySet().size());
+<a class="jxr_linenumber" name="L109" href="#L109">109</a>     }
+<a class="jxr_linenumber" name="L110" href="#L110">110</a> 
+<a class="jxr_linenumber" name="L111" href="#L111">111</a>     @Test
+<a class="jxr_linenumber" name="L112" href="#L112">112</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testJavaCntrlCharsMap() {
+<a class="jxr_linenumber" name="L113" href="#L113">113</a>         testEscapeVsUnescapeMaps(EntityArrays.JAVA_CTRL_CHARS_ESCAPE, EntityArrays.JAVA_CTRL_CHARS_UNESCAPE);
+<a class="jxr_linenumber" name="L114" href="#L114">114</a>     }
+<a class="jxr_linenumber" name="L115" href="#L115">115</a> 
+<a class="jxr_linenumber" name="L116" href="#L116">116</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">void</strong> testEscapeVsUnescapeMaps(<strong class="jxr_keyword">final</strong> Map&lt;CharSequence, CharSequence&gt; escapeMap,
+<a class="jxr_linenumber" name="L117" href="#L117">117</a>                                           <strong class="jxr_keyword">final</strong> Map&lt;CharSequence, CharSequence&gt; unescapeMap) {
+<a class="jxr_linenumber" name="L118" href="#L118">118</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> CharSequence escapeKey : escapeMap.keySet()) {
+<a class="jxr_linenumber" name="L119" href="#L119">119</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">final</strong> CharSequence unescapeKey : unescapeMap.keySet()) {
+<a class="jxr_linenumber" name="L120" href="#L120">120</a>                 <strong class="jxr_keyword">if</strong> (escapeKey == unescapeMap.get(unescapeKey)) {
+<a class="jxr_linenumber" name="L121" href="#L121">121</a>                     assertEquals(escapeMap.get(escapeKey), unescapeKey);
+<a class="jxr_linenumber" name="L122" href="#L122">122</a>                 }
+<a class="jxr_linenumber" name="L123" href="#L123">123</a>             }
+<a class="jxr_linenumber" name="L124" href="#L124">124</a>         }
+<a class="jxr_linenumber" name="L125" href="#L125">125</a>     }
+<a class="jxr_linenumber" name="L126" href="#L126">126</a>     
+<a class="jxr_linenumber" name="L127" href="#L127">127</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2014&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/LookupTranslatorTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/LookupTranslatorTest.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/LookupTranslatorTest.html Mon Jan 23 12:35:12 2017
@@ -29,34 +29,40 @@
 <a class="jxr_linenumber" name="L21" href="#L21">21</a>  
 <a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> java.io.IOException;
 <a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> java.io.StringWriter;
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> java.util.HashMap;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> java.util.Map;
 <a class="jxr_linenumber" name="L26" href="#L26">26</a>  
-<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment"> * Unit tests for {@link org.apache.commons.text.translate.LookupTranslator}.</em>
-<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> */</em>
-<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/text/translate/LookupTranslatorTest.html">LookupTranslatorTest</a>  {
-<a class="jxr_linenumber" name="L31" href="#L31">31</a>  
-<a class="jxr_linenumber" name="L32" href="#L32">32</a>      @Test
-<a class="jxr_linenumber" name="L33" href="#L33">33</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testBasicLookup() <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="L34" href="#L34">34</a>          <strong class="jxr_keyword">final</strong> org.apache.commons.text.translate.LookupTranslator lt = <strong class="jxr_keyword">new</strong> org.apache.commons.text.translate.LookupTranslator(<strong class="jxr_keyword">new</strong> CharSequence[][] { { <span class="jxr_string">"one"</span>, <span class="jxr_string">"two"</span> } });
-<a class="jxr_linenumber" name="L35" href="#L35">35</a>          <strong class="jxr_keyword">final</strong> StringWriter out = <strong class="jxr_keyword">new</strong> StringWriter();
-<a class="jxr_linenumber" name="L36" href="#L36">36</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result = lt.translate(<span class="jxr_string">"one"</span>, 0, out);
-<a class="jxr_linenumber" name="L37" href="#L37">37</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 3, result);
-<a class="jxr_linenumber" name="L38" href="#L38">38</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"two"</span>, out.toString());
-<a class="jxr_linenumber" name="L39" href="#L39">39</a>      }
-<a class="jxr_linenumber" name="L40" href="#L40">40</a>  
-<a class="jxr_linenumber" name="L41" href="#L41">41</a>      <em class="jxr_comment">// Tests: https://issues.apache.org/jira/browse/LANG-882</em>
-<a class="jxr_linenumber" name="L42" href="#L42">42</a>      @Test
-<a class="jxr_linenumber" name="L43" href="#L43">43</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLang882() <strong class="jxr_keyword">throws</strong> IOException {
-<a class="jxr_linenumber" name="L44" href="#L44">44</a>          <strong class="jxr_keyword">final</strong> org.apache.commons.text.translate.LookupTranslator lt = <strong class="jxr_keyword">new</strong> LookupTranslator(<strong class="jxr_keyword">new</strong> CharSequence[][] { { <strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"one"</span>), <strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"two"</span>) } });
-<a class="jxr_linenumber" name="L45" href="#L45">45</a>          <strong class="jxr_keyword">final</strong> StringWriter out = <strong class="jxr_keyword">new</strong> StringWriter();
-<a class="jxr_linenumber" name="L46" href="#L46">46</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result = lt.translate(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"one"</span>), 0, out);
-<a class="jxr_linenumber" name="L47" href="#L47">47</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 3, result);
-<a class="jxr_linenumber" name="L48" href="#L48">48</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"two"</span>, out.toString());
-<a class="jxr_linenumber" name="L49" href="#L49">49</a>      }
-<a class="jxr_linenumber" name="L50" href="#L50">50</a>  
-<a class="jxr_linenumber" name="L51" href="#L51">51</a>  }
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <em class="jxr_javadoccomment"> * Unit tests for {@link LookupTranslator}.</em>
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/text/translate/LookupTranslatorTest.html">LookupTranslatorTest</a>  {
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>  
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>      @Test
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testBasicLookup() <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>          <strong class="jxr_keyword">final</strong> Map&lt;CharSequence, CharSequence&gt; translatorMap = <strong class="jxr_keyword">new</strong> HashMap&lt;&gt;();
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>          translatorMap.put(<span class="jxr_string">"one"</span>, <span class="jxr_string">"two"</span>);
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>          <strong class="jxr_keyword">final</strong> LookupTranslator lt = <strong class="jxr_keyword">new</strong> LookupTranslator(translatorMap);
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>          <strong class="jxr_keyword">final</strong> StringWriter out = <strong class="jxr_keyword">new</strong> StringWriter();
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result = lt.translate(<span class="jxr_string">"one"</span>, 0, out);
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 3, result);
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"two"</span>, out.toString());
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>      }
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>  
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>      <em class="jxr_comment">// Tests: https://issues.apache.org/jira/browse/LANG-882</em>
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>      @Test
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLang882() <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>          <strong class="jxr_keyword">final</strong> Map&lt;CharSequence, CharSequence&gt; translatorMap = <strong class="jxr_keyword">new</strong> HashMap&lt;&gt;();
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>          translatorMap.put(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"one"</span>), <strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"two"</span>));
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>          <strong class="jxr_keyword">final</strong> LookupTranslator lt = <strong class="jxr_keyword">new</strong> LookupTranslator(translatorMap);
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>          <strong class="jxr_keyword">final</strong> StringWriter out = <strong class="jxr_keyword">new</strong> StringWriter();
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>          <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> result = lt.translate(<strong class="jxr_keyword">new</strong> StringBuffer(<span class="jxr_string">"one"</span>), 0, out);
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>          assertEquals(<span class="jxr_string">"Incorrect codepoint consumption"</span>, 3, result);
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>          assertEquals(<span class="jxr_string">"Incorrect value"</span>, <span class="jxr_string">"two"</span>, out.toString());
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>      }
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>  
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>  }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 2014&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Added: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/SinglePassTranslatorTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/SinglePassTranslatorTest.html (added)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/SinglePassTranslatorTest.html Mon Jan 23 12:35:12 2017
@@ -0,0 +1,70 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head><meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<title>SinglePassTranslatorTest xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../testapidocs/org/apache/commons/text/translate/SinglePassTranslatorTest.html">View Javadoc</a></div><pre>
+<a class="jxr_linenumber" name="L1" href="#L1">1</a>   <em class="jxr_comment">/*</em>
+<a class="jxr_linenumber" name="L2" href="#L2">2</a>   <em class="jxr_comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a class="jxr_linenumber" name="L3" href="#L3">3</a>   <em class="jxr_comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a class="jxr_linenumber" name="L4" href="#L4">4</a>   <em class="jxr_comment"> * this work for additional information regarding copyright ownership.</em>
+<a class="jxr_linenumber" name="L5" href="#L5">5</a>   <em class="jxr_comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a class="jxr_linenumber" name="L6" href="#L6">6</a>   <em class="jxr_comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a class="jxr_linenumber" name="L7" href="#L7">7</a>   <em class="jxr_comment"> * the License.  You may obtain a copy of the License at</em>
+<a class="jxr_linenumber" name="L8" href="#L8">8</a>   <em class="jxr_comment"> *</em>
+<a class="jxr_linenumber" name="L9" href="#L9">9</a>   <em class="jxr_comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2." target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.</a>0</em>
+<a class="jxr_linenumber" name="L10" href="#L10">10</a>  <em class="jxr_comment"> *</em>
+<a class="jxr_linenumber" name="L11" href="#L11">11</a>  <em class="jxr_comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a class="jxr_linenumber" name="L12" href="#L12">12</a>  <em class="jxr_comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a class="jxr_linenumber" name="L13" href="#L13">13</a>  <em class="jxr_comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a class="jxr_linenumber" name="L14" href="#L14">14</a>  <em class="jxr_comment"> * See the License for the specific language governing permissions and</em>
+<a class="jxr_linenumber" name="L15" href="#L15">15</a>  <em class="jxr_comment"> * limitations under the License.</em>
+<a class="jxr_linenumber" name="L16" href="#L16">16</a>  <em class="jxr_comment"> */</em>
+<a class="jxr_linenumber" name="L17" href="#L17">17</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.text.translate;
+<a class="jxr_linenumber" name="L18" href="#L18">18</a>  
+<a class="jxr_linenumber" name="L19" href="#L19">19</a>  <strong class="jxr_keyword">import</strong> org.junit.Before;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> java.io.IOException;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> java.io.StringWriter;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> java.io.Writer;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> <strong class="jxr_keyword">static</strong> org.junit.Assert.assertEquals;
+<a class="jxr_linenumber" name="L27" href="#L27">27</a>  
+<a class="jxr_linenumber" name="L28" href="#L28">28</a>  <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment"> * Unit test for {@link SinglePassTranslator}</em>
+<a class="jxr_linenumber" name="L30" href="#L30">30</a>  <em class="jxr_javadoccomment"> */</em>
+<a class="jxr_linenumber" name="L31" href="#L31">31</a>  <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">class</strong> <a href="../../../../../org/apache/commons/text/translate/SinglePassTranslatorTest.html">SinglePassTranslatorTest</a> {
+<a class="jxr_linenumber" name="L32" href="#L32">32</a>  
+<a class="jxr_linenumber" name="L33" href="#L33">33</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> SinglePassTranslator dummyTranslator = <strong class="jxr_keyword">new</strong> SinglePassTranslator() {
+<a class="jxr_linenumber" name="L34" href="#L34">34</a>          @Override
+<a class="jxr_linenumber" name="L35" href="#L35">35</a>          <strong class="jxr_keyword">void</strong> translateWhole(<strong class="jxr_keyword">final</strong> CharSequence input, <strong class="jxr_keyword">final</strong> Writer out) <strong class="jxr_keyword">throws</strong> IOException {
+<a class="jxr_linenumber" name="L36" href="#L36">36</a>          }
+<a class="jxr_linenumber" name="L37" href="#L37">37</a>      };
+<a class="jxr_linenumber" name="L38" href="#L38">38</a>  
+<a class="jxr_linenumber" name="L39" href="#L39">39</a>      <strong class="jxr_keyword">private</strong> StringWriter out;
+<a class="jxr_linenumber" name="L40" href="#L40">40</a>  
+<a class="jxr_linenumber" name="L41" href="#L41">41</a>      @Before
+<a class="jxr_linenumber" name="L42" href="#L42">42</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> before() {
+<a class="jxr_linenumber" name="L43" href="#L43">43</a>           out = <strong class="jxr_keyword">new</strong> StringWriter();
+<a class="jxr_linenumber" name="L44" href="#L44">44</a>      }
+<a class="jxr_linenumber" name="L45" href="#L45">45</a>  
+<a class="jxr_linenumber" name="L46" href="#L46">46</a>      @Test
+<a class="jxr_linenumber" name="L47" href="#L47">47</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> codePointsAreReturned() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L48" href="#L48">48</a>          assertEquals(0, dummyTranslator.translate(<span class="jxr_string">""</span>, 0, out));
+<a class="jxr_linenumber" name="L49" href="#L49">49</a>          assertEquals(3, dummyTranslator.translate(<span class="jxr_string">"abc"</span>, 0, out));
+<a class="jxr_linenumber" name="L50" href="#L50">50</a>          assertEquals(7, dummyTranslator.translate(<span class="jxr_string">"abcdefg"</span>, 0, out));
+<a class="jxr_linenumber" name="L51" href="#L51">51</a>      }
+<a class="jxr_linenumber" name="L52" href="#L52">52</a>  
+<a class="jxr_linenumber" name="L53" href="#L53">53</a>      @Test(expected = IllegalArgumentException.<strong class="jxr_keyword">class</strong>)
+<a class="jxr_linenumber" name="L54" href="#L54">54</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> indexIsValidated() <strong class="jxr_keyword">throws</strong> Exception {
+<a class="jxr_linenumber" name="L55" href="#L55">55</a>          dummyTranslator.translate(<span class="jxr_string">"abc"</span>, 1, out);
+<a class="jxr_linenumber" name="L56" href="#L56">56</a>      }
+<a class="jxr_linenumber" name="L57" href="#L57">57</a>  }
+</pre>
+<hr/>
+<div id="footer">Copyright &#169; 2014&#x2013;2017 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>
+</body>
+</html>
\ No newline at end of file

Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/package-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/package-frame.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/package-frame.html Mon Jan 23 12:35:12 2017
@@ -37,6 +37,9 @@
             	<a href="OctalUnescaperTest.html" target="classFrame">OctalUnescaperTest</a>
           	</li>
           	          	<li>
+            	<a href="SinglePassTranslatorTest.html" target="classFrame">SinglePassTranslatorTest</a>
+          	</li>
+          	          	<li>
             	<a href="UnicodeEscaperTest.html" target="classFrame">UnicodeEscaperTest</a>
           	</li>
           	          	<li>

Modified: websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/package-summary.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/package-summary.html (original)
+++ websites/production/commons/content/proper/commons-text/xref-test/org/apache/commons/text/translate/package-summary.html Mon Jan 23 12:35:12 2017
@@ -72,6 +72,11 @@
             	</tr>
 				            	<tr>
               		<td>
+                		<a href="SinglePassTranslatorTest.html" target="classFrame">SinglePassTranslatorTest</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
                 		<a href="UnicodeEscaperTest.html" target="classFrame">UnicodeEscaperTest</a>
               		</td>
             	</tr>

Modified: websites/production/commons/content/proper/commons-text/xref/allclasses-frame.html
==============================================================================
--- websites/production/commons/content/proper/commons-text/xref/allclasses-frame.html (original)
+++ websites/production/commons/content/proper/commons-text/xref/allclasses-frame.html Mon Jan 23 12:35:12 2017
@@ -54,10 +54,13 @@
 				<a href="org/apache/commons/text/similarity/Counter.html" target="classFrame">Counter</a>
 			</li>
 						<li>
-				<a href="org/apache/commons/text/StringEscapeUtils.html" target="classFrame">CsvEscaper</a>
+				<a href="org/apache/commons/text/translate/CsvTranslators.html" target="classFrame">CsvEscaper</a>
 			</li>
 						<li>
-				<a href="org/apache/commons/text/StringEscapeUtils.html" target="classFrame">CsvUnescaper</a>
+				<a href="org/apache/commons/text/translate/CsvTranslators.html" target="classFrame">CsvTranslators</a>
+			</li>
+						<li>
+				<a href="org/apache/commons/text/translate/CsvTranslators.html" target="classFrame">CsvUnescaper</a>
 			</li>
 						<li>
 				<a href="org/apache/commons/text/diff/DeleteCommand.html" target="classFrame">DeleteCommand</a>
@@ -165,6 +168,9 @@
 				<a href="org/apache/commons/text/translate/SingleLookupTranslator.html" target="classFrame">SingleLookupTranslator</a>
 			</li>
 						<li>
+				<a href="org/apache/commons/text/translate/SinglePassTranslator.html" target="classFrame">SinglePassTranslator</a>
+			</li>
+						<li>
 				<a href="org/apache/commons/text/diff/StringsComparator.html" target="classFrame">Snake</a>
 			</li>
 						<li>



Mime
View raw message