polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject zest-qi4j git commit: Better error message when Mixin is missing.
Date Wed, 03 Jun 2015 08:59:18 GMT
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 <niclas@hedhman.org>
Authored: Wed Jun 3 16:59:03 2015 +0800
Committer: Niclas Hedhman <niclas@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


Mime
View raw message