You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by st...@apache.org on 2020/06/02 15:43:12 UTC
[deltaspike] branch master updated: DELTASPIKE-1397 log variable in
case of recursive definition
This is an automated email from the ASF dual-hosted git repository.
struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/deltaspike.git
The following commit(s) were added to refs/heads/master by this push:
new da93fe7 DELTASPIKE-1397 log variable in case of recursive definition
da93fe7 is described below
commit da93fe7882bfaaa816daba7a71401a21823d4e92
Author: Mark Struberg <st...@apache.org>
AuthorDate: Tue Jun 2 17:42:30 2020 +0200
DELTASPIKE-1397 log variable in case of recursive definition
---
.../deltaspike/core/impl/config/TypedResolverImpl.java | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java
index cd981cf..8997a1e 100644
--- a/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java
+++ b/deltaspike/core/impl/src/main/java/org/apache/deltaspike/core/impl/config/TypedResolverImpl.java
@@ -550,14 +550,23 @@ public class TypedResolverImpl<T> implements ConfigResolver.UntypedResolver<T>
break;
}
- String variableValue = new TypedResolverImpl<String>(this.config, varName)
+ try
+ {
+ String variableValue = new TypedResolverImpl<String>(this.config, varName)
.withCurrentProjectStage(this.projectStageAware)
.evaluateVariables(true)
.getValue();
- if (variableValue != null)
+ if (variableValue != null)
+ {
+ value = value.replace("${" + varName + "}", variableValue);
+ }
+ }
+ catch (StackOverflowError soe)
{
- value = value.replace("${" + varName + "}", variableValue);
+ // just log out
+ LOG.severe("Recursive variable resolution detected for " + varName);
+ throw soe;
}
startVar++;
}