You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/06/10 12:04:15 UTC
[commons-text] branch master updated: Fix camel case and comment typos.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-text.git
The following commit(s) were added to refs/heads/master by this push:
new 807418d4 Fix camel case and comment typos.
807418d4 is described below
commit 807418d4ec1b6db0aaad07b7c60209e4b230ddbc
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 10 08:04:10 2022 -0400
Fix camel case and comment typos.
---
.../org/apache/commons/text/AlphabetConverter.java | 12 ++--
.../org/apache/commons/text/StringEscapeUtils.java | 4 +-
.../text/translate/AggregateTranslator.java | 6 +-
.../text/translate/CharSequenceTranslator.java | 14 ++---
.../text/translate/CodePointTranslator.java | 10 ++--
.../commons/text/translate/JavaUnicodeEscaper.java | 44 +++++++--------
.../text/translate/NumericEntityEscaper.java | 42 +++++++-------
.../text/translate/NumericEntityUnescaper.java | 2 +-
.../commons/text/translate/UnicodeEscaper.java | 66 +++++++++++-----------
.../translate/UnicodeUnpairedSurrogateRemover.java | 4 +-
.../apache/commons/text/StringEscapeUtilsTest.java | 2 +-
.../text/translate/AggregateTranslatorTest.java | 4 +-
.../text/translate/LookupTranslatorTest.java | 4 +-
13 files changed, 107 insertions(+), 107 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/AlphabetConverter.java b/src/main/java/org/apache/commons/text/AlphabetConverter.java
index 7a4c8227..bad9460d 100644
--- a/src/main/java/org/apache/commons/text/AlphabetConverter.java
+++ b/src/main/java/org/apache/commons/text/AlphabetConverter.java
@@ -119,9 +119,9 @@ public final class AlphabetConverter {
* <p>Duplicate letters in either original or encoding will be ignored.</p>
*
* @param original an array of ints representing the original alphabet in
- * codepoints
+ * code points
* @param encoding an array of ints representing the alphabet to be used for
- * encoding, in codepoints
+ * encoding, in code points
* @param doNotEncode an array of ints representing the chars to be encoded
* using the original alphabet - every char
* here must appear in both the previous params
@@ -438,14 +438,14 @@ public final class AlphabetConverter {
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < original.length();) {
- final int codepoint = original.codePointAt(i);
+ final int codePoint = original.codePointAt(i);
- final String nextLetter = originalToEncoded.get(codepoint);
+ final String nextLetter = originalToEncoded.get(codePoint);
if (nextLetter == null) {
throw new UnsupportedEncodingException(
"Couldn't find encoding for '"
- + codePointToString(codepoint)
+ + codePointToString(codePoint)
+ "' in "
+ original
);
@@ -453,7 +453,7 @@ public final class AlphabetConverter {
sb.append(nextLetter);
- i += Character.charCount(codepoint);
+ i += Character.charCount(codePoint);
}
return sb.toString();
diff --git a/src/main/java/org/apache/commons/text/StringEscapeUtils.java b/src/main/java/org/apache/commons/text/StringEscapeUtils.java
index 08441585..58fa277a 100644
--- a/src/main/java/org/apache/commons/text/StringEscapeUtils.java
+++ b/src/main/java/org/apache/commons/text/StringEscapeUtils.java
@@ -647,7 +647,7 @@ public class StringEscapeUtils {
* </p>
*
* <p>Note that XML 1.0 is a text-only format: it cannot represent control
- * characters or unpaired Unicode surrogate codepoints, even after escaping.
+ * characters or unpaired Unicode surrogate code points, even after escaping.
* {@code escapeXml10} will remove characters that do not fit in the
* following ranges:</p>
*
@@ -678,7 +678,7 @@ public class StringEscapeUtils {
* </p>
*
* <p>XML 1.1 can represent certain control characters, but it cannot represent
- * the null byte or unpaired Unicode surrogate codepoints, even after escaping.
+ * the null byte or unpaired Unicode surrogate code points, even after escaping.
* {@code escapeXml11} will remove characters that do not fit in the following
* ranges:</p>
*
diff --git a/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java b/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
index c0982f68..53d404f6 100644
--- a/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
* Executes a sequence of translators one after the other. Execution ends whenever
- * the first translator consumes codepoints from the input.
+ * the first translator consumes code points from the input.
*
* @since 1.0
*/
@@ -50,8 +50,8 @@ public class AggregateTranslator extends CharSequenceTranslator {
}
/**
- * The first translator to consume codepoints from the input is the 'winner'.
- * Execution stops with the number of consumed codepoints being returned.
+ * The first translator to consume code points from the input is the 'winner'.
+ * Execution stops with the number of consumed code points being returned.
* {@inheritDoc}
*/
@Override
diff --git a/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java b/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
index 526d00c4..6a96a222 100644
--- a/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/CharSequenceTranslator.java
@@ -42,11 +42,11 @@ public abstract class CharSequenceTranslator {
* Returns an upper case hexadecimal {@code String} for the given
* character.
*
- * @param codepoint The codepoint to convert.
+ * @param codePoint The code point to convert.
* @return An upper case hexadecimal {@code String}
*/
- public static String hex(final int codepoint) {
- return Integer.toHexString(codepoint).toUpperCase(Locale.ENGLISH);
+ public static String hex(final int codePoint) {
+ return Integer.toHexString(codePoint).toUpperCase(Locale.ENGLISH);
}
/**
@@ -69,15 +69,15 @@ public abstract class CharSequenceTranslator {
}
/**
- * Translate a set of codepoints, represented by an int index into a CharSequence,
- * into another set of codepoints. The number of codepoints consumed must be returned,
+ * Translate a set of code points, represented by an int index into a CharSequence,
+ * into another set of code points. The number of code points consumed must be returned,
* and the only IOExceptions thrown must be from interacting with the Writer so that
* the top level API may reliably ignore StringWriter IOExceptions.
*
* @param input CharSequence that is being translated
* @param index int representing the current point of translation
* @param writer Writer to translate the text to
- * @return int count of codepoints consumed
+ * @return int count of code points consumed
* @throws IOException if and only if the Writer produces an IOException
*/
public abstract int translate(CharSequence input, int index, Writer writer) throws IOException;
@@ -114,7 +114,7 @@ public abstract class CharSequenceTranslator {
}
continue;
}
- // contract with translators is that they have to understand codepoints
+ // contract with translators is that they have to understand code points
// and they just took care of a surrogate pair
for (int pt = 0; pt < consumed; pt++) {
pos += Character.charCount(Character.codePointAt(input, pos));
diff --git a/src/main/java/org/apache/commons/text/translate/CodePointTranslator.java b/src/main/java/org/apache/commons/text/translate/CodePointTranslator.java
index e5ea5e32..992c46eb 100644
--- a/src/main/java/org/apache/commons/text/translate/CodePointTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/CodePointTranslator.java
@@ -33,19 +33,19 @@ public abstract class CodePointTranslator extends CharSequenceTranslator {
*/
@Override
public final int translate(final CharSequence input, final int index, final Writer writer) throws IOException {
- final int codepoint = Character.codePointAt(input, index);
- final boolean consumed = translate(codepoint, writer);
+ final int codePoint = Character.codePointAt(input, index);
+ final boolean consumed = translate(codePoint, writer);
return consumed ? 1 : 0;
}
/**
- * Translates the specified codepoint into another.
+ * Translates the specified code point into another.
*
- * @param codepoint int character input to translate
+ * @param codePoint int character input to translate
* @param writer Writer to optionally push the translated output to
* @return boolean as to whether translation occurred or not
* @throws IOException if and only if the Writer produces an IOException
*/
- public abstract boolean translate(int codepoint, Writer writer) throws IOException;
+ public abstract boolean translate(int codePoint, Writer writer) throws IOException;
}
diff --git a/src/main/java/org/apache/commons/text/translate/JavaUnicodeEscaper.java b/src/main/java/org/apache/commons/text/translate/JavaUnicodeEscaper.java
index 49a8041a..084c8eba 100644
--- a/src/main/java/org/apache/commons/text/translate/JavaUnicodeEscaper.java
+++ b/src/main/java/org/apache/commons/text/translate/JavaUnicodeEscaper.java
@@ -17,7 +17,7 @@
package org.apache.commons.text.translate;
/**
- * Translates codepoints to their Unicode escaped value suitable for Java source.
+ * Translates code points to their Unicode escaped value suitable for Java source.
*
* @since 1.0
*/
@@ -26,49 +26,49 @@ public class JavaUnicodeEscaper extends UnicodeEscaper {
/**
* Constructs a {@code JavaUnicodeEscaper} above the specified value (exclusive).
*
- * @param codepoint
+ * @param codePoint
* above which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static JavaUnicodeEscaper above(final int codepoint) {
- return outsideOf(0, codepoint);
+ public static JavaUnicodeEscaper above(final int codePoint) {
+ return outsideOf(0, codePoint);
}
/**
* Constructs a {@code JavaUnicodeEscaper} below the specified value (exclusive).
*
- * @param codepoint
+ * @param codePoint
* below which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static JavaUnicodeEscaper below(final int codepoint) {
- return outsideOf(codepoint, Integer.MAX_VALUE);
+ public static JavaUnicodeEscaper below(final int codePoint) {
+ return outsideOf(codePoint, Integer.MAX_VALUE);
}
/**
* Constructs a {@code JavaUnicodeEscaper} between the specified values (inclusive).
*
- * @param codepointLow
+ * @param codePointLow
* above which to escape
- * @param codepointHigh
+ * @param codePointHigh
* below which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static JavaUnicodeEscaper between(final int codepointLow, final int codepointHigh) {
- return new JavaUnicodeEscaper(codepointLow, codepointHigh, true);
+ public static JavaUnicodeEscaper between(final int codePointLow, final int codePointHigh) {
+ return new JavaUnicodeEscaper(codePointLow, codePointHigh, true);
}
/**
* Constructs a {@code JavaUnicodeEscaper} outside of the specified values (exclusive).
*
- * @param codepointLow
+ * @param codePointLow
* below which to escape
- * @param codepointHigh
+ * @param codePointHigh
* above which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static JavaUnicodeEscaper outsideOf(final int codepointLow, final int codepointHigh) {
- return new JavaUnicodeEscaper(codepointLow, codepointHigh, false);
+ public static JavaUnicodeEscaper outsideOf(final int codePointLow, final int codePointHigh) {
+ return new JavaUnicodeEscaper(codePointLow, codePointHigh, false);
}
/**
@@ -77,9 +77,9 @@ public class JavaUnicodeEscaper extends UnicodeEscaper {
* {@code between} is {@code true} and exclusive when it is {@code false}.
*
* @param below
- * int value representing the lowest codepoint boundary
+ * int value representing the lowest code point boundary
* @param above
- * int value representing the highest codepoint boundary
+ * int value representing the highest code point boundary
* @param between
* whether to escape between the boundaries or outside them
*/
@@ -88,15 +88,15 @@ public class JavaUnicodeEscaper extends UnicodeEscaper {
}
/**
- * Converts the given codepoint to a hex string of the form {@code "\\uXXXX\\uXXXX"}.
+ * Converts the given code point to a hex string of the form {@code "\\uXXXX\\uXXXX"}.
*
- * @param codepoint
+ * @param codePoint
* a Unicode code point
- * @return The hex string for the given codepoint
+ * @return The hex string for the given code point
*/
@Override
- protected String toUtf16Escape(final int codepoint) {
- final char[] surrogatePair = Character.toChars(codepoint);
+ protected String toUtf16Escape(final int codePoint) {
+ final char[] surrogatePair = Character.toChars(codePoint);
return "\\u" + hex(surrogatePair[0]) + "\\u" + hex(surrogatePair[1]);
}
diff --git a/src/main/java/org/apache/commons/text/translate/NumericEntityEscaper.java b/src/main/java/org/apache/commons/text/translate/NumericEntityEscaper.java
index 693cb922..e30a2309 100644
--- a/src/main/java/org/apache/commons/text/translate/NumericEntityEscaper.java
+++ b/src/main/java/org/apache/commons/text/translate/NumericEntityEscaper.java
@@ -22,7 +22,7 @@ import java.io.Writer;
import org.apache.commons.lang3.Range;
/**
- * Translates codepoints to their XML numeric entity escaped value.
+ * Translates code points to their XML numeric entity escaped value.
*
* @since 1.0
*/
@@ -31,49 +31,49 @@ public class NumericEntityEscaper extends CodePointTranslator {
/**
* Constructs a {@code NumericEntityEscaper} above the specified value (exclusive).
*
- * @param codepoint above which to escape
+ * @param codePoint above which to escape
* @return The newly created {@code NumericEntityEscaper} instance
*/
- public static NumericEntityEscaper above(final int codepoint) {
- return outsideOf(0, codepoint);
+ public static NumericEntityEscaper above(final int codePoint) {
+ return outsideOf(0, codePoint);
}
/**
* Constructs a {@code NumericEntityEscaper} below the specified value (exclusive).
*
- * @param codepoint below which to escape
+ * @param codePoint below which to escape
* @return The newly created {@code NumericEntityEscaper} instance
*/
- public static NumericEntityEscaper below(final int codepoint) {
- return outsideOf(codepoint, Integer.MAX_VALUE);
+ public static NumericEntityEscaper below(final int codePoint) {
+ return outsideOf(codePoint, Integer.MAX_VALUE);
}
/**
* Constructs a {@code NumericEntityEscaper} between the specified values (inclusive).
*
- * @param codepointLow above which to escape
- * @param codepointHigh below which to escape
+ * @param codePointLow above which to escape
+ * @param codePointHigh below which to escape
* @return The newly created {@code NumericEntityEscaper} instance
*/
- public static NumericEntityEscaper between(final int codepointLow, final int codepointHigh) {
- return new NumericEntityEscaper(codepointLow, codepointHigh, true);
+ public static NumericEntityEscaper between(final int codePointLow, final int codePointHigh) {
+ return new NumericEntityEscaper(codePointLow, codePointHigh, true);
}
/**
* Constructs a {@code NumericEntityEscaper} outside of the specified values (exclusive).
*
- * @param codepointLow below which to escape
- * @param codepointHigh above which to escape
+ * @param codePointLow below which to escape
+ * @param codePointHigh above which to escape
* @return The newly created {@code NumericEntityEscaper} instance
*/
- public static NumericEntityEscaper outsideOf(final int codepointLow, final int codepointHigh) {
- return new NumericEntityEscaper(codepointLow, codepointHigh, false);
+ public static NumericEntityEscaper outsideOf(final int codePointLow, final int codePointHigh) {
+ return new NumericEntityEscaper(codePointLow, codePointHigh, false);
}
/** whether to escape between the boundaries or outside them. */
private final boolean between;
- /** range from lowest codepoint to highest codepoint. */
+ /** range from lowest code point to highest code point. */
private final Range<Integer> range;
/**
@@ -89,8 +89,8 @@ public class NumericEntityEscaper extends CodePointTranslator {
* and {@code above} boundaries are inclusive when {@code between} is
* {@code true} and exclusive when it is {@code false}.
*
- * @param below int value representing the lowest codepoint boundary
- * @param above int value representing the highest codepoint boundary
+ * @param below int value representing the lowest code point boundary
+ * @param above int value representing the highest code point boundary
* @param between whether to escape between the boundaries or outside them
*/
private NumericEntityEscaper(final int below, final int above, final boolean between) {
@@ -102,12 +102,12 @@ public class NumericEntityEscaper extends CodePointTranslator {
* {@inheritDoc}
*/
@Override
- public boolean translate(final int codepoint, final Writer writer) throws IOException {
- if (this.between != this.range.contains(codepoint)) {
+ public boolean translate(final int codePoint, final Writer writer) throws IOException {
+ if (this.between != this.range.contains(codePoint)) {
return false;
}
writer.write("&#");
- writer.write(Integer.toString(codepoint, 10));
+ writer.write(Integer.toString(codePoint, 10));
writer.write(';');
return true;
}
diff --git a/src/main/java/org/apache/commons/text/translate/NumericEntityUnescaper.java b/src/main/java/org/apache/commons/text/translate/NumericEntityUnescaper.java
index 57f1b5e8..29029561 100644
--- a/src/main/java/org/apache/commons/text/translate/NumericEntityUnescaper.java
+++ b/src/main/java/org/apache/commons/text/translate/NumericEntityUnescaper.java
@@ -26,7 +26,7 @@ import org.apache.commons.lang3.ArrayUtils;
/**
* Translates XML numeric entities of the form &#[xX]?\d+;? to
- * the specific codepoint.
+ * the specific code point.
*
* Note that the semicolon is optional.
*
diff --git a/src/main/java/org/apache/commons/text/translate/UnicodeEscaper.java b/src/main/java/org/apache/commons/text/translate/UnicodeEscaper.java
index 9602679c..ea7081dc 100644
--- a/src/main/java/org/apache/commons/text/translate/UnicodeEscaper.java
+++ b/src/main/java/org/apache/commons/text/translate/UnicodeEscaper.java
@@ -20,7 +20,7 @@ import java.io.IOException;
import java.io.Writer;
/**
- * Translates codepoints to their Unicode escaped value.
+ * Translates code points to their Unicode escaped value.
*
* @since 1.0
*/
@@ -29,47 +29,47 @@ public class UnicodeEscaper extends CodePointTranslator {
/**
* Constructs a {@code UnicodeEscaper} above the specified value (exclusive).
*
- * @param codepoint above which to escape
+ * @param codePoint above which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static UnicodeEscaper above(final int codepoint) {
- return outsideOf(0, codepoint);
+ public static UnicodeEscaper above(final int codePoint) {
+ return outsideOf(0, codePoint);
}
/**
* Constructs a {@code UnicodeEscaper} below the specified value (exclusive).
*
- * @param codepoint below which to escape
+ * @param codePoint below which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static UnicodeEscaper below(final int codepoint) {
- return outsideOf(codepoint, Integer.MAX_VALUE);
+ public static UnicodeEscaper below(final int codePoint) {
+ return outsideOf(codePoint, Integer.MAX_VALUE);
}
/**
* Constructs a {@code UnicodeEscaper} between the specified values (inclusive).
*
- * @param codepointLow above which to escape
- * @param codepointHigh below which to escape
+ * @param codePointLow above which to escape
+ * @param codePointHigh below which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static UnicodeEscaper between(final int codepointLow, final int codepointHigh) {
- return new UnicodeEscaper(codepointLow, codepointHigh, true);
+ public static UnicodeEscaper between(final int codePointLow, final int codePointHigh) {
+ return new UnicodeEscaper(codePointLow, codePointHigh, true);
}
/**
* Constructs a {@code UnicodeEscaper} outside of the specified values (exclusive).
*
- * @param codepointLow below which to escape
- * @param codepointHigh above which to escape
+ * @param codePointLow below which to escape
+ * @param codePointHigh above which to escape
* @return The newly created {@code UnicodeEscaper} instance
*/
- public static UnicodeEscaper outsideOf(final int codepointLow, final int codepointHigh) {
- return new UnicodeEscaper(codepointLow, codepointHigh, false);
+ public static UnicodeEscaper outsideOf(final int codePointLow, final int codePointHigh) {
+ return new UnicodeEscaper(codePointLow, codePointHigh, false);
}
- /** int value representing the lowest codepoint boundary. */
+ /** int value representing the lowest code point boundary. */
private final int below;
- /** int value representing the highest codepoint boundary. */
+ /** int value representing the highest code point boundary. */
private final int above;
/** whether to escape between the boundaries or outside them. */
@@ -89,8 +89,8 @@ public class UnicodeEscaper extends CodePointTranslator {
* and {@code above} boundaries are inclusive when {@code between} is
* {@code true} and exclusive when it is {@code false}.
*
- * @param below int value representing the lowest codepoint boundary
- * @param above int value representing the highest codepoint boundary
+ * @param below int value representing the lowest code point boundary
+ * @param above int value representing the highest code point boundary
* @param between whether to escape between the boundaries or outside them
*/
protected UnicodeEscaper(final int below, final int above, final boolean between) {
@@ -100,38 +100,38 @@ public class UnicodeEscaper extends CodePointTranslator {
}
/**
- * Converts the given codepoint to a hex string of the form {@code "\\uXXXX"}.
+ * Converts the given code point to a hex string of the form {@code "\\uXXXX"}.
*
- * @param codepoint
+ * @param codePoint
* a Unicode code point
- * @return The hex string for the given codepoint
+ * @return The hex string for the given code point
*
*/
- protected String toUtf16Escape(final int codepoint) {
- return "\\u" + hex(codepoint);
+ protected String toUtf16Escape(final int codePoint) {
+ return "\\u" + hex(codePoint);
}
/**
* {@inheritDoc}
*/
@Override
- public boolean translate(final int codepoint, final Writer writer) throws IOException {
+ public boolean translate(final int codePoint, final Writer writer) throws IOException {
if (between) {
- if (codepoint < below || codepoint > above) {
+ if (codePoint < below || codePoint > above) {
return false;
}
- } else if (codepoint >= below && codepoint <= above) {
+ } else if (codePoint >= below && codePoint <= above) {
return false;
}
- if (codepoint > 0xffff) {
- writer.write(toUtf16Escape(codepoint));
+ if (codePoint > 0xffff) {
+ writer.write(toUtf16Escape(codePoint));
} else {
writer.write("\\u");
- writer.write(HEX_DIGITS[codepoint >> 12 & 15]);
- writer.write(HEX_DIGITS[codepoint >> 8 & 15]);
- writer.write(HEX_DIGITS[codepoint >> 4 & 15]);
- writer.write(HEX_DIGITS[codepoint & 15]);
+ writer.write(HEX_DIGITS[codePoint >> 12 & 15]);
+ writer.write(HEX_DIGITS[codePoint >> 8 & 15]);
+ writer.write(HEX_DIGITS[codePoint >> 4 & 15]);
+ writer.write(HEX_DIGITS[codePoint & 15]);
}
return true;
}
diff --git a/src/main/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.java b/src/main/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.java
index 9d7c6c20..0bb8670d 100644
--- a/src/main/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.java
+++ b/src/main/java/org/apache/commons/text/translate/UnicodeUnpairedSurrogateRemover.java
@@ -30,9 +30,9 @@ public class UnicodeUnpairedSurrogateRemover extends CodePointTranslator {
* {@inheritDoc}
*/
@Override
- public boolean translate(final int codepoint, final Writer writer) throws IOException {
+ public boolean translate(final int codePoint, final Writer writer) throws IOException {
// If true, it is a surrogate. Write nothing and say we've translated. Otherwise return false, and don't translate it.
- return codepoint >= Character.MIN_SURROGATE && codepoint <= Character.MAX_SURROGATE;
+ return codePoint >= Character.MIN_SURROGATE && codePoint <= Character.MAX_SURROGATE;
}
}
diff --git a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
index 4651a4e5..7faf390b 100644
--- a/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
+++ b/src/test/java/org/apache/commons/text/StringEscapeUtilsTest.java
@@ -250,7 +250,7 @@ public void testEscapeEcmaScript() {
// this is the utf8 representation of the character:
// COUNTING ROD UNIT DIGIT THREE
// in Unicode
- // codepoint: U+1D362
+ // code point: U+1D362
final byte[] data = {(byte) 0xF0, (byte) 0x9D, (byte) 0x8D, (byte) 0xA2};
final String original = new String(data, StandardCharsets.UTF_8);
diff --git a/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java b/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java
index 05334b3c..a3bdc9d8 100644
--- a/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java
+++ b/src/test/java/org/apache/commons/text/translate/AggregateTranslatorTest.java
@@ -41,11 +41,11 @@ public class AggregateTranslatorTest {
final AggregateTranslator subject = new AggregateTranslator(translator1, translator2);
final StringWriter out1 = new StringWriter();
final int result1 = subject.translate(new StringBuffer("one"), 0, out1);
- assertThat(result1).as("Incorrect codepoint consumption").isEqualTo(3);
+ assertThat(result1).as("Incorrect code point consumption").isEqualTo(3);
assertThat(out1.toString()).as("Incorrect value").isEqualTo("two");
final StringWriter out2 = new StringWriter();
final int result2 = subject.translate(new StringBuffer("three"), 0, out2);
- assertThat(result2).as("Incorrect codepoint consumption").isEqualTo(5);
+ assertThat(result2).as("Incorrect code point consumption").isEqualTo(5);
assertThat(out2.toString()).as("Incorrect value").isEqualTo("four");
}
diff --git a/src/test/java/org/apache/commons/text/translate/LookupTranslatorTest.java b/src/test/java/org/apache/commons/text/translate/LookupTranslatorTest.java
index 5ab58893..548434ff 100644
--- a/src/test/java/org/apache/commons/text/translate/LookupTranslatorTest.java
+++ b/src/test/java/org/apache/commons/text/translate/LookupTranslatorTest.java
@@ -40,7 +40,7 @@ public class LookupTranslatorTest {
final LookupTranslator lt = new LookupTranslator(translatorMap);
final StringWriter out = new StringWriter();
final int result = lt.translate("one", 0, out);
- assertThat(result).as("Incorrect codepoint consumption").isEqualTo(3);
+ assertThat(result).as("Incorrect code point consumption").isEqualTo(3);
assertThat(out.toString()).as("Incorrect value").isEqualTo("two");
}
@@ -57,7 +57,7 @@ public class LookupTranslatorTest {
final LookupTranslator lt = new LookupTranslator(translatorMap);
final StringWriter out = new StringWriter();
final int result = lt.translate(new StringBuffer("one"), 0, out);
- assertThat(result).as("Incorrect codepoint consumption").isEqualTo(3);
+ assertThat(result).as("Incorrect code point consumption").isEqualTo(3);
assertThat(out.toString()).as("Incorrect value").isEqualTo("two");
}