From 5ef5a83c5e2c3911cafd2f1829dcbbc021c17c64 Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Tue, 11 Oct 2022 20:56:53 +0800 Subject: [PATCH 1/7] ConfigFilterChain optimization --- .../filter/impl/ConfigFilterChainManager.java | 54 ++++++++++++------- .../impl/ConfigFilterChainManagerTest.java | 26 ++++++++- 2 files changed, 60 insertions(+), 20 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java index 36acb3ad349..652d081aaef 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java @@ -35,6 +35,8 @@ public class ConfigFilterChainManager implements IConfigFilterChain { private final List filters = new ArrayList<>(); + + private IConfigFilterChain filterChain; public ConfigFilterChainManager(Properties properties) { ServiceLoader configFilters = ServiceLoader.load(IConfigFilter.class); @@ -42,8 +44,17 @@ public ConfigFilterChainManager(Properties properties) { configFilter.init(properties); addFilter(configFilter); } + buildConfigFilterChain(); + } + + public void buildConfigFilterChain(){ + filterChain = new EmptyConfigFilterChain(); + for(int i = filters.size() - 1; i >= 0; i--) { + final IConfigFilter filter = filters.get(i); + final IConfigFilterChain next = filterChain; + filterChain = new FilterChainNode(filter, next); + } } - /** * Add filter. * @@ -74,27 +85,32 @@ public synchronized ConfigFilterChainManager addFilter(IConfigFilter filter) { @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { - new VirtualFilterChain(this.filters).doFilter(request, response); + filterChain.doFilter(request, response); } - - private static class VirtualFilterChain implements IConfigFilterChain { - - private final List additionalFilters; - - private int currentPosition = 0; - - public VirtualFilterChain(List additionalFilters) { - this.additionalFilters = additionalFilters; + + private static class FilterChainNode implements IConfigFilterChain{ + + private final IConfigFilter filter; + + private final IConfigFilterChain next; + + public FilterChainNode(IConfigFilter filter, IConfigFilterChain next){ + this.filter = filter; + this.next = next; } - + @Override - public void doFilter(final IConfigRequest request, final IConfigResponse response) throws NacosException { - if (this.currentPosition != this.additionalFilters.size()) { - this.currentPosition++; - IConfigFilter nextFilter = this.additionalFilters.get(this.currentPosition - 1); - nextFilter.doFilter(request, response, this); - } + public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { + filter.doFilter(request, response, next); } } - + + + private static class EmptyConfigFilterChain implements IConfigFilterChain{ + @Override + public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { + + } + } + } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java index 1d62d243777..357dd92ac14 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java @@ -73,7 +73,7 @@ public void doFilter(IConfigRequest request, IConfigResponse response, IConfigFi Integer filterCount = (Integer) configContext.getParameter("filterCount"); filterCount = filterCount + 1; configContext.setParameter("filterCount", filterCount); - + // do next filterChain.doFilter(request, response); } @@ -135,4 +135,28 @@ public void testAddFilterNotRepeat() throws NacosException { Assert.assertEquals(2, configContext.getParameter("filterCount")); } + + @Test + public void testSpiFilterNodeChain() throws NacosException{ + final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); + + configFilterChainManager.doFilter(new ConfigRequest(), new ConfigResponse()); + } + + @Test + public void testAddFilterNodeChain() throws NacosException{ + final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); + + MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); + MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); + MyIConfigFilter filter3 = new MyIConfigFilter("filter3", 3); + + configFilterChainManager.addFilter(filter2); + configFilterChainManager.addFilter(filter1); + configFilterChainManager.addFilter(filter3); + // When an external filter is added via the addFilter() method, the responsibility chain only needs to be rebuilt, which in fact is rare. + configFilterChainManager.buildConfigFilterChain(); + + configFilterChainManager.doFilter(new ConfigRequest(), new ConfigResponse()); + } } \ No newline at end of file From 4a3b76f07e306fb2ea86e3d655a6e50a8e6af40a Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Wed, 12 Oct 2022 11:52:03 +0800 Subject: [PATCH 2/7] name modify --- .../client/config/filter/impl/ConfigFilterChainManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java index 652d081aaef..617bc16e228 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java @@ -48,7 +48,7 @@ public ConfigFilterChainManager(Properties properties) { } public void buildConfigFilterChain(){ - filterChain = new EmptyConfigFilterChain(); + filterChain = new EmptyFilterChainNode(); for(int i = filters.size() - 1; i >= 0; i--) { final IConfigFilter filter = filters.get(i); final IConfigFilterChain next = filterChain; @@ -106,7 +106,7 @@ public void doFilter(IConfigRequest request, IConfigResponse response) throws Na } - private static class EmptyConfigFilterChain implements IConfigFilterChain{ + private static class EmptyFilterChainNode implements IConfigFilterChain{ @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { From 100943f1ed8ef075377dcf82876d57308bab7f07 Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Wed, 12 Oct 2022 11:57:30 +0800 Subject: [PATCH 3/7] Format to optimize --- .../filter/impl/ConfigFilterChainManager.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java index 617bc16e228..94a73293772 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java @@ -33,11 +33,11 @@ * @author Nacos */ public class ConfigFilterChainManager implements IConfigFilterChain { - + private final List filters = new ArrayList<>(); private IConfigFilterChain filterChain; - + public ConfigFilterChainManager(Properties properties) { ServiceLoader configFilters = ServiceLoader.load(IConfigFilter.class); for (IConfigFilter configFilter : configFilters) { @@ -47,14 +47,15 @@ public ConfigFilterChainManager(Properties properties) { buildConfigFilterChain(); } - public void buildConfigFilterChain(){ + public void buildConfigFilterChain() { filterChain = new EmptyFilterChainNode(); - for(int i = filters.size() - 1; i >= 0; i--) { + for (int i = filters.size() - 1; i >= 0; i--) { final IConfigFilter filter = filters.get(i); final IConfigFilterChain next = filterChain; filterChain = new FilterChainNode(filter, next); } } + /** * Add filter. * @@ -76,25 +77,25 @@ public synchronized ConfigFilterChainManager addFilter(IConfigFilter filter) { break; } } - + if (i == this.filters.size()) { this.filters.add(i, filter); } return this; } - + @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { filterChain.doFilter(request, response); } - private static class FilterChainNode implements IConfigFilterChain{ + private static class FilterChainNode implements IConfigFilterChain { private final IConfigFilter filter; private final IConfigFilterChain next; - public FilterChainNode(IConfigFilter filter, IConfigFilterChain next){ + public FilterChainNode(IConfigFilter filter, IConfigFilterChain next) { this.filter = filter; this.next = next; } @@ -106,7 +107,7 @@ public void doFilter(IConfigRequest request, IConfigResponse response) throws Na } - private static class EmptyFilterChainNode implements IConfigFilterChain{ + private static class EmptyFilterChainNode implements IConfigFilterChain { @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { From 78aafc93a3f1836199cc43cf65785f5c9c6ceb98 Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Wed, 12 Oct 2022 12:12:47 +0800 Subject: [PATCH 4/7] add buildConfigFilterChain --- .../impl/ConfigFilterChainManagerTest.java | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java index 357dd92ac14..a0bcde91c98 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java @@ -32,40 +32,40 @@ import java.util.Properties; public class ConfigFilterChainManagerTest { - + private static class MyIConfigFilter implements IConfigFilter { - + private String name; - + private int order; - + public MyIConfigFilter(String name, int order) { this.name = name; this.order = order; } - + @Override public void init(IFilterConfig filterConfig) { } - + @Override public void init(Properties properties) { } - + @Override public void doFilter(IConfigRequest request, IConfigResponse response, IConfigFilterChain filterChain) throws NacosException { IConfigContext configContext = request.getConfigContext(); // save filter info configContext.setParameter(name, order); - + // save filter order if (configContext.getParameter("orders") == null) { configContext.setParameter("orders", new ArrayList()); } List orders = (List) configContext.getParameter("orders"); orders.add(order); - + // save filter count if (configContext.getParameter("filterCount") == null) { configContext.setParameter("filterCount", 0); @@ -77,74 +77,76 @@ public void doFilter(IConfigRequest request, IConfigResponse response, IConfigFi // do next filterChain.doFilter(request, response); } - + @Override public int getOrder() { return order; } - + @Override public String getFilterName() { return name; } } - + @Test public void testAddFilterOrder() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); MyIConfigFilter filter3 = new MyIConfigFilter("filter3", 3); - + //random order configFilterChainManager.addFilter(filter2); configFilterChainManager.addFilter(filter1); configFilterChainManager.addFilter(filter3); - + configFilterChainManager.buildConfigFilterChain(); + ConfigRequest configRequest = new ConfigRequest(); - + configFilterChainManager.doFilter(configRequest, new ConfigResponse()); - + IConfigContext configContext = configRequest.getConfigContext(); - + // doFilter works Assert.assertEquals(1, configContext.getParameter("filter1")); Assert.assertEquals(2, configContext.getParameter("filter2")); Assert.assertEquals(3, configContext.getParameter("filter3")); - + //order List orders = (List) configContext.getParameter("orders"); Assert.assertEquals(Arrays.asList(1, 2, 3), orders); } - + @Test public void testAddFilterNotRepeat() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); MyIConfigFilter repeatFilter = new MyIConfigFilter("filter1", 1); - + configFilterChainManager.addFilter(filter2); configFilterChainManager.addFilter(filter1); configFilterChainManager.addFilter(repeatFilter); - + configFilterChainManager.buildConfigFilterChain(); + ConfigRequest configRequest = new ConfigRequest(); configFilterChainManager.doFilter(configRequest, new ConfigResponse()); - + IConfigContext configContext = configRequest.getConfigContext(); - + Assert.assertEquals(2, configContext.getParameter("filterCount")); } @Test - public void testSpiFilterNodeChain() throws NacosException{ + public void testSpiFilterNodeChain() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); configFilterChainManager.doFilter(new ConfigRequest(), new ConfigResponse()); } @Test - public void testAddFilterNodeChain() throws NacosException{ + public void testAddFilterNodeChain() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); From 3c6b4af4a98f0c1ae85817d3dd616875ee767775 Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Wed, 12 Oct 2022 13:18:03 +0800 Subject: [PATCH 5/7] Format optimization and add buildConfigFilterChain --- .../filter/impl/ConfigFilterChainManager.java | 33 +++++----- .../impl/ConfigFilterChainManagerTest.java | 60 +++++++++---------- .../filter/impl/ConfigFilterChainTest.java | 2 + 3 files changed, 49 insertions(+), 46 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java index 94a73293772..4b7e4524138 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java @@ -33,11 +33,11 @@ * @author Nacos */ public class ConfigFilterChainManager implements IConfigFilterChain { - + private final List filters = new ArrayList<>(); - + private IConfigFilterChain filterChain; - + public ConfigFilterChainManager(Properties properties) { ServiceLoader configFilters = ServiceLoader.load(IConfigFilter.class); for (IConfigFilter configFilter : configFilters) { @@ -46,7 +46,7 @@ public ConfigFilterChainManager(Properties properties) { } buildConfigFilterChain(); } - + public void buildConfigFilterChain() { filterChain = new EmptyFilterChainNode(); for (int i = filters.size() - 1; i >= 0; i--) { @@ -55,7 +55,7 @@ public void buildConfigFilterChain() { filterChain = new FilterChainNode(filter, next); } } - + /** * Add filter. * @@ -77,41 +77,42 @@ public synchronized ConfigFilterChainManager addFilter(IConfigFilter filter) { break; } } - + if (i == this.filters.size()) { this.filters.add(i, filter); } return this; } - + @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { filterChain.doFilter(request, response); } - + private static class FilterChainNode implements IConfigFilterChain { - + private final IConfigFilter filter; - + private final IConfigFilterChain next; - + public FilterChainNode(IConfigFilter filter, IConfigFilterChain next) { this.filter = filter; this.next = next; } - + @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { filter.doFilter(request, response, next); } } - - + + private static class EmptyFilterChainNode implements IConfigFilterChain { + @Override public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { - + } } - + } diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java index a0bcde91c98..f041250eb41 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManagerTest.java @@ -32,40 +32,40 @@ import java.util.Properties; public class ConfigFilterChainManagerTest { - + private static class MyIConfigFilter implements IConfigFilter { - + private String name; - + private int order; - + public MyIConfigFilter(String name, int order) { this.name = name; this.order = order; } - + @Override public void init(IFilterConfig filterConfig) { } - + @Override public void init(Properties properties) { } - + @Override public void doFilter(IConfigRequest request, IConfigResponse response, IConfigFilterChain filterChain) throws NacosException { IConfigContext configContext = request.getConfigContext(); // save filter info configContext.setParameter(name, order); - + // save filter order if (configContext.getParameter("orders") == null) { configContext.setParameter("orders", new ArrayList()); } List orders = (List) configContext.getParameter("orders"); orders.add(order); - + // save filter count if (configContext.getParameter("filterCount") == null) { configContext.setParameter("filterCount", 0); @@ -73,92 +73,92 @@ public void doFilter(IConfigRequest request, IConfigResponse response, IConfigFi Integer filterCount = (Integer) configContext.getParameter("filterCount"); filterCount = filterCount + 1; configContext.setParameter("filterCount", filterCount); - + // do next filterChain.doFilter(request, response); } - + @Override public int getOrder() { return order; } - + @Override public String getFilterName() { return name; } } - + @Test public void testAddFilterOrder() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); MyIConfigFilter filter3 = new MyIConfigFilter("filter3", 3); - + //random order configFilterChainManager.addFilter(filter2); configFilterChainManager.addFilter(filter1); configFilterChainManager.addFilter(filter3); configFilterChainManager.buildConfigFilterChain(); - + ConfigRequest configRequest = new ConfigRequest(); - + configFilterChainManager.doFilter(configRequest, new ConfigResponse()); - + IConfigContext configContext = configRequest.getConfigContext(); - + // doFilter works Assert.assertEquals(1, configContext.getParameter("filter1")); Assert.assertEquals(2, configContext.getParameter("filter2")); Assert.assertEquals(3, configContext.getParameter("filter3")); - + //order List orders = (List) configContext.getParameter("orders"); Assert.assertEquals(Arrays.asList(1, 2, 3), orders); } - + @Test public void testAddFilterNotRepeat() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); MyIConfigFilter repeatFilter = new MyIConfigFilter("filter1", 1); - + configFilterChainManager.addFilter(filter2); configFilterChainManager.addFilter(filter1); configFilterChainManager.addFilter(repeatFilter); configFilterChainManager.buildConfigFilterChain(); - + ConfigRequest configRequest = new ConfigRequest(); configFilterChainManager.doFilter(configRequest, new ConfigResponse()); - + IConfigContext configContext = configRequest.getConfigContext(); - + Assert.assertEquals(2, configContext.getParameter("filterCount")); } - + @Test public void testSpiFilterNodeChain() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); - + configFilterChainManager.doFilter(new ConfigRequest(), new ConfigResponse()); } - + @Test public void testAddFilterNodeChain() throws NacosException { final ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(new Properties()); - + MyIConfigFilter filter1 = new MyIConfigFilter("filter1", 1); MyIConfigFilter filter2 = new MyIConfigFilter("filter2", 2); MyIConfigFilter filter3 = new MyIConfigFilter("filter3", 3); - + configFilterChainManager.addFilter(filter2); configFilterChainManager.addFilter(filter1); configFilterChainManager.addFilter(filter3); // When an external filter is added via the addFilter() method, the responsibility chain only needs to be rebuilt, which in fact is rare. configFilterChainManager.buildConfigFilterChain(); - + configFilterChainManager.doFilter(new ConfigRequest(), new ConfigResponse()); } } \ No newline at end of file diff --git a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java index 379bd1af051..d029c0e91fc 100644 --- a/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java +++ b/client/src/test/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainTest.java @@ -27,6 +27,8 @@ public void testConfigFilterChain() { ConfigFilterChainManager configFilterChainManager = new ConfigFilterChainManager(null); configFilterChainManager.addFilter(new DemoFilter1()); configFilterChainManager.addFilter(new DemoFilter2()); + configFilterChainManager.buildConfigFilterChain(); + ConfigRequest configRequest = new ConfigRequest(); ConfigResponse configResponse = new ConfigResponse(); try { From 39184763bd6a216f455915c52928c483d09197a2 Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Wed, 12 Oct 2022 13:27:11 +0800 Subject: [PATCH 6/7] Format optimization --- .../client/config/filter/impl/ConfigFilterChainManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java index 4b7e4524138..6ef333c8799 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java @@ -47,6 +47,9 @@ public ConfigFilterChainManager(Properties properties) { buildConfigFilterChain(); } + /** + * Build ConfigFilterChain. + */ public void buildConfigFilterChain() { filterChain = new EmptyFilterChainNode(); for (int i = filters.size() - 1; i >= 0; i--) { @@ -104,7 +107,7 @@ public FilterChainNode(IConfigFilter filter, IConfigFilterChain next) { public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { filter.doFilter(request, response, next); } - } +} private static class EmptyFilterChainNode implements IConfigFilterChain { From c8c7f65fe6a7c0ed95783ebb58a10c0d5e6d01fa Mon Sep 17 00:00:00 2001 From: RapperCL <775523362@qq.com> Date: Wed, 12 Oct 2022 13:31:47 +0800 Subject: [PATCH 7/7] Format optimization --- .../client/config/filter/impl/ConfigFilterChainManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java index 6ef333c8799..5e0764eb3b6 100644 --- a/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java +++ b/client/src/main/java/com/alibaba/nacos/client/config/filter/impl/ConfigFilterChainManager.java @@ -107,8 +107,7 @@ public FilterChainNode(IConfigFilter filter, IConfigFilterChain next) { public void doFilter(IConfigRequest request, IConfigResponse response) throws NacosException { filter.doFilter(request, response, next); } -} - + } private static class EmptyFilterChainNode implements IConfigFilterChain {