Fix nullability warnings and javadoc-triggered package cycles
This commit is contained in:
@@ -124,6 +124,7 @@ public class ScriptTemplateView extends AbstractUrlBasedView {
|
||||
|
||||
/**
|
||||
* See {@link ScriptTemplateConfigurer#setEngineSupplier(Supplier)} documentation.
|
||||
* @since 5.2
|
||||
*/
|
||||
public void setEngineSupplier(Supplier<ScriptEngine> engineSupplier) {
|
||||
this.engineSupplier = engineSupplier;
|
||||
@@ -276,8 +277,9 @@ public class ScriptTemplateView extends AbstractUrlBasedView {
|
||||
}
|
||||
|
||||
private ScriptEngine createEngineFromSupplier() {
|
||||
Assert.state(this.engineSupplier != null, "No engine supplier available");
|
||||
ScriptEngine engine = this.engineSupplier.get();
|
||||
if (this.renderFunction != null && engine != null) {
|
||||
if (this.renderFunction != null) {
|
||||
Assert.isInstanceOf(Invocable.class, engine,
|
||||
"ScriptEngine must implement Invocable when 'renderFunction' is specified");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user