Skip to content

Commit 3fd89c3

Browse files
committed
Fix merge result
See gh-25706
1 parent 9d7849c commit 3fd89c3

File tree

1 file changed

+0
-55
lines changed

1 file changed

+0
-55
lines changed

spring-expression/src/test/java/org/springframework/expression/spel/standard/SpelCompilerTests.java

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -83,61 +83,6 @@ public int getOrder() {
8383
return 42;
8484
}
8585
}
86-
87-
@Test // gh-25706
88-
void defaultMethodInvocation() {
89-
SpelParserConfiguration config = new SpelParserConfiguration(SpelCompilerMode.IMMEDIATE, null);
90-
SpelExpressionParser parser = new SpelExpressionParser(config);
91-
92-
StandardEvaluationContext context = new StandardEvaluationContext();
93-
Item item = new Item();
94-
context.setRootObject(item);
95-
96-
Expression expression = parser.parseExpression("#root.isEditable2()");
97-
assertThat(SpelCompiler.compile(expression)).isFalse();
98-
assertThat(expression.getValue(context)).isEqualTo(false);
99-
assertThat(SpelCompiler.compile(expression)).isTrue();
100-
SpelCompilationCoverageTests.assertIsCompiled(expression);
101-
assertThat(expression.getValue(context)).isEqualTo(false);
102-
103-
context.setVariable("user", new User());
104-
expression = parser.parseExpression("#root.isEditable(#user)");
105-
assertThat(SpelCompiler.compile(expression)).isFalse();
106-
assertThat(expression.getValue(context)).isEqualTo(true);
107-
assertThat(SpelCompiler.compile(expression)).isTrue();
108-
SpelCompilationCoverageTests.assertIsCompiled(expression);
109-
assertThat(expression.getValue(context)).isEqualTo(true);
110-
}
111-
112-
public static class User {
113-
boolean isAdmin() {
114-
return true;
115-
}
116-
}
117-
118-
public static class Item implements Editable {
119-
// some fields
120-
private String someField = "";
121-
122-
// some getters and setters
123-
124-
@Override
125-
public boolean hasSomeProperty() {
126-
return someField != null;
127-
}
128-
}
129-
130-
public interface Editable {
131-
default boolean isEditable(User user) {
132-
return user.isAdmin() && hasSomeProperty();
133-
}
134-
135-
default boolean isEditable2() {
136-
return false;
137-
}
138-
139-
boolean hasSomeProperty();
140-
}
14186

14287

14388
public static class User {

0 commit comments

Comments
 (0)