Skip to content

Commit 78a29c9

Browse files
committed
Fix PMD UnnecessaryFullyQualifiedName in StringSubstitutor
1 parent bd83c9a commit 78a29c9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ The <action> type attribute can be add,update,fix,remove.
5151
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in DefaultStringLookupsHolder.</action>
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>
54+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnnecessaryFullyQualifiedName in StringSubstitutor.</action>
5455
<!-- ADD -->
5556
<action type="add" dev="ggregory" due-to="Gary Gregory">Interface StringLookup now extends UnaryOperator&lt;String&gt;.</action>
5657
<action type="add" dev="ggregory" due-to="Gary Gregory">Interface TextRandomProvider extends IntUnaryOperator.</action>

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,7 @@ public static String replace(final Object source, final Properties valueProperti
434434
if (valueProperties == null) {
435435
return source.toString();
436436
}
437-
return StringSubstitutor.replace(source,
438-
valueProperties.stringPropertyNames().stream().collect(Collectors.toMap(Function.identity(), valueProperties::getProperty)));
437+
return replace(source, valueProperties.stringPropertyNames().stream().collect(Collectors.toMap(Function.identity(), valueProperties::getProperty)));
439438
}
440439

441440
/**
@@ -637,7 +636,7 @@ public StringSubstitutor(final StringLookup variableResolver, final StringMatche
637636
}
638637

639638
/**
640-
* Creates a new instance based on the given StringSubstitutor.
639+
* Creates a new instance based on the given
641640
*
642641
* @param other The StringSubstitutor used as the source.
643642
* @since 1.9

0 commit comments

Comments
 (0)