polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: zest-java git commit: ZEST-118 fixed multiple consumptions of the same stream
Date Sat, 29 Aug 2015 15:54:52 GMT
Kent,
I appreciate that you help out, and sorry that you did that in an area
where I made a massive re-write.

org.apache.zest.api = 0 failures
org.apache.zest.spi = 0 failures
org.apache.zest.bootstrap = 0 failures
org.apache.zest.runtime = 8 failures, most of them are related to
non-handling of ParameterizedTypes, and one is related to the feature of
using a class as a Transient directly.

Then there are bunches of errors in entity stores and index/query. I think
those are related to bug in the ambiguous entity lookup in TypeLookup
class, since types are picked up there and then used inside the UnitOfWork
handling. This is also an area we might do quite a lot of changes as well...



Cheers

On Sat, Aug 29, 2015 at 3:29 PM, <soelvsten@apache.org> wrote:

> Repository: zest-java
> Updated Branches:
>   refs/heads/develop 4e5cfd8ca -> 9580d06fa
>
>
> ZEST-118 fixed multiple consumptions of the same stream
>
>
> Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
> Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/9580d06f
> Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/9580d06f
> Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/9580d06f
>
> Branch: refs/heads/develop
> Commit: 9580d06fa290dbee7c32b324c62cc0485b18b38c
> Parents: 4e5cfd8
> Author: Kent Sølvsten <soelvsten@apache.org>
> Authored: Sat Aug 29 09:29:12 2015 +0200
> Committer: Kent Sølvsten <soelvsten@apache.org>
> Committed: Sat Aug 29 09:29:12 2015 +0200
>
> ----------------------------------------------------------------------
>  .../org/apache/zest/runtime/structure/TypeLookup.java   | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/zest-java/blob/9580d06f/core/runtime/src/main/java/org/apache/zest/runtime/structure/TypeLookup.java
> ----------------------------------------------------------------------
> diff --git
> a/core/runtime/src/main/java/org/apache/zest/runtime/structure/TypeLookup.java
> b/core/runtime/src/main/java/org/apache/zest/runtime/structure/TypeLookup.java
> old mode 100644
> new mode 100755
> index 3baaee7..e2a5fa5
> ---
> a/core/runtime/src/main/java/org/apache/zest/runtime/structure/TypeLookup.java
> +++
> b/core/runtime/src/main/java/org/apache/zest/runtime/structure/TypeLookup.java
> @@ -22,6 +22,7 @@ package org.apache.zest.runtime.structure;
>  import java.lang.reflect.ParameterizedType;
>  import java.lang.reflect.Type;
>  import java.lang.reflect.WildcardType;
> +import java.util.Collection;
>  import java.util.List;
>  import java.util.Map;
>  import java.util.concurrent.ConcurrentHashMap;
> @@ -539,12 +540,13 @@ public class TypeLookup
>                      // Foo<Bar> check
>                      // First check Foo
>                      ParameterizedType parameterizedType =
> (ParameterizedType) lookedUpType;
> -                    if( !checkClassMatch( types, (Class)
> parameterizedType.getRawType() ) )
> +                    Collection asCollection = types.collect(
> Collectors.toList() );
> +                    if( !checkClassMatch( asCollection.stream(), (Class)
> parameterizedType.getRawType() ) )
>                      {
>                          return false;
>                      }
>                      // Then check Bar
> -                    return interfacesOf( types ).anyMatch( intf ->
> intf.equals( lookedUpType ) );
> +                    return interfacesOf( asCollection.stream()
> ).anyMatch( intf -> intf.equals( lookedUpType ) );
>                  }
>                  else if( lookedUpType instanceof WildcardType )
>                  {
> @@ -591,12 +593,14 @@ public class TypeLookup
>                      // Foo<Bar> check
>                      // First check Foo
>                      ParameterizedType parameterizedType =
> (ParameterizedType) lookedUpType;
> -                    if( !checkClassMatch( types, (Class)
> parameterizedType.getRawType() ) )
> +                    Collection asCollection = types.collect(
> Collectors.toList() );
> +
> +                    if( !checkClassMatch( asCollection.stream(), (Class)
> parameterizedType.getRawType() ) )
>                      {
>                          return false;
>                      }
>                      // Then check Bar
> -                    interfacesOf( types ).anyMatch( intf -> intf.equals(
> lookedUpType ) );
> +                    interfacesOf( asCollection.stream() ).anyMatch( intf
> -> intf.equals( lookedUpType ) );
>                  }
>                  else if( lookedUpType instanceof WildcardType )
>                  {
>
>


-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message