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

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


The following commit(s) were added to refs/heads/master by this push:
     new b98cffc  JOHNZON-252 ignore static fields
b98cffc is described below

commit b98cffc1faec8ceed9845a2293f1031aa3df2899
Author: Romain Manni-Bucau <rmannibu...@apache.org>
AuthorDate: Wed Aug 14 10:34:26 2019 +0200

    JOHNZON-252 ignore static fields
---
 .../src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java 
b/johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java
index 6cf08cf..b723229 100644
--- a/johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java
+++ b/johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java
@@ -727,7 +727,7 @@ public class JsonbAccessMode implements AccessMode, 
Closeable {
         // TODO: spec requirement, this sounds wrong since you cant customize 
2 kind of serializations on the same model
         if (FieldAccessMode.FieldDecoratedType.class.isInstance(t)) {
             final Field field = 
FieldAccessMode.FieldDecoratedType.class.cast(t).getField();
-            return Modifier.isTransient(field.getModifiers());
+            return Modifier.isTransient(field.getModifiers()) || 
Modifier.isStatic(field.getModifiers());
         }
         return false;
     }

Reply via email to