polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [2/3] polygene-java git commit: NoopMixin: add missing default value for Byte
Date Sun, 14 May 2017 13:38:12 GMT
NoopMixin: add missing default value for Byte


Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/5eb7929f
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/5eb7929f
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/5eb7929f

Branch: refs/heads/develop
Commit: 5eb7929f7b90bcc2bca2c9477b041a9359e50b45
Parents: bb5bf88
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Sun May 14 14:05:15 2017 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Sun May 14 14:05:15 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/polygene/api/mixin/NoopMixin.java  | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/5eb7929f/core/api/src/main/java/org/apache/polygene/api/mixin/NoopMixin.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/mixin/NoopMixin.java b/core/api/src/main/java/org/apache/polygene/api/mixin/NoopMixin.java
index 7cfc81a..f0a226c 100644
--- a/core/api/src/main/java/org/apache/polygene/api/mixin/NoopMixin.java
+++ b/core/api/src/main/java/org/apache/polygene/api/mixin/NoopMixin.java
@@ -34,6 +34,7 @@ public final class NoopMixin
     private static final Short SHORT_DEFAULT = 0;
     private static final Character CHARACTER_DEFAULT = 0;
     private static final Integer INTEGER_DEFAULT = 0;
+    private static final Byte BYTE_DEFAULT = 0;
     private static final Long LONG_DEFAULT = 0L;
     private static final Float FLOAT_DEFAULT = 0f;
     private static final Double DOUBLE_DEFAULT = 0.0;
@@ -67,6 +68,10 @@ public final class NoopMixin
         {
             return INTEGER_DEFAULT;
         }
+        if( Byte.TYPE == retType )
+        {
+            return BYTE_DEFAULT;
+        }
         if( Long.TYPE == retType )
         {
             return LONG_DEFAULT;


Mime
View raw message