You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by ni...@apache.org on 2017/09/18 15:20:59 UTC

[03/15] polygene-java git commit: Found a weird case that cause NPE incorrectly.

Found a weird case that cause NPE incorrectly.


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

Branch: refs/heads/es-sql
Commit: 96f0713214da32fb7d7c7299c6d983a2e5b73fb6
Parents: 4da1885
Author: niclas <ni...@hedhman.org>
Authored: Mon Sep 4 10:24:42 2017 +0800
Committer: niclas <ni...@hedhman.org>
Committed: Mon Sep 4 10:24:42 2017 +0800

----------------------------------------------------------------------
 .../org/apache/polygene/runtime/composite/MixinsModel.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/96f07132/core/runtime/src/main/java/org/apache/polygene/runtime/composite/MixinsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/MixinsModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/MixinsModel.java
index 35efb9d..a998b9e 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/MixinsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/MixinsModel.java
@@ -228,7 +228,11 @@ public class MixinsModel
                     if( !Modifier.isStatic( method.getModifiers() ) )
                     {
                         MixinModel used = methodImplementation.get( method );
-                        usedMixinClasses.add( used );
+                        if( used != null )
+                        {
+                            // TODO: Should we actually throw an Exception, since this means that a method implementation is missing??
+                            usedMixinClasses.add( used );
+                        }
                     }
                 }
             }