File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
spring-web/src/main/java/org/springframework/web/server/session Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class DefaultWebSession implements WebSession {
56
56
57
57
private volatile Duration maxIdleTime ;
58
58
59
- private final AtomicReference < State > state ;
59
+ private volatile State state ;
60
60
61
61
62
62
/**
@@ -82,7 +82,7 @@ class DefaultWebSession implements WebSession {
82
82
this .creationTime = Instant .now (clock );
83
83
this .lastAccessTime = this .creationTime ;
84
84
this .maxIdleTime = Duration .ofMinutes (30 );
85
- this .state = new AtomicReference <>( State .NEW ) ;
85
+ this .state = State .NEW ;
86
86
}
87
87
88
88
/**
@@ -160,12 +160,12 @@ public Duration getMaxIdleTime() {
160
160
161
161
@ Override
162
162
public void start () {
163
- this .state . compareAndSet ( State . NEW , State .STARTED ) ;
163
+ this .state = State .STARTED ;
164
164
}
165
165
166
166
@ Override
167
167
public boolean isStarted () {
168
- State value = this .state . get () ;
168
+ State value = this .state ;
169
169
return (State .STARTED .equals (value ) || (State .NEW .equals (value ) && !getAttributes ().isEmpty ()));
170
170
}
171
171
You can’t perform that action at this time.
0 commit comments