Skip to content

Commit b488bfc

Browse files
committed
Fix PMD UnnecessaryFullyQualifiedName in StrSubstitutor
1 parent 78a29c9 commit b488bfc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ The <action> type attribute can be add,update,fix,remove.
5252
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in PropertiesStringLookup.</action>
5353
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in JavaPlatformStringLookup.</action>
5454
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in StringSubstitutor.</action>
55+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in StrSubstitutor.</action>
5556
<!-- ADD -->
5657
<action type="add" dev="ggregory" due-to="Gary Gregory">Interface StringLookup now extends UnaryOperator&lt;String&gt;.</action>
5758
<action type="add" dev="ggregory" due-to="Gary Gregory">Interface TextRandomProvider extends IntUnaryOperator.</action>

src/main/java/org/apache/commons/text/StrSubstitutor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,7 @@ public static String replace(final Object source, final Properties valueProperti
191191
if (valueProperties == null) {
192192
return source.toString();
193193
}
194-
return StrSubstitutor.replace(source,
195-
valueProperties.stringPropertyNames().stream().collect(Collectors.toMap(Function.identity(), valueProperties::getProperty)));
194+
return replace(source, valueProperties.stringPropertyNames().stream().collect(Collectors.toMap(Function.identity(), valueProperties::getProperty)));
196195
}
197196

198197
/**

0 commit comments

Comments
 (0)