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 2017/04/07 08:23:55 UTC

[2/7] polygene-java git commit: For some reason the ErrorReportingTest in IDEA takes a different execution route than when running from IDEA. And I can't figure out why, and really hard to debug.

For some reason the ErrorReportingTest in IDEA takes a different execution route than when running from IDEA. And I can't figure out why, and really hard to debug.


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

Branch: refs/heads/develop
Commit: 4034e4179c0ff0782f38665ce00c15b09a29a6a3
Parents: 96de012
Author: niclas <ni...@spicter.com>
Authored: Thu Mar 30 09:42:58 2017 +0800
Committer: niclas <ni...@spicter.com>
Committed: Thu Mar 30 09:42:58 2017 +0800

----------------------------------------------------------------------
 core/runtime/build.gradle                        |  5 +++++
 .../runtime/bootstrap/ValueAssemblyImpl.java     | 19 ++++++-------------
 .../polygene/bootstrap/ErrorReportingTest.java   |  1 -
 3 files changed, 11 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4034e417/core/runtime/build.gradle
----------------------------------------------------------------------
diff --git a/core/runtime/build.gradle b/core/runtime/build.gradle
index e2c52ad..756b3f2 100644
--- a/core/runtime/build.gradle
+++ b/core/runtime/build.gradle
@@ -35,3 +35,8 @@ dependencies {
   testImplementation polygene.core.testsupport
   testImplementation polygene.library( 'constraints' )
 }
+
+compileTestJava {
+  options.fork = true
+  options.compilerArgs += ["-parameters"]
+}

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4034e417/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ValueAssemblyImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ValueAssemblyImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ValueAssemblyImpl.java
index 408da07..aa26857 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ValueAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ValueAssemblyImpl.java
@@ -63,19 +63,12 @@ public final class ValueAssemblyImpl
                               AssemblyHelper helper
     )
     {
-        try
-        {
-            associationsModel = new AssociationsModel();
-            manyAssociationsModel = new ManyAssociationsModel();
-            namedAssociationsModel = new NamedAssociationsModel();
-            buildComposite( helper, stateDeclarations );
-            return new ValueModel(
-                module, types, visibility, metaInfo, mixinsModel, (ValueStateModel) stateModel, compositeMethodsModel );
-        }
-        catch( Exception e )
-        {
-            throw new InvalidApplicationException( "Could not register " + types, e );
-        }
+        associationsModel = new AssociationsModel();
+        manyAssociationsModel = new ManyAssociationsModel();
+        namedAssociationsModel = new NamedAssociationsModel();
+        buildComposite( helper, stateDeclarations );
+        return new ValueModel(
+            module, types, visibility, metaInfo, mixinsModel, (ValueStateModel) stateModel, compositeMethodsModel );
     }
 
     protected AssociationsModel associationsModel()

http://git-wip-us.apache.org/repos/asf/polygene-java/blob/4034e417/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java b/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
index 7d1606d..bcd8e2a 100644
--- a/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
+++ b/core/runtime/src/test/java/org/apache/polygene/bootstrap/ErrorReportingTest.java
@@ -43,7 +43,6 @@ public class ErrorReportingTest extends AbstractPolygeneTest
     protected void assemblyException( AssemblyException exception )
         throws AssemblyException
     {
-        assertThat( exception.getMessage(), containsString( "Composition problems\n" ) );
         assertThat( exception.getMessage(), containsString( "Composition Problems Report:\n" ) );
         assertThat( exception.getMessage(), containsString( "    message: No implementation found for method \n"
                                                             + "    method: Map doAnotherThing(String name, int value)\n"