polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From soelvs...@apache.org
Subject zest-java git commit: ZEST-118 bugfix: GenericPropertyMixin not found
Date Wed, 02 Sep 2015 06:40:33 GMT
Repository: zest-java
Updated Branches:
  refs/heads/develop 59c967042 -> 4caa989e6


ZEST-118 bugfix: GenericPropertyMixin not found


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/4caa989e
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/4caa989e
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/4caa989e

Branch: refs/heads/develop
Commit: 4caa989e60531e8f8e3a712a48c025edeec998a3
Parents: 59c9670
Author: Kent Sølvsten <soelvsten@apache.org>
Authored: Wed Sep 2 08:40:25 2015 +0200
Committer: Kent Sølvsten <soelvsten@apache.org>
Committed: Wed Sep 2 08:40:25 2015 +0200

----------------------------------------------------------------------
 .../bootstrap/CompositeAssemblyImpl.java        | 21 ++++++++------------
 1 file changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/4caa989e/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
index bc69bbf..9190d67f 100755
--- a/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/bootstrap/CompositeAssemblyImpl.java
@@ -701,7 +701,7 @@ public abstract class CompositeAssemblyImpl
 
     private Stream<Class<?>> mixinDeclarations( Stream<? extends Class>
types )
     {
-        return types.flatMap( this::getTypes )
+        return types.flatMap( this::getTypes ).flatMap( Classes::typesOf )
             .filter( mixinType -> Annotations.annotationOn( mixinType, Mixins.class )
!= null )
             .flatMap( mixinType -> Arrays.stream( Annotations.annotationOn( mixinType,
Mixins.class ).value() ) );
     }
@@ -711,20 +711,15 @@ public abstract class CompositeAssemblyImpl
         return this.types.stream().flatMap( this::getTypes );
     }
 
-    private Stream<Class> getTypes( Type type )
+    private Stream<Class> getTypes( Class<?> clazz )
     {
-        if( type instanceof Class )
+        if( clazz.isInterface() )
         {
-            Class<?> clazz = (Class<?>) type;
-            if( clazz.isInterface() )
-            {
-                return typesOf( clazz ).map( Classes.RAW_CLASS );
-            }
-            else
-            {
-                return classHierarchy( clazz ).map( Classes.RAW_CLASS );
-            }
+            return typesOf( clazz ).map( Classes.RAW_CLASS );
+        }
+        else
+        {
+            return classHierarchy( clazz ).map( Classes.RAW_CLASS );
         }
-        throw new UnsupportedOperationException( "Unable to handle type " + type.getTypeName()
);
     }
 }


Mime
View raw message