Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 60E9F200CF6 for ; Mon, 18 Sep 2017 17:21:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5FB661609EB; Mon, 18 Sep 2017 15:21:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A5DF41609D8 for ; Mon, 18 Sep 2017 17:20:59 +0200 (CEST) Received: (qmail 60143 invoked by uid 500); 18 Sep 2017 15:20:58 -0000 Mailing-List: contact commits-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list commits@polygene.apache.org Received: (qmail 60128 invoked by uid 99); 18 Sep 2017 15:20:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Sep 2017 15:20:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E16E5F5669; Mon, 18 Sep 2017 15:20:57 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: niclas@apache.org To: commits@polygene.apache.org Date: Mon, 18 Sep 2017 15:20:59 -0000 Message-Id: <6620677797e04680a91457a9a7c0418a@git.apache.org> In-Reply-To: <67e0fc97294c4572b0f4013e21c99f08@git.apache.org> References: <67e0fc97294c4572b0f4013e21c99f08@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/15] polygene-java git commit: Found a weird case that cause NPE incorrectly. archived-at: Mon, 18 Sep 2017 15:21:00 -0000 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 Authored: Mon Sep 4 10:24:42 2017 +0800 Committer: niclas 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 ); + } } } }