ScriptTemplateView.java (spring-framework-5.3.23) | : | ScriptTemplateView.java (spring-framework-5.3.24) | ||
---|---|---|---|---|
/* | /* | |||
* Copyright 2002-2019 the original author or authors. | * Copyright 2002-2022 the original author or authors. | |||
* | * | |||
* Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | |||
* you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | |||
* You may obtain a copy of the License at | * You may obtain a copy of the License at | |||
* | * | |||
* https://www.apache.org/licenses/LICENSE-2.0 | * https://www.apache.org/licenses/LICENSE-2.0 | |||
* | * | |||
* Unless required by applicable law or agreed to in writing, software | * Unless required by applicable law or agreed to in writing, software | |||
* distributed under the License is distributed on an "AS IS" BASIS, | * distributed under the License is distributed on an "AS IS" BASIS, | |||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
skipping to change at line 256 | skipping to change at line 256 | |||
if (this.engine != null) { | if (this.engine != null) { | |||
engineCount++; | engineCount++; | |||
} | } | |||
if (this.engineSupplier != null) { | if (this.engineSupplier != null) { | |||
engineCount++; | engineCount++; | |||
} | } | |||
if (this.engineName != null) { | if (this.engineName != null) { | |||
engineCount++; | engineCount++; | |||
} | } | |||
Assert.isTrue(engineCount == 1, | Assert.isTrue(engineCount == 1, | |||
"You should define either 'engine', 'engineSuppli er' or 'engineName'."); | "You should define either 'engine', 'engineSuppli er', or 'engineName'."); | |||
if (Boolean.FALSE.equals(this.sharedEngine)) { | if (Boolean.FALSE.equals(this.sharedEngine)) { | |||
Assert.isTrue(this.engine == null, | Assert.isTrue(this.engine == null, | |||
"When 'sharedEngine' is set to false, you should specify the " + | "When 'sharedEngine' is set to false, you should specify the " + | |||
"script engine using 'engineName' or 'eng ineSupplier' , not 'engine'."); | "script engine using 'engineName' or 'eng ineSupplier', not 'engine'."); | |||
} | } | |||
else if (this.engine != null) { | else if (this.engine != null) { | |||
loadScripts(this.engine); | loadScripts(this.engine); | |||
} | } | |||
else if (this.engineName != null) { | else if (this.engineName != null) { | |||
setEngine(createEngineFromName(this.engineName)); | setEngine(createEngineFromName(this.engineName)); | |||
} | } | |||
else { | else { | |||
setEngine(createEngineFromSupplier()); | setEngine(createEngineFromSupplier()); | |||
} | } | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added |