File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
shenyu-web/src/main/java/org/apache/shenyu/web/handler Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 4444import java .util .Map ;
4545import java .util .Objects ;
4646import java .util .Optional ;
47- import java .util .concurrent .atomic .AtomicInteger ;
4847import java .util .function .Function ;
4948import java .util .stream .Collectors ;
5049
@@ -308,7 +307,7 @@ private void onPluginRemoved(final PluginData pluginData) {
308307
309308 private static class DefaultShenyuPluginChain implements ShenyuPluginChain {
310309
311- private final AtomicInteger index = new AtomicInteger ( 0 ) ;
310+ private int index ;
312311
313312 private final List <ShenyuPlugin > plugins ;
314313
@@ -330,9 +329,8 @@ private static class DefaultShenyuPluginChain implements ShenyuPluginChain {
330329 @ Override
331330 public Mono <Void > execute (final ServerWebExchange exchange ) {
332331 return Mono .defer (() -> {
333- int pos ;
334- while ((pos = index .getAndIncrement ()) < plugins .size ()) {
335- ShenyuPlugin plugin = plugins .get (pos );
332+ while (this .index < plugins .size ()) {
333+ ShenyuPlugin plugin = plugins .get (this .index ++);
336334 if (plugin .skip (exchange )) {
337335 continue ;
338336 }
You can’t perform that action at this time.
0 commit comments