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 9fd91e9f Type safety 9fd91e9f is described below commit 9fd91e9fa0eb6320265244277ab9b3b7f8250c72 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sat Jul 16 09:31:47 2022 -0400 Type safety --- src/main/java/org/apache/commons/text/StrSubstitutor.java | 2 +- src/main/java/org/apache/commons/text/StringSubstitutor.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/text/StrSubstitutor.java b/src/main/java/org/apache/commons/text/StrSubstitutor.java index b15385df..8a713834 100644 --- a/src/main/java/org/apache/commons/text/StrSubstitutor.java +++ b/src/main/java/org/apache/commons/text/StrSubstitutor.java @@ -194,7 +194,7 @@ public class StrSubstitutor { final Map<String, String> valueMap = new HashMap<>(); final Enumeration<?> propNames = valueProperties.propertyNames(); while (propNames.hasMoreElements()) { - final String propName = (String) propNames.nextElement(); + final String propName = String.valueOf(propNames.nextElement()); final String propValue = valueProperties.getProperty(propName); valueMap.put(propName, propValue); } diff --git a/src/main/java/org/apache/commons/text/StringSubstitutor.java b/src/main/java/org/apache/commons/text/StringSubstitutor.java index 518eed25..49672750 100644 --- a/src/main/java/org/apache/commons/text/StringSubstitutor.java +++ b/src/main/java/org/apache/commons/text/StringSubstitutor.java @@ -350,7 +350,7 @@ public class StringSubstitutor { final Map<String, String> valueMap = new HashMap<>(); final Enumeration<?> propNames = valueProperties.propertyNames(); while (propNames.hasMoreElements()) { - final String propName = (String) propNames.nextElement(); + final String propName = String.valueOf(propNames.nextElement()); final String propValue = valueProperties.getProperty(propName); valueMap.put(propName, propValue); }