You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/04/27 05:15:46 UTC

[isis] 02/03: ISIS-2297: potential NPE in _Annotations_SynthesizedMergedAnnotationInvocationHandler

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

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

commit 7ccc730797eb310c11db332e179c5de8499a086f
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Apr 27 07:07:02 2022 +0200

    ISIS-2297: potential NPE in
    _Annotations_SynthesizedMergedAnnotationInvocationHandler
---
 .../_Annotations_SynthesizedMergedAnnotationInvocationHandler.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/commons/src/main/java/org/apache/isis/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java b/commons/src/main/java/org/apache/isis/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
index 8213f630ac..35db2e89f5 100644
--- a/commons/src/main/java/org/apache/isis/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
+++ b/commons/src/main/java/org/apache/isis/commons/internal/reflection/_Annotations_SynthesizedMergedAnnotationInvocationHandler.java
@@ -157,7 +157,10 @@ implements InvocationHandler {
         return hashCode;
     }
 
-    private int getValueHashCode(final Object value) {
+    private int getValueHashCode(final @Nullable Object value) {
+        if(value==null) {
+            return 0;
+        }
         // Use Arrays.hashCode since ObjectUtils doesn't comply to to
         // Annotation#hashCode()
         if (value instanceof boolean[]) {