Return-Path: X-Original-To: apmail-zest-commits-archive@minotaur.apache.org Delivered-To: apmail-zest-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 55F8D173E6 for ; Wed, 3 Jun 2015 08:59:18 +0000 (UTC) Received: (qmail 91957 invoked by uid 500); 3 Jun 2015 08:59:18 -0000 Delivered-To: apmail-zest-commits-archive@zest.apache.org Received: (qmail 91937 invoked by uid 500); 3 Jun 2015 08:59:18 -0000 Mailing-List: contact commits-help@zest.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zest.apache.org Delivered-To: mailing list commits@zest.apache.org Received: (qmail 91927 invoked by uid 99); 3 Jun 2015 08:59:18 -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; Wed, 03 Jun 2015 08:59:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 09F0AE0AA1; Wed, 3 Jun 2015 08:59:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: niclas@apache.org To: commits@zest.apache.org Message-Id: <49eedc8b91854708a8af0776fa8992a4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: zest-qi4j git commit: Better error message when Mixin is missing. Date: Wed, 3 Jun 2015 08:59:18 +0000 (UTC) Repository: zest-qi4j Updated Branches: refs/heads/ZEST-22_toEntity-toValue e4b725a8e -> 4214bb49a Better error message when Mixin is missing. Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/4214bb49 Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/4214bb49 Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/4214bb49 Branch: refs/heads/ZEST-22_toEntity-toValue Commit: 4214bb49ad30b4d893dcea00f70798f99cef875b Parents: e4b725a Author: Niclas Hedhman Authored: Wed Jun 3 16:59:03 2015 +0800 Committer: Niclas Hedhman Committed: Wed Jun 3 16:59:03 2015 +0800 ---------------------------------------------------------------------- .../main/java/org/qi4j/runtime/composite/CompositeModel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/4214bb49/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java b/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java index c689929..9e18bf7 100644 --- a/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java +++ b/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeModel.java @@ -108,7 +108,7 @@ public abstract class CompositeModel } @Override - @SuppressWarnings( {"raw", "unchecked"} ) + @SuppressWarnings( { "raw", "unchecked" } ) public Class primaryType() { Class primaryType = null; @@ -159,7 +159,7 @@ public abstract class CompositeModel return visitor.visitLeave( this ); } - @SuppressWarnings( {"raw", "unchecked"} ) + @SuppressWarnings( { "raw", "unchecked" } ) private void createProxyClass() { Class mainType = first( types ); @@ -246,7 +246,8 @@ public abstract class CompositeModel // if (!matchesAny( isAssignableFrom( mixinType ), types )) if( !mixinsModel.isImplemented( mixinType ) ) { - throw new IllegalArgumentException( "Composite does not implement type " + mixinType.getName() ); + String message = "Composite " + primaryType().getName() + " does not implement type " + mixinType.getName(); + throw new IllegalArgumentException( message ); } // Instantiate proxy for given mixin interface