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 2015/06/10 01:58:08 UTC

[10/14] zest-qi4j git commit: Better error message when Mixin is missing.

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/develop
Commit: 4214bb49ad30b4d893dcea00f70798f99cef875b
Parents: e4b725a
Author: Niclas Hedhman <ni...@hedhman.org>
Authored: Wed Jun 3 16:59:03 2015 +0800
Committer: Niclas Hedhman <ni...@hedhman.org>
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