File tree 1 file changed +5
-3
lines changed
org.springframework.context/src/main/java/org/springframework/conversation/manager
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -101,20 +101,21 @@ public ConversationImpl() {
101
101
*
102
102
* @see org.springframework.conversation.Conversation#getAttribute(java.lang.String)
103
103
*/
104
+ @ SuppressWarnings ("unchecked" )
104
105
@ Override
105
106
public <T > T getAttribute (String name ) {
106
107
touch ();
107
108
108
109
// first try to get the attribute from this conversation state
109
- T value = super .getAttribute (name );
110
+ T value = ( T ) super .getAttribute (name );
110
111
if (value != null ) {
111
112
return value ;
112
113
}
113
114
114
115
// the value was not found, try the parent conversation, if any and if
115
116
// not isolated
116
117
if (parent != null && !isolated ) {
117
- return parent .getAttribute (name );
118
+ return ( T ) parent .getAttribute (name );
118
119
}
119
120
120
121
// this is the root conversation and the requested bean is not
@@ -142,10 +143,11 @@ public <T> T setAttribute(String name, T value) {
142
143
/**
143
144
* @see org.springframework.conversation.Conversation#removeAttribute(java.lang.String)
144
145
*/
146
+ @ SuppressWarnings ("unchecked" )
145
147
@ Override
146
148
public <T > T removeAttribute (String name ) {
147
149
touch ();
148
- T value = super .removeAttribute (name );
150
+ T value = ( T ) super .removeAttribute (name );
149
151
150
152
// if the attribute implements the listener interface, remove it from
151
153
// the registered listeners
You can’t perform that action at this time.
0 commit comments