Skip to content

Commit

Permalink
removed useless "fast"-path from ConfigValue#interpretScalar, which c…
Browse files Browse the repository at this point in the history
…reated a needless case-decision later on
  • Loading branch information
BlvckBytes committed Oct 25, 2024
1 parent 362e80b commit 4ade69c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/main/java/me/blvckbytes/bbconfigmapper/ConfigValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ public <T, U> Map<T, U> asMap(ScalarType<T> key, ScalarType<T> value, IEvaluatio
*/
@SuppressWarnings("unchecked")
protected <T> T interpretScalar(@Nullable Object input, ScalarType<T> type, IEvaluationEnvironment env) {
Class<?> typeClass = type.getType();

if (typeClass.isInstance(input))
return (T) input;

// The input is an expression which needs to be evaluated first
if (input instanceof AExpression)
input = this.evaluator.evaluateExpression((AExpression) input, env);
Expand Down

0 comments on commit 4ade69c

Please sign in to comment.