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 2020/11/21 03:15:12 UTC
[commons-text] branch master updated: Use final.
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 da70354 Use final.
da70354 is described below
commit da703545ad252040dae2124c351186a7a3893e49
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 22:15:07 2020 -0500
Use final.
---
src/main/java/org/apache/commons/text/lookup/LocalHostStringLookup.java | 2 +-
src/test/java/org/apache/commons/text/StrBuilderTest.java | 2 +-
src/test/java/org/apache/commons/text/StringSubstitutorTest.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/text/lookup/LocalHostStringLookup.java b/src/main/java/org/apache/commons/text/lookup/LocalHostStringLookup.java
index 8bdc24d..20271ad 100644
--- a/src/main/java/org/apache/commons/text/lookup/LocalHostStringLookup.java
+++ b/src/main/java/org/apache/commons/text/lookup/LocalHostStringLookup.java
@@ -68,7 +68,7 @@ final class LocalHostStringLookup extends AbstractStringLookup {
default:
throw new IllegalArgumentException(key);
}
- } catch (UnknownHostException e) {
+ } catch (final UnknownHostException e) {
return null;
}
}
diff --git a/src/test/java/org/apache/commons/text/StrBuilderTest.java b/src/test/java/org/apache/commons/text/StrBuilderTest.java
index 8b78058..471d3e3 100644
--- a/src/test/java/org/apache/commons/text/StrBuilderTest.java
+++ b/src/test/java/org/apache/commons/text/StrBuilderTest.java
@@ -271,7 +271,7 @@ public class StrBuilderTest {
try (Reader reader = sb.asReader()) {
assertEquals('s', reader.read());
reader.mark(-1);
- char[] array = new char[3];
+ final char[] array = new char[3];
assertEquals(3, reader.read(array, 0, 3));
assertEquals('o', array[0]);
assertEquals('m', array[1]);
diff --git a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
index 368440c..f16c5e4 100644
--- a/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
+++ b/src/test/java/org/apache/commons/text/StringSubstitutorTest.java
@@ -203,7 +203,7 @@ public class StringSubstitutorTest {
@Test
public void testConstructorNullMap() {
- Map<String, Object> parameters = null;
+ final Map<String, Object> parameters = null;
final StringSubstitutor s = new StringSubstitutor(parameters, "prefix", "suffix");
}