polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [02/34] zest-java git commit: Inference didn't work in some cases here. The Dependencies callSite can't be constructed, but if line broken into two, then it worked.
Date Thu, 14 Apr 2016 06:13:08 GMT
Inference didn't work in some cases here. The Dependencies callSite can't be constructed, but
if line broken into two, then it worked.


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

Branch: refs/heads/develop
Commit: e120d16c6b04f061071be1cad33b87e5600276f7
Parents: d845ea7
Author: Niclas Hedhman <niclas@hedhman.org>
Authored: Mon Dec 14 21:53:08 2015 +0800
Committer: Niclas Hedhman <niclas@hedhman.org>
Committed: Mon Dec 14 21:53:08 2015 +0800

----------------------------------------------------------------------
 .../composite/AbstractModifierModel.java        |  4 +-
 .../zest/runtime/composite/MixinModel.java      |  7 +--
 .../apache/zest/index/rdf/MultiLayeredTest.java | 49 ++++++++++++++++++++
 3 files changed, 53 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/e120d16c/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
b/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
index a14d597..a2458d5 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/AbstractModifierModel.java
@@ -70,8 +70,8 @@ public abstract class AbstractModifierModel
     @SuppressWarnings( "unchecked" )
     public Stream<DependencyModel> dependencies()
     {
-        return Stream.of( constructorsModel, injectedFieldsModel, injectedMethodsModel )
-            .flatMap( Dependencies::dependencies );
+        Stream<? extends Dependencies> models = Stream.of( this.constructorsModel,
injectedFieldsModel, injectedMethodsModel );
+        return models.flatMap( Dependencies::dependencies );
 //        return flattenIterables( map( DEPENDENCIES_FUNCTION, iterable( constructorsModel,
injectedFieldsModel, injectedMethodsModel ) ) );
     }
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e120d16c/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
b/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
index abbe7b0..0beb55a 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/MixinModel.java
@@ -77,10 +77,8 @@ public final class MixinModel
 
     public Stream<DependencyModel> dependencies()
     {
-        return Stream.of( constructorsModel, injectedFieldsModel, injectedMethodsModel )
-            .flatMap( Dependencies::dependencies );
-//        return Iterables.flatten( constructorsModel.dependencies(), injectedFieldsModel.dependencies(),
injectedMethodsModel
-//            .dependencies() );
+        Stream<? extends Dependencies> models = Stream.of( constructorsModel, injectedFieldsModel,
injectedMethodsModel );
+        return models.flatMap( Dependencies::dependencies );
     }
 
     @Override
@@ -178,5 +176,4 @@ public final class MixinModel
     {
         return mixinClass.getName();
     }
-
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/e120d16c/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
new file mode 100644
index 0000000..7923b75
--- /dev/null
+++ b/extensions/indexing-rdf/src/test/java/org/apache/zest/index/rdf/MultiLayeredTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.zest.index.rdf;
+
+import org.apache.zest.api.common.Visibility;
+import org.apache.zest.bootstrap.AssemblyException;
+import org.apache.zest.bootstrap.LayerAssembly;
+import org.apache.zest.bootstrap.ModuleAssembly;
+import org.apache.zest.bootstrap.layered.ModuleAssembler;
+import org.apache.zest.index.rdf.assembly.RdfMemoryStoreAssembler;
+import org.apache.zest.test.indexing.layered.AbstractMultiLayeredIndexingTest;
+
+public class MultiLayeredTest extends AbstractMultiLayeredIndexingTest
+{
+    public MultiLayeredTest()
+    {
+        super( IndexingModuleAssembler.class );
+    }
+
+    static class IndexingModuleAssembler
+        implements ModuleAssembler
+    {
+        @Override
+        public ModuleAssembly assemble( LayerAssembly layer, ModuleAssembly module )
+            throws AssemblyException
+        {
+            new RdfMemoryStoreAssembler( Visibility.layer, Visibility.module ).assemble(
module );
+            return module;
+        }
+    }
+}


Mime
View raw message