Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

script/rules now gracefully handle null return values #3832

Merged
merged 1 commit into from Jul 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -23,6 +23,7 @@ import org.eclipse.xtext.xbase.interpreter.IEvaluationContext
import org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter
import org.eclipse.xtext.xbase.jvmmodel.IJvmModelAssociations
import org.eclipse.xtext.common.types.JvmIdentifiableElement
import org.eclipse.xtext.xbase.XExpression

/**
* The script interpreter handles ESH specific script components, which are not known
Expand Down Expand Up @@ -111,5 +112,12 @@ public class ScriptInterpreter extends XbaseInterpreter {
super._assignValueTo(jvmField, assignment, value, context, indicator)
}
}

override protected doEvaluate(XExpression expression, IEvaluationContext context, CancelIndicator indicator) {
if (expression == null) {
return null
}
return super.doEvaluate(expression, context, indicator)
}

}