class ProblemDetectingValueSource implements ValueSource {

    private final ValueSource valueSource;

    private final String bannedPrefix;

    private final String newPrefix;

    private final ModelProblemCollector problems;

    ProblemDetectingValueSource(
            ValueSource valueSource, String bannedPrefix, String newPrefix, ModelProblemCollector problems) {
        this.valueSource = valueSource;
        this.bannedPrefix = bannedPrefix;
        this.newPrefix = newPrefix;
        this.problems = problems;
    }

    @Override
    public Object getValue(String expression) {<FILL_FUNCTION_BODY>}

    @Override
    public List getFeedback() {
        return valueSource.getFeedback();
    }

    @Override
    public void clearFeedback() {
        valueSource.clearFeedback();
    }
}

        Object value = valueSource.getValue(expression);

        if (value != null && expression.startsWith(bannedPrefix)) {
            String msg = "The expression ${" + expression + "} is deprecated.";
            if (newPrefix != null && !newPrefix.isEmpty()) {
                msg += " Please use ${" + newPrefix + expression.substring(bannedPrefix.length()) + "} instead.";
            }
            problems.add(new ModelProblemCollectorRequest(Severity.WARNING, Version.V20).setMessage(msg));
        }

        return value;
    
<no_super_class>