Skip to content

Commit d081405

Browse files
committed
Added a test for #2609
1 parent 7e96b10 commit d081405

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/java/org/apache/ibatis/scripting/xmltags/OgnlCacheTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2021 the original author or authors.
2+
* Copyright 2009-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -50,4 +50,12 @@ class DataClass {
5050
}
5151
executor.shutdown();
5252
}
53+
54+
@Test
55+
void issue2609() throws Exception {
56+
Map<String, Object> context = new HashMap<>();
57+
context.put("d1", java.sql.Date.valueOf("2022-01-01"));
58+
context.put("d2", java.sql.Date.valueOf("2022-01-02"));
59+
assertEquals(-1, OgnlCache.getValue("d1.compareTo(d2)", context));
60+
}
5361
}

0 commit comments

Comments
 (0)