Remove APIs marked as deprecated for removal
Closes gh-33809
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
|
||||
package org.springframework.expression.spel;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.core.convert.TypeDescriptor;
|
||||
@@ -55,21 +53,6 @@ class ExpressionStateTests extends AbstractExpressionTests {
|
||||
assertThat(state.getEvaluationContext()).isEqualTo(context);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void localVariables() {
|
||||
Object value = state.lookupLocalVariable("foo");
|
||||
assertThat(value).isNull();
|
||||
|
||||
state.setLocalVariable("foo",34);
|
||||
value = state.lookupLocalVariable("foo");
|
||||
assertThat(value).isEqualTo(34);
|
||||
|
||||
state.setLocalVariable("foo", null);
|
||||
value = state.lookupLocalVariable("foo");
|
||||
assertThat(value).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void globalVariables() {
|
||||
TypedValue typedValue = state.lookupVariable("foo");
|
||||
@@ -86,41 +69,6 @@ class ExpressionStateTests extends AbstractExpressionTests {
|
||||
assertThat(typedValue.getTypeDescriptor().getType()).isEqualTo(String.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void noVariableInterference() {
|
||||
TypedValue typedValue = state.lookupVariable("foo");
|
||||
assertThat(typedValue).isEqualTo(TypedValue.NULL);
|
||||
|
||||
state.setLocalVariable("foo",34);
|
||||
typedValue = state.lookupVariable("foo");
|
||||
assertThat(typedValue).isEqualTo(TypedValue.NULL);
|
||||
|
||||
state.setVariable("goo", "hello");
|
||||
assertThat(state.lookupLocalVariable("goo")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void localVariableNestedScopes() {
|
||||
assertThat(state.lookupLocalVariable("foo")).isNull();
|
||||
|
||||
state.setLocalVariable("foo",12);
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(12);
|
||||
|
||||
state.enterScope(null);
|
||||
// found in upper scope
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(12);
|
||||
|
||||
state.setLocalVariable("foo","abc");
|
||||
// found in nested scope
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo("abc");
|
||||
|
||||
state.exitScope();
|
||||
// found in nested scope
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(12);
|
||||
}
|
||||
|
||||
@Test
|
||||
void rootContextObject() {
|
||||
assertThat(state.getRootContextObject().getValue().getClass()).isEqualTo(Inventor.class);
|
||||
@@ -159,25 +107,6 @@ class ExpressionStateTests extends AbstractExpressionTests {
|
||||
assertThat(state.getActiveContextObject()).isEqualTo(TypedValue.NULL);
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void populatedNestedScopes() {
|
||||
assertThat(state.lookupLocalVariable("foo")).isNull();
|
||||
|
||||
state.enterScope("foo",34);
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(34);
|
||||
|
||||
state.enterScope(null);
|
||||
state.setLocalVariable("foo", 12);
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(12);
|
||||
|
||||
state.exitScope();
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(34);
|
||||
|
||||
state.exitScope();
|
||||
assertThat(state.lookupLocalVariable("goo")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void rootObjectConstructor() {
|
||||
EvaluationContext ctx = TestScenarioCreator.getTestEvaluationContext();
|
||||
@@ -189,27 +118,6 @@ class ExpressionStateTests extends AbstractExpressionTests {
|
||||
assertThat(stateRoot.getValue()).isEqualTo("i am a string");
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("removal")
|
||||
void populatedNestedScopesMap() {
|
||||
assertThat(state.lookupLocalVariable("foo")).isNull();
|
||||
assertThat(state.lookupLocalVariable("goo")).isNull();
|
||||
|
||||
state.enterScope(Map.of("foo", 34, "goo", "abc"));
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(34);
|
||||
assertThat(state.lookupLocalVariable("goo")).isEqualTo("abc");
|
||||
|
||||
state.enterScope(null);
|
||||
state.setLocalVariable("foo",12);
|
||||
assertThat(state.lookupLocalVariable("foo")).isEqualTo(12);
|
||||
assertThat(state.lookupLocalVariable("goo")).isEqualTo("abc");
|
||||
|
||||
state.exitScope();
|
||||
state.exitScope();
|
||||
assertThat(state.lookupLocalVariable("foo")).isNull();
|
||||
assertThat(state.lookupLocalVariable("goo")).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void operators() {
|
||||
assertThatExceptionOfType(SpelEvaluationException.class)
|
||||
|
||||
Reference in New Issue
Block a user