From dc79f058383b3681c3ece4dabc2febb40ae85a26 Mon Sep 17 00:00:00 2001 From: KomachiSion Date: Fri, 12 May 2023 10:14:21 +0800 Subject: [PATCH] For pmd --- .../nacos/config/server/aspect/ConfigChangeAspect.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/src/main/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspect.java b/config/src/main/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspect.java index 2c8c95935..efb2b2d58 100644 --- a/config/src/main/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspect.java +++ b/config/src/main/java/com/alibaba/nacos/config/server/aspect/ConfigChangeAspect.java @@ -287,7 +287,8 @@ public class ConfigChangeAspect { configChangeRequest.setArg("modifyTime", TimeUtils.getCurrentTimeStr()); ConfigChangePointCutTypes handleType = configChangeRequest.getRequestType(); ConfigChangeResponse configChangeResponse = new ConfigChangeResponse(handleType); - configChangeResponse.setSuccess(true); // default success,when before plugin service verify failed , set false + // default success,when before plugin service verify failed , set false + configChangeResponse.setSuccess(true); PriorityQueue beforeExecutePriorityQueue = new PriorityQueue<>( DEFAULT_BEFORE_QUEUE_CAPACITY, Comparator.comparingInt(ConfigChangePluginService::getOrder)); PriorityQueue afterExecutePriorityQueue = new PriorityQueue<>( @@ -315,7 +316,8 @@ public class ConfigChangeAspect { configChangeRequest.setArg("pluginProperties", properties); ccs.execute(configChangeRequest, configChangeResponse); if (null != configChangeResponse.getArgs()) { - args = configChangeResponse.getArgs(); // update args by filter with whitelist + // update args by filter with whitelist + args = configChangeResponse.getArgs(); } // prevent execute next before plugins service if (!configChangeResponse.isSuccess()) { @@ -325,7 +327,8 @@ public class ConfigChangeAspect { } try { - if (configChangeResponse.isSuccess()) { // if validate failed,skipped directly + // if validate failed,skipped directly + if (configChangeResponse.isSuccess()) { retVal = pjp.proceed(args); } } catch (Throwable e) {