File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/test/java/com/hubspot/jinjava/el/ext Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 88import com .google .common .collect .ImmutableSet ;
99import com .hubspot .jinjava .JinjavaConfig ;
1010import com .hubspot .jinjava .el .JinjavaELContext ;
11- import com .hubspot .jinjava .interpret .AutoCloseableSupplier ;
1211import com .hubspot .jinjava .interpret .JinjavaInterpreter ;
1312import javax .el .ELContext ;
1413import javax .el .MethodNotFoundException ;
@@ -177,13 +176,12 @@ public void itThrowsExceptionWhenPropertyIsRestrictedFromConfig() {
177176
178177 @ Test
179178 public void itDoesNotAllowAccessingPropertiesOfInterpreter () {
180- try (
181- AutoCloseableSupplier .AutoCloseableImpl <JinjavaInterpreter > c = JinjavaInterpreter
182- .closeablePushCurrent (interpreter )
183- .get ()
184- ) {
179+ JinjavaInterpreter .pushCurrent (interpreter );
180+ try {
185181 assertThat (jinjavaBeanELResolver .getValue (elContext , interpreter , "config" ))
186182 .isNull ();
183+ } finally {
184+ JinjavaInterpreter .popCurrent ();
187185 }
188186 }
189187}
You can’t perform that action at this time.
0 commit comments