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

xiaoyu 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 b0bbbb8160 Fixed NPE issue (#5539)
b0bbbb8160 is described below

commit b0bbbb816033026b12020f1bcf9de870ef2e8feb
Author: Kerwin Bryant <kerwin...@qq.com>
AuthorDate: Tue Apr 9 10:39:07 2024 +0800

    Fixed NPE issue (#5539)
---
 .../java/org/apache/shenyu/plugin/base/cache/CommonHandleCache.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonHandleCache.java
 
b/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonHandleCache.java
index 3c5f9b6e90..af905a970c 100644
--- 
a/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonHandleCache.java
+++ 
b/shenyu-plugin/shenyu-plugin-base/src/main/java/org/apache/shenyu/plugin/base/cache/CommonHandleCache.java
@@ -45,7 +45,7 @@ public class CommonHandleCache<K, V> implements 
HandleCache<K, V> {
 
     @Override
     public void cachedHandle(final K key, final V value) {
-        Optional.ofNullable(key).ifPresent(data -> cached.put(key, value));
+        Optional.ofNullable(key).ifPresent(data_key -> 
Optional.ofNullable(value).ifPresent(data_value -> cached.put(data_key, 
data_value)));
     }
 
     @Override

Reply via email to