You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by li...@apache.org on 2026/09/03 02:58:23 UTC

(shenyu) branch master updated: [type: bug] Fix Cryptor/Sign plugin removeRule to unconditionally cleanup (#6879) (#7009)

This is an automated email from the ASF dual-hosted git repository.

Aias00 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git


The following commit(s) were added to refs/heads/master by this push:
     new b97d4b116d [type: bug] Fix Cryptor/Sign plugin removeRule to unconditionally cleanup (#6879) (#7009)
b97d4b116d is described below

commit b97d4b116d20fdf1e9710f86c882b62b1dab4393
Author: Arvin <31...@users.noreply.github.com>
AuthorDate: Thu Sep 3 10:58:18 2026 +0800

    [type: bug] Fix Cryptor/Sign plugin removeRule to unconditionally cleanup (#6879) (#7009)
    
    Signed-off-by: zhang-arvin <ar...@htx-inc.com>
    Co-authored-by: aias00 <li...@apache.org>
---
 .../shenyu/plugin/cryptor/handler/AbstractCryptorPluginDataHandler.java | 2 +-
 .../org/apache/shenyu/plugin/sign/handler/SignPluginDataHandler.java    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-cryptor/src/main/java/org/apache/shenyu/plugin/cryptor/handler/AbstractCryptorPluginDataHandler.java b/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-cryptor/src/main/java/org/apache/shenyu/plugin/cryptor/handler/AbstractCryptorPluginDataHandler.java
index 5164ffb5ba..bd38302dd9 100644
--- a/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-cryptor/src/main/java/org/apache/shenyu/plugin/cryptor/handler/AbstractCryptorPluginDataHandler.java
+++ b/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-cryptor/src/main/java/org/apache/shenyu/plugin/cryptor/handler/AbstractCryptorPluginDataHandler.java
@@ -58,6 +58,6 @@ public abstract class AbstractCryptorPluginDataHandler implements PluginDataHand
 
     @Override
     public void removeRule(final RuleData ruleData) {
-        Optional.ofNullable(ruleData.getHandle()).ifPresent(s -> CACHED_HANDLE.get().removeHandle(CacheKeyUtils.INST.getKey(ruleData)));
+        CACHED_HANDLE.get().removeHandle(CacheKeyUtils.INST.getKey(ruleData));
     }
 }
diff --git a/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/handler/SignPluginDataHandler.java b/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/handler/SignPluginDataHandler.java
index 542aac4928..3ab4e4b0ff 100644
--- a/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/handler/SignPluginDataHandler.java
+++ b/shenyu-plugin/shenyu-plugin-security/shenyu-plugin-sign/src/main/java/org/apache/shenyu/plugin/sign/handler/SignPluginDataHandler.java
@@ -45,7 +45,7 @@ public class SignPluginDataHandler implements PluginDataHandler {
 
     @Override
     public void removeRule(final RuleData ruleData) {
-        Optional.ofNullable(ruleData.getHandle()).ifPresent(s -> CACHED_HANDLE.get().removeHandle(CacheKeyUtils.INST.getKey(ruleData)));
+        CACHED_HANDLE.get().removeHandle(CacheKeyUtils.INST.getKey(ruleData));
     }
 
     @Override