Skip to content

Commit 77deff0

Browse files
committed
Restore origin behaivour of evaluateToString()
1 parent 31ec1ad commit 77deff0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/eu/openanalytics/containerproxy/spec/expression/SpecExpressionResolver.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,12 @@ public <T> T evaluate(String expression, SpecExpressionContext context, Class<T>
112112
}
113113

114114
public String evaluateToString(String expression, SpecExpressionContext context) {
115-
String res = evaluate(expression, context, String.class);
115+
// use the toString() method and not the conversionService in order to maintain behaviour of ShinyProxy 2.6.1 and earlier
116+
Object res = evaluate(expression, context, Object.class);
116117
if (res == null) {
117118
return "";
118119
}
119-
return res;
120+
return res.toString();
120121
}
121122

122123
public Long evaluateToLong(String expression, SpecExpressionContext context) {

src/main/java/eu/openanalytics/containerproxy/spec/expression/SpelField.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ public SpelField.StringList resolve(SpecExpressionResolver specExpressionResolve
244244
if (originalValue == null) {
245245
return new SpelField.StringList(null, null);
246246
}
247-
// TODO implementation is different from ExpressionAwareContainerSpec::resolve
248247
return new SpelField.StringList(originalValue, specExpressionResolver.evaluateToList(originalValue, specExpressionContext));
249248
}
250249

0 commit comments

Comments
 (0)