-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a4b753
commit 8060232
Showing
35 changed files
with
710 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...-core/src/main/java/org/apache/logging/log4j/core/lookup/ConfigurationStrSubstitutor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.apache.logging.log4j.core.lookup; | ||
|
||
import java.util.Map; | ||
import java.util.Properties; | ||
|
||
/** | ||
* {@link RuntimeStrSubstitutor} is a {@link StrSubstitutor} which only supports recursive evaluation of lookups. | ||
* This can be dangerous when combined with user-provided inputs, and should only be used on data directly from | ||
* a configuration. | ||
*/ | ||
public final class ConfigurationStrSubstitutor extends StrSubstitutor { | ||
|
||
public ConfigurationStrSubstitutor() { | ||
} | ||
|
||
public ConfigurationStrSubstitutor(final Map<String, String> valueMap) { | ||
super(valueMap); | ||
} | ||
|
||
public ConfigurationStrSubstitutor(final Properties properties) { | ||
super(properties); | ||
} | ||
|
||
public ConfigurationStrSubstitutor(final StrLookup lookup) { | ||
super(lookup); | ||
} | ||
|
||
public ConfigurationStrSubstitutor(final StrSubstitutor other) { | ||
super(other); | ||
} | ||
|
||
@Override | ||
boolean isRecursiveEvaluationAllowed() { | ||
return true; | ||
} | ||
|
||
@Override | ||
void setRecursiveEvaluationAllowed(final boolean recursiveEvaluationAllowed) { | ||
throw new UnsupportedOperationException( | ||
"recursiveEvaluationAllowed cannot be modified within ConfigurationStrSubstitutor"); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ConfigurationStrSubstitutor{" + super.toString() + "}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.