File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
main/java/org/apache/ibatis/scripting/xmltags
test/java/org/apache/ibatis/submitted/ognlstatic Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ public ContextMap(MetaObject parameterMetaObject) {
78
78
this .parameterMetaObject = parameterMetaObject ;
79
79
}
80
80
81
+ @ Override
82
+ public Object put (String key , Object value ) {
83
+ return super .put (key , value );
84
+ }
85
+
81
86
@ Override
82
87
public Object get (Object key ) {
83
88
String strKey = (String ) key ;
@@ -87,9 +92,10 @@ public Object get(Object key) {
87
92
88
93
if (parameterMetaObject != null ) {
89
94
Object object = parameterMetaObject .getValue (strKey );
90
- if (object != null ) {
91
- super .put (strKey , object );
92
- }
95
+ // issue #61 do not modify the context when reading
96
+ // if (object != null) {
97
+ // super.put(strKey, object);
98
+ // }
93
99
94
100
return object ;
95
101
}
Original file line number Diff line number Diff line change @@ -63,14 +63,14 @@ public void shouldGetAUserStatic() {
63
63
try {
64
64
Mapper mapper = sqlSession .getMapper (Mapper .class );
65
65
User user = mapper .getUserStatic (1 );
66
+ Assert .assertNotNull (user );
66
67
Assert .assertEquals ("User1" , user .getName ());
67
68
} finally {
68
69
sqlSession .close ();
69
70
}
70
71
}
71
72
72
- @ Ignore
73
- @ Test // see issue #61
73
+ @ Test // see issue #61 (gh)
74
74
public void shouldGetAUserWithIfNode () {
75
75
SqlSession sqlSession = sqlSessionFactory .openSession ();
76
76
try {
You can’t perform that action at this time.
0 commit comments