You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polygene.apache.org by pa...@apache.org on 2017/07/21 11:32:41 UTC
[1/5] polygene-java git commit: Merge branch 'release/3.0.0-RC3' into
develop
Repository: polygene-java
Updated Branches:
refs/heads/master 464da13e6 -> b4f6be82c
Updated Tags: refs/tags/3.0.0-RC4 [created] 9c338f410
Merge branch 'release/3.0.0-RC3' into develop
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/1bdeea8b
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/1bdeea8b
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/1bdeea8b
Branch: refs/heads/master
Commit: 1bdeea8bd877558cf8ec30ae9c3cf54517d98423
Parents: c33ef71 bf9057f
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 15:23:07 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 15:23:07 2017 +0200
----------------------------------------------------------------------
libraries/sql-generator/dev-status.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[5/5] polygene-java git commit: Merge branch 'release/3.0.0-RC4'
Posted by pa...@apache.org.
Merge branch 'release/3.0.0-RC4'
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/b4f6be82
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/b4f6be82
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/b4f6be82
Branch: refs/heads/master
Commit: b4f6be82c82199d4fc12c9aea1a2450913a16be8
Parents: 464da13 42b3d33
Author: Paul Merlin <pa...@apache.org>
Authored: Fri Jul 21 12:24:37 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Fri Jul 21 12:24:37 2017 +0200
----------------------------------------------------------------------
.../polygene/api/composite/DecoratorMixin.java | 12 +--
.../composite/InvalidCompositeException.java | 23 ++---
.../composite/NoSuchCompositeTypeException.java | 10 ++-
.../ConstraintViolationException.java | 9 +-
.../api/object/NoSuchObjectTypeException.java | 5 +-
.../ConcurrentEntityModificationException.java | 5 +-
.../bootstrap/AssemblyReportException.java | 7 +-
.../apache/polygene/bootstrap/Energy4Java.java | 3 +-
.../bootstrap/CompositeAssemblyImpl.java | 2 +-
.../composite/CompositeMethodsModel.java | 11 ++-
.../runtime/composite/ConstructorModel.java | 8 +-
.../runtime/injection/InjectedFieldModel.java | 8 +-
.../polygene/bootstrap/ErrorReportingTest.java | 22 ++---
...currentEntityStateModificationException.java | 4 +-
dependencies.gradle | 2 -
extensions/entitystore-mongodb/build.gradle | 1 -
.../mongodb/EmbedMongoDBMapEntityStoreTest.java | 88 ------------------
.../EmbedMongoDBMapEntityStoreTestSuite.java | 84 -----------------
.../docs/tutorials/howto-releasing-apache.txt | 94 ++++----------------
19 files changed, 90 insertions(+), 308 deletions(-)
----------------------------------------------------------------------
[3/5] polygene-java git commit: Removed Mongo ES tests based on
embedded mongo
Posted by pa...@apache.org.
Removed Mongo ES tests based on embedded mongo
Docker based ones are enough
POLYGENE-270
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/d0c1ff58
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/d0c1ff58
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/d0c1ff58
Branch: refs/heads/master
Commit: d0c1ff58d386b55a881893e9a762a043545eafe3
Parents: 49e6259
Author: Paul Merlin <pa...@apache.org>
Authored: Fri Jul 21 09:32:13 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Fri Jul 21 10:09:12 2017 +0200
----------------------------------------------------------------------
dependencies.gradle | 2 -
extensions/entitystore-mongodb/build.gradle | 1 -
.../mongodb/EmbedMongoDBMapEntityStoreTest.java | 88 --------------------
.../EmbedMongoDBMapEntityStoreTestSuite.java | 84 -------------------
4 files changed, 175 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/d0c1ff58/dependencies.gradle
----------------------------------------------------------------------
diff --git a/dependencies.gradle b/dependencies.gradle
index f9bc3de..b6446ad 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -183,7 +183,6 @@ def awaitilityVersion = '3.0.0'
def dnsJavaVersion = '2.1.8'
def dockerJUnitVersion = '0.3'
def easyMockVersion = '3.4'
-def embedMongoVersion = '2.0.0' // 2.0.0 exists
def h2Version = '1.4.196'
def hamcrestVersion = '1.3'
def jaxRsApiVersion = '2.0.1'
@@ -200,7 +199,6 @@ dependencies.libraries << [
dnsjava : "dnsjava:dnsjava:$dnsJavaVersion",
docker_junit : "com.github.tdomzal:junit-docker-rule:$dockerJUnitVersion",
easymock : "org.easymock:easymock:$easyMockVersion",
- embed_mongo : "de.flapdoodle.embed:de.flapdoodle.embed.mongo:$embedMongoVersion",
h2 : "com.h2database:h2:$h2Version",
hamcrest : [ "org.hamcrest:hamcrest-core:$hamcrestVersion",
"org.hamcrest:hamcrest-library:$hamcrestVersion" ],
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/d0c1ff58/extensions/entitystore-mongodb/build.gradle
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/build.gradle b/extensions/entitystore-mongodb/build.gradle
index 940db5a..1d5a0ba 100644
--- a/extensions/entitystore-mongodb/build.gradle
+++ b/extensions/entitystore-mongodb/build.gradle
@@ -33,7 +33,6 @@ dependencies {
runtimeOnly polygene.core.runtime
testImplementation polygene.internals.testsupport
- testImplementation libraries.embed_mongo
testRuntimeOnly libraries.logback
}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/d0c1ff58/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
deleted file mode 100644
index c362490..0000000
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * 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.polygene.entitystore.mongodb;
-
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
-import de.flapdoodle.embed.mongo.config.Net;
-import de.flapdoodle.embed.mongo.distribution.Version;
-import de.flapdoodle.embed.process.runtime.Network;
-import java.io.IOException;
-import java.util.Collections;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.util.FreePortFinder;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
-public class EmbedMongoDBMapEntityStoreTest extends AbstractEntityStoreTest
-{
- private static final MongodStarter MONGO_STARTER = MongodStarter.getDefaultInstance();
-
- @Rule
- public TestName testName = new TestName();
- private static int port;
- private static MongodExecutable mongod;
-
- @BeforeClass
- public static void startEmbedMongo()
- throws IOException
- {
- port = FreePortFinder.findFreePortOnLoopback();
- mongod = MONGO_STARTER.prepare( new MongodConfigBuilder()
- .version( Version.Main.PRODUCTION )
- .net( new Net( "localhost", port, Network.localhostIsIPv6() ) )
- .build() );
- mongod.start();
- }
-
- @AfterClass
- public static void stopEmbedMongo()
- {
- if( mongod != null )
- {
- mongod.stop();
- }
- }
-
- @Override
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- super.assemble( module );
-
- ModuleAssembly config = module.layer().module( "config" );
- new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
- new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-
- MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class )
- .declareDefaults();
- mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
- mongoConfig.database().set( "polygene-test" );
- mongoConfig.collection().set( testName.getMethodName() );
- mongoConfig.nodes().set( Collections.singletonList( "localhost:" + port ) );
- }
-}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/d0c1ff58/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
----------------------------------------------------------------------
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
deleted file mode 100644
index 57c1e16..0000000
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * 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.polygene.entitystore.mongodb;
-
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
-import de.flapdoodle.embed.mongo.config.Net;
-import de.flapdoodle.embed.mongo.distribution.Version;
-import de.flapdoodle.embed.process.runtime.Network;
-import java.io.IOException;
-import java.util.Collections;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-import org.apache.polygene.test.util.FreePortFinder;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
-public class EmbedMongoDBMapEntityStoreTestSuite extends EntityStoreTestSuite
-{
- private static final MongodStarter MONGO_STARTER = MongodStarter.getDefaultInstance();
-
- @Rule
- public TestName testName = new TestName();
- private static int port;
- private static MongodExecutable mongod;
-
- @BeforeClass
- public static void startEmbedMongo()
- throws IOException
- {
- port = FreePortFinder.findFreePortOnLoopback();
- mongod = MONGO_STARTER.prepare( new MongodConfigBuilder()
- .version( Version.Main.PRODUCTION )
- .net( new Net( "localhost", port, Network.localhostIsIPv6() ) )
- .build() );
- mongod.start();
- }
-
- @AfterClass
- public static void stopEmbedMongo()
- {
- if( mongod != null )
- {
- mongod.stop();
- }
- }
-
- @Override
- protected void defineStorageModule( ModuleAssembly module )
- {
- module.defaultServices();
- new MongoDBEntityStoreAssembler()
- .visibleIn( Visibility.application )
- .withConfig( configModule, Visibility.application )
- .assemble( module );
-
- MongoDBEntityStoreConfiguration mongoConfig = configModule.forMixin( MongoDBEntityStoreConfiguration.class )
- .declareDefaults();
- mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
- mongoConfig.database().set( "polygene-test" );
- mongoConfig.collection().set( testName.getMethodName() );
- mongoConfig.nodes().set( Collections.singletonList( "localhost:" + port ) );
- }
-}
[2/5] polygene-java git commit: Update release guide
Posted by pa...@apache.org.
Update release guide
- add tl;dr
- remove mentions of a binary distribution
- fix maven convenience binary staging
- minor edits (wording, commit messages etc..)
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/49e6259f
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/49e6259f
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/49e6259f
Branch: refs/heads/master
Commit: 49e6259f0dff70346dbb7a0360be5987112c159e
Parents: 1bdeea8
Author: Paul Merlin <pa...@apache.org>
Authored: Mon Jul 17 17:23:55 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Mon Jul 17 17:23:55 2017 +0200
----------------------------------------------------------------------
.../docs/tutorials/howto-releasing-apache.txt | 94 ++++----------------
1 file changed, 15 insertions(+), 79 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/49e6259f/manual/src/docs/tutorials/howto-releasing-apache.txt
----------------------------------------------------------------------
diff --git a/manual/src/docs/tutorials/howto-releasing-apache.txt b/manual/src/docs/tutorials/howto-releasing-apache.txt
index 9c2ae62..c67f269 100644
--- a/manual/src/docs/tutorials/howto-releasing-apache.txt
+++ b/manual/src/docs/tutorials/howto-releasing-apache.txt
@@ -33,6 +33,13 @@ It is intended to be a recommendation of best practices for the Apache Polygene
The instructions provided here are consistent with, but not a replacement for the https://www.apache.org/dev/release.html[ASF Release Guidelines].
+== TL;DR
+
+- Build and publish/stage release candidate bits
+- VOTE thread
+ - NO: clean things up
+ - YES: promote the release candidate bits as final and update all properties
+
== Preparing a release
@@ -271,14 +278,6 @@ Also review the release distributions in `distributions/build/distributions` whe
[source,shell]
----
.
-├── apache-polygene-java-<RELEASE-VERSION>-bin.tgz
-├── apache-polygene-java-<RELEASE-VERSION>-bin.tgz.MD5
-├── apache-polygene-java-<RELEASE-VERSION>-bin.tgz.SHA-512
-├── apache-polygene-java-<RELEASE-VERSION>-bin.tgz.asc
-├── apache-polygene-java-<RELEASE-VERSION>-bin.zip
-├── apache-polygene-java-<RELEASE-VERSION>-bin.zip.MD5
-├── apache-polygene-java-<RELEASE-VERSION>-bin.zip.SHA-512
-├── apache-polygene-java-<RELEASE-VERSION>-bin.zip.asc
├── apache-polygene-java-<RELEASE-VERSION>-src.tgz
├── apache-polygene-java-<RELEASE-VERSION>-src.tgz.MD5
├── apache-polygene-java-<RELEASE-VERSION>-src.tgz.SHA-512
@@ -330,7 +329,7 @@ Stage artifacts to https://repository.apache.org/[repository.apache.org] :
[source,shell]
----
cd polygene-java
-./gradlew -Dversion="<RELEASE-VERSION>" publishAsfMavenArtifacts
+./gradlew -Dversion="<RELEASE-VERSION>" uploadArchives
----
Close the staging Nexus repository by following the https://www.apache.org/dev/publishing-maven-artifacts.html#close-stage[Closing the staged repository] guide.
@@ -356,8 +355,8 @@ that the new version was published and is tagged as `beta`.
=== Upload RC distributions
-Source and binary distributions, checksums and signatures must be uploaded to https://dist.apache.org/repos/dist/dev/polygene/[dist.apache.org/repos/dist/dev/polygene].
-This build created these in the `buid/distributions` directory, named `apache-polygene-java-<RELEASE-VERSION>-[src|bin]*.*`.
+Source distribution, checksums and signatures must be uploaded to https://dist.apache.org/repos/dist/dev/polygene/[dist.apache.org/repos/dist/dev/polygene].
+This build created these in the `buid/distributions` directory, named `apache-polygene-java-<RELEASE-VERSION>-src*.*`.
As this release still is a simple candidate, we'll rename them before upload to advertise this in their names.
[source,shell]
@@ -380,24 +379,6 @@ cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEAS
"polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.SHA-512"
cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-src.tgz.asc" \
"polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.asc"
-# Binary ZIP
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.zip" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip"
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.zip.MD5" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.MD5"
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.zip.SHA-512" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.SHA-512"
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.zip.asc" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.asc"
-# Binary TAR.GZ
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.tgz" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz"
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.tgz.MD5" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.MD5"
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.tgz.SHA-512" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.SHA-512"
-cp "polygene-java/distributions/build/distributions/apache-polygene-java-<RELEASE-VERSION>-bin.tgz.asc" \
- "polygene-dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.asc"
----
And then upload them:
@@ -406,7 +387,7 @@ And then upload them:
----
cd polygene-dist/dev/polygene
svn add * --force
-svn commit -m "polygene: upload <RELEASE-VERSION> to dist/dev/polygene"
+svn commit -m "polygene: upload <RELEASE-VERSION>-RC# to dist/dev/polygene"
----
@@ -447,10 +428,6 @@ The vote is open for the next 72 hours and passes if a majority of at least thre
[ ] 0 I don't have a strong opinion about this, but I assume it's ok
[ ] -1 Do not release Apache Polygene (Java Edition) <RELEASE-VERSION> because...
-Here is my vote:
-
-+1 (binding)
-
Cheers
----
@@ -500,14 +477,6 @@ Put them in a directory:
[source,shell]
----
cd polygene-check-rc
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.MD5
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.SHA-512
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.asc
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.MD5
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.SHA-512
-wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.asc
wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz
wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.MD5
wget https://dist.apache.org/repos/dist/dev/polygene/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.SHA-512
@@ -526,8 +495,6 @@ Verify PGP signatures:
[source,shell]
----
cd polygene-check-rc
-gpg apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.asc
-gpg apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.asc
gpg apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.asc
gpg apache-polygene-java-<RELEASE-VERSION>-RC#-src.zip.asc
----
@@ -540,8 +507,6 @@ Verify MD5 checksum:
[source,shell]
----
cd polygene-check-rc
-echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz" | md5sum -c -
-echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip" | md5sum -c -
echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz" | md5sum -c -
echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-src.zip.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-src.zip" | md5sum -c -
----
@@ -554,8 +519,6 @@ Verify SHA-512 checksum:
[source,shell]
----
cd polygene-check-rc
-echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz" | shasum -a 512 -c -
-echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip" | shasum -a 512 -c -
echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz" | shasum -a 512 -c -
echo "$(cat apache-polygene-java-<RELEASE-VERSION>-RC#-src.zip.MD5) apache-polygene-java-<RELEASE-VERSION>-RC#-src.zip" | shasum -a 512 -c -
----
@@ -656,32 +619,6 @@ svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.SHA-5
svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-src.tgz.asc" \
"$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-src.tgz.asc" \
-m "polygene: promoting release <RELEASE-VERSION> distributions"
-# Binary ZIP
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.zip" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.MD5" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.zip.MD5" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.SHA-512" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.zip.SHA-512" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.zip.asc" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.zip.asc" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-# Binary TAR.GZ
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.tgz" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.MD5" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.tgz.MD5" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.SHA-512" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.tgz.SHA-512" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
-svn move "$DIST_DEV_URL/apache-polygene-java-<RELEASE-VERSION>-RC#-bin.tgz.asc" \
- "$DIST_RELEASE_URL/apache-polygene-java-<RELEASE-VERSION>-bin.tgz.asc" \
- -m "polygene: promoting release <RELEASE-VERSION> distributions"
----
This produces one commit per file but keep svn history and runs fast, without re-uploading the distributions.
@@ -806,7 +743,7 @@ Register the new release at https://reporter.apache.org/[reporter.apache.org]
=== Announce
-Finally, send an announcement to mailto:dev@polygene.apache.org[dev@] and mailto:users@polygene.apache.org[users@] mailing lists. Email announcements should have the subject line:
+Finally, send an announcement to mailto:dev@polygene.apache.org[dev@] mailing list. Email announcements should have the subject line:
[source,text]
----
@@ -817,7 +754,7 @@ The announcement email should contains the release-notes as text, remember they
-== VOTE fails
+== VOTE fails or is cancelled
=== Record failure
@@ -846,9 +783,8 @@ Drop distributions, checksums and signatures from https://dist.apache.org/repos/
[source,shell]
----
cd polygene-dist/dev/polygene/
-rm "*<RELEASE-VERSION>-RC#*.*"
-svn add * --force
-svn commit -m "polygene: dropping <RELEASE-VERSION>-RC# from dist/dev/polygene as the vote failed"
+svn rm "*<RELEASE-VERSION>-RC#*.*"
+svn commit -m "polygene: dropping <RELEASE-VERSION>-RC# from dist/dev/polygene as the vote failed/was cancelled"
----
Drop NPM packages:
[4/5] polygene-java git commit: Use platform line separators in
exception messages
Posted by pa...@apache.org.
Use platform line separators in exception messages
Otherwise the stacktraces include mixed line separators making writing
assertions brittle.
POLYGENE-270
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/42b3d335
Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/42b3d335
Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/42b3d335
Branch: refs/heads/master
Commit: 42b3d335875ba6a0882fd41d008c1da8d6dc604f
Parents: d0c1ff5
Author: Paul Merlin <pa...@apache.org>
Authored: Fri Jul 21 10:09:24 2017 +0200
Committer: Paul Merlin <pa...@apache.org>
Committed: Fri Jul 21 10:09:24 2017 +0200
----------------------------------------------------------------------
.../polygene/api/composite/DecoratorMixin.java | 12 +++++-----
.../composite/InvalidCompositeException.java | 23 ++++++++++----------
.../composite/NoSuchCompositeTypeException.java | 10 +++++----
.../ConstraintViolationException.java | 9 ++++----
.../api/object/NoSuchObjectTypeException.java | 5 +++--
.../ConcurrentEntityModificationException.java | 5 +++--
.../bootstrap/AssemblyReportException.java | 7 +++---
.../apache/polygene/bootstrap/Energy4Java.java | 3 ++-
.../bootstrap/CompositeAssemblyImpl.java | 2 +-
.../composite/CompositeMethodsModel.java | 11 ++++++----
.../runtime/composite/ConstructorModel.java | 8 ++++---
.../runtime/injection/InjectedFieldModel.java | 8 ++++---
.../polygene/bootstrap/ErrorReportingTest.java | 22 ++++++++++---------
...currentEntityStateModificationException.java | 4 +++-
14 files changed, 75 insertions(+), 54 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/api/src/main/java/org/apache/polygene/api/composite/DecoratorMixin.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/DecoratorMixin.java b/core/api/src/main/java/org/apache/polygene/api/composite/DecoratorMixin.java
index 1707f3e..7e24da5 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/DecoratorMixin.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/DecoratorMixin.java
@@ -37,6 +37,8 @@ import org.apache.polygene.api.injection.scope.Uses;
public class DecoratorMixin
implements InvocationHandler
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private Object delegate;
public DecoratorMixin( @Uses Object delegate )
@@ -78,15 +80,15 @@ public class DecoratorMixin
private String constructMessage( Method method, Object[] args )
{
StringBuilder builder = new StringBuilder();
- builder.append( "\nmethod: " );
+ builder.append( NL ).append( "method: " );
builder.append( method.getDeclaringClass().getName() );
builder.append( "." );
builder.append( method.getName() );
- builder.append( "\ndelegate: " );
+ builder.append( NL ).append( "delegate: " );
builder.append( delegate );
- builder.append( "\ndelegateType: " );
+ builder.append( NL ).append( "delegateType: " );
builder.append( delegate == null ? "n/a" : delegate.getClass().getName() );
- builder.append( "\narguments: \n" );
+ builder.append( NL ).append( "arguments:" ).append( NL );
for( Object arg : args )
{
builder.append( " " );
@@ -99,7 +101,7 @@ public class DecoratorMixin
{
builder.append( argClass.getName() );
}
- builder.append( '\n' );
+ builder.append( NL );
}
return builder.toString();
}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/api/src/main/java/org/apache/polygene/api/composite/InvalidCompositeException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/InvalidCompositeException.java b/core/api/src/main/java/org/apache/polygene/api/composite/InvalidCompositeException.java
index c7657b3..4d1ead2 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/InvalidCompositeException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/InvalidCompositeException.java
@@ -34,6 +34,7 @@ import org.apache.polygene.api.structure.ModuleDescriptor;
*/
public class InvalidCompositeException extends RuntimeException
{
+ private static final String NL = System.getProperty( "line.separator" );
private static boolean aggregateProblems = true;
private static ThreadLocal<ArrayList<InvalidCompositeException>> report = ThreadLocal.withInitial( ArrayList::new );
private ModuleDescriptor module;
@@ -73,13 +74,13 @@ public class InvalidCompositeException extends RuntimeException
public String getMessage()
{
String typeNames = typesString();
- String primary = primaryType == null ? "" : " primary: " + primaryType.toGenericString() + "\n";
+ String primary = primaryType == null ? "" : " primary: " + primaryType.toGenericString() + NL;
String methodName = memberString();
- String message = super.getMessage() == null ? "" : " message: " + super.getMessage() + "\n";
- String fragment = fragmentClass == null ? "" : " fragmentClass: " + fragmentClass.getName() + "\n";
- String valueType = this.valueType == null ? "" : " valueType: " + this.valueType.getTypeName() + "\n";
- String module = this.module == null ? "" : " layer: " + this.module.layer().name() + "\n module: "
- + this.module.name() + "\n";
+ String message = super.getMessage() == null ? "" : " message: " + super.getMessage() + NL;
+ String fragment = fragmentClass == null ? "" : " fragmentClass: " + fragmentClass.getName() + NL;
+ String valueType = this.valueType == null ? "" : " valueType: " + this.valueType.getTypeName() + NL;
+ String module = this.module == null ? "" : " layer: " + this.module.layer().name() + NL + " module: "
+ + this.module.name() + NL;
return message + module + primary + fragment + methodName + valueType + typeNames;
}
@@ -93,7 +94,7 @@ public class InvalidCompositeException extends RuntimeException
+ types.stream()
.map( Class::getSimpleName )
.collect( Collectors.joining( ",", "[", "]" ) )
- + "\n";
+ + NL;
}
private String memberString()
@@ -108,12 +109,12 @@ public class InvalidCompositeException extends RuntimeException
String parameters = Arrays.stream( method.getParameters() )
.map( p -> p.getType().getSimpleName() + " " + p.getName() )
.collect( Collectors.joining( ", ", "(", ")" ) );
- return " method: " + method.getReturnType().getSimpleName() + " " + method.getName() + parameters + "\n";
+ return " method: " + method.getReturnType().getSimpleName() + " " + method.getName() + parameters + NL;
}
if( member instanceof Field )
{
Field field = (Field) member;
- return " field: " + field.getType().getSimpleName() + " " + field.getName() + "\n";
+ return " field: " + field.getType().getSimpleName() + " " + field.getName() + NL;
}
return member.toString();
}
@@ -122,10 +123,10 @@ public class InvalidCompositeException extends RuntimeException
{
if( report.get().size() > 0 )
{
- String reportText = "\nComposition Problems Report:\n"
+ String reportText = NL + "Composition Problems Report:" + NL
+ report.get().stream()
.map( Throwable::getMessage )
- .map( m -> m + "\n--\n" )
+ .map( m -> m + NL + "--" + NL )
.collect( Collectors.joining() );
report.set( new ArrayList<>() );
return reportText;
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java
index 1d6f155..2fdaea3 100644
--- a/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/composite/NoSuchCompositeTypeException.java
@@ -32,6 +32,8 @@ import static java.util.stream.Collectors.joining;
*/
public abstract class NoSuchCompositeTypeException extends InvalidApplicationException
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private final String compositeType;
private final String moduleName;
private final String visibleTypes;
@@ -40,7 +42,7 @@ public abstract class NoSuchCompositeTypeException extends InvalidApplicationExc
protected NoSuchCompositeTypeException( String metaType, String compositeType, ModuleDescriptor module )
{
- super( "\n\tCould not find any visible " + metaType + " of type [" + compositeType + "] in module [" + module.name() + "]." );
+ super( NL + "\tCould not find any visible " + metaType + " of type [" + compositeType + "] in module [" + module.name() + "]." );
this.metaType = metaType;
this.compositeType = compositeType;
this.moduleName = module.name();
@@ -71,7 +73,7 @@ public abstract class NoSuchCompositeTypeException extends InvalidApplicationExc
@Override
public String getMessage()
{
- return super.getMessage() + "\n" + candidateTypes + "\n" + visibleTypes;
+ return super.getMessage() + NL + candidateTypes + NL + visibleTypes;
}
private String formatVisibleTypes( TypeLookup typeLookup )
@@ -85,7 +87,7 @@ public abstract class NoSuchCompositeTypeException extends InvalidApplicationExc
} )
.sorted()
.distinct()
- .collect( joining( "\n", "\tVisible " + metaType + " types are:\n", "" ) );
+ .collect( joining( NL, "\tVisible " + metaType + " types are:" + NL, "" ) );
}
private String findCandidateTypes( ModuleDescriptor module )
@@ -102,7 +104,7 @@ public abstract class NoSuchCompositeTypeException extends InvalidApplicationExc
return "\t\t[ " + typeName + "] in [" + descriptor.module().name() + "] with visibility " + descriptor.visibility();
} )
.distinct()
- .collect( joining( "\n", "\tInvisible " + metaType + " types are:\n", "" ) );
+ .collect( joining( NL, "\tInvisible " + metaType + " types are:" + NL, "" ) );
}
protected abstract Stream<? extends CompositeDescriptor> descriptors( TypeLookup typeLookup );
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java b/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
index 0eecf04..83f9a8c 100644
--- a/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/constraint/ConstraintViolationException.java
@@ -47,11 +47,12 @@ import org.apache.polygene.api.util.Classes;
*/
public class ConstraintViolationException extends IllegalArgumentException
{
+ private static final String NL = System.getProperty( "line.separator" );
private static final boolean longNames = Boolean.getBoolean( "polygene.constraints.longNames" );
- private static final String DEFAULT_PATTERN = "\n\tConstraint Violation(s) in {0} of types [{3}].\n";
- private static final String ENTITY_DEFAULT_PATTERN = "\n\tConstraint Violation(s) in entity {0} with id=[{2}].\n";
- private static final String SERVICE_DEFAULT_PATTERN = "\n\tConstraint Violation(s) in service {0} with id=[{2}].\n";
- private static final String MIXIN_DEFAULT_PATTERN = "\t\t@{2}({3}) on {0}.{1}(). Parameter [{4}] does not allow value [{5}].\n";
+ private static final String DEFAULT_PATTERN = NL + "\tConstraint Violation(s) in {0} of types [{3}]." + NL;
+ private static final String ENTITY_DEFAULT_PATTERN = NL + "\tConstraint Violation(s) in entity {0} with id=[{2}]." + NL;
+ private static final String SERVICE_DEFAULT_PATTERN = NL + "\tConstraint Violation(s) in service {0} with id=[{2}]." + NL;
+ private static final String MIXIN_DEFAULT_PATTERN = "\t\t@{2}({3}) on {0}.{1}(). Parameter [{4}] does not allow value [{5}]." + NL;
private String instanceToString; // arg {0}
private Class<?> primaryType; // arg {1}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java b/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
index af1801f..dcbd4f3 100644
--- a/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/object/NoSuchObjectTypeException.java
@@ -30,6 +30,7 @@ public class NoSuchObjectTypeException
extends InvalidApplicationException
{
private static final long serialVersionUID = -1121690536365682511L;
+ private static final String NL = System.getProperty( "line.separator" );
private final String objectType;
private final String moduleName;
@@ -38,8 +39,8 @@ public class NoSuchObjectTypeException
{
super( "Could not find any visible Object of type [" + type + "] in module ["
+ moduleName
- + "]. The visible types are: \n"
- + visible.map( Class::getName ).collect( Collectors.joining("\n") )
+ + "]. The visible types are: " + NL
+ + visible.map( Class::getName ).collect( Collectors.joining( NL ) )
);
this.objectType = type;
this.moduleName = moduleName;
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/api/src/main/java/org/apache/polygene/api/unitofwork/ConcurrentEntityModificationException.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/polygene/api/unitofwork/ConcurrentEntityModificationException.java b/core/api/src/main/java/org/apache/polygene/api/unitofwork/ConcurrentEntityModificationException.java
index 7d439b0..d54b1ad 100644
--- a/core/api/src/main/java/org/apache/polygene/api/unitofwork/ConcurrentEntityModificationException.java
+++ b/core/api/src/main/java/org/apache/polygene/api/unitofwork/ConcurrentEntityModificationException.java
@@ -34,6 +34,7 @@ public class ConcurrentEntityModificationException
extends UnitOfWorkCompletionException
{
private static final long serialVersionUID = 3872723845064767689L;
+ private static final String NL = System.getProperty( "line.separator" );
private final Map<EntityComposite, HasTypes> concurrentlyModifiedEntities;
@@ -41,7 +42,7 @@ public class ConcurrentEntityModificationException
Usecase usecase
)
{
- super( "Entities changed concurrently, and detected in usecase '" + usecase + "'\nModified entities : " + format( concurrentlyModifiedEntities ) );
+ super( "Entities changed concurrently, and detected in usecase '" + usecase + "'" + NL + "Modified entities : " + format( concurrentlyModifiedEntities ) );
this.concurrentlyModifiedEntities = concurrentlyModifiedEntities;
}
@@ -54,7 +55,7 @@ public class ConcurrentEntityModificationException
+ entry.getValue().types().map( Class::getSimpleName )
.collect( Collectors.joining( "," ) )
)
- .collect( Collectors.joining( "\n" ) );
+ .collect( Collectors.joining( NL ) );
}
public Map<EntityComposite, HasTypes> concurrentlyModifiedEntities()
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
index 4a2211e..2ca57cf 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/AssemblyReportException.java
@@ -21,7 +21,6 @@ package org.apache.polygene.bootstrap;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
-import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@@ -30,6 +29,8 @@ import java.util.stream.Collectors;
*/
public class AssemblyReportException extends AssemblyException
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private Set<Throwable> problems;
private String modelReport;
@@ -44,7 +45,7 @@ public class AssemblyReportException extends AssemblyException
String message;
if( modelReport == null )
{
- message = "\nComposition Problems Report:\n";
+ message = NL+ "Composition Problems Report:" + NL;
}
else
{
@@ -52,7 +53,7 @@ public class AssemblyReportException extends AssemblyException
}
return message + problems.stream()
.map( this::composeMessage )
- .map( m -> m + "\n--\n" )
+ .map( m -> m + NL + "--" + NL )
.collect( Collectors.joining() );
}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Energy4Java.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Energy4Java.java b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Energy4Java.java
index a4cf0c3..13941c1 100644
--- a/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Energy4Java.java
+++ b/core/bootstrap/src/main/java/org/apache/polygene/bootstrap/Energy4Java.java
@@ -76,7 +76,8 @@ public final class Energy4Java
String modelReport = InvalidCompositeException.modelReport();
if( modelReport != null )
{
- throw new AssemblyException( "Composition problems\n\n" + modelReport );
+ String nl = System.getProperty( "line.separator" );
+ throw new AssemblyException( "Composition problems" + nl + nl + modelReport );
}
return model;
}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
index 7f69916..e25bfe7 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/CompositeAssemblyImpl.java
@@ -338,7 +338,7 @@ public abstract class CompositeAssemblyImpl
{
return implementMethodWithClass( method, mixinClass );
}
- handleInvalidCompositeType( "No implementation found for method ", null, null, null, null, method, types );
+ handleInvalidCompositeType( "No implementation found for method", null, null, null, null, method, types );
return null;
}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodsModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodsModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodsModel.java
index 2223091..dd2bfb6 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodsModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/CompositeMethodsModel.java
@@ -39,6 +39,8 @@ import org.apache.polygene.runtime.injection.DependencyModel;
public final class CompositeMethodsModel
implements VisitableHierarchy<Object, Object>, Dependencies
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private final LinkedHashMap<Method, CompositeMethodModel> methods;
private final MixinsModel mixinsModel;
@@ -102,14 +104,15 @@ public final class CompositeMethodsModel
// return method.invoke( proxy, args );
String message = "We have detected a default method on an interface that is not backed by a Composite. "
+ "Please report this to dev@polygene.apache.org together with the information below, "
- + "that/those class(es) and the relevant assembly information. Thank you\nMethod:"
+ + "that/those class(es) and the relevant assembly information. Thank you"
+ + NL + "Method:"
+ method.toGenericString()
- + "\nDeclaring Class:"
+ + NL + "Declaring Class:"
+ method.getDeclaringClass().toGenericString()
- + "\nTypes:"
+ + NL + "Types:"
+ mixinsModel.mixinTypes()
.map( Class::toGenericString )
- .collect( Collectors.joining( "\n" ) );
+ .collect( Collectors.joining( NL ) );
throw new UnsupportedOperationException( message );
}
throw new MissingMethodException( "Method '" + method + "' is not implemented" );
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
index 026a4e1..a35227c 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/composite/ConstructorModel.java
@@ -41,6 +41,8 @@ import static org.apache.polygene.api.util.AccessibleObjects.accessible;
public final class ConstructorModel
implements ConstructorDescriptor, VisitableHierarchy<Object, Object>
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private Constructor<?> constructor;
private InjectedParametersModel parameters;
@@ -103,9 +105,9 @@ public final class ConstructorModel
private String createExceptionMessage( Object[] parametersInstance )
{
- return "Could not instantiate \n " + constructor.getDeclaringClass()
- + "\nusing constructor:\n " + constructor.toGenericString()
- + "\nparameter types:\n " + Arrays.toString( parametersInstance );
+ return "Could not instantiate " + NL + " " + constructor.getDeclaringClass()
+ + NL + "using constructor:" + NL + " " + constructor.toGenericString()
+ + NL + "parameter types:" + NL + " " + Arrays.toString( parametersInstance );
}
@Override
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/runtime/src/main/java/org/apache/polygene/runtime/injection/InjectedFieldModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/injection/InjectedFieldModel.java b/core/runtime/src/main/java/org/apache/polygene/runtime/injection/InjectedFieldModel.java
index 553f1ff..8ce5597 100644
--- a/core/runtime/src/main/java/org/apache/polygene/runtime/injection/InjectedFieldModel.java
+++ b/core/runtime/src/main/java/org/apache/polygene/runtime/injection/InjectedFieldModel.java
@@ -47,6 +47,8 @@ import static java.util.Collections.singleton;
public final class InjectedFieldModel
implements InjectedFieldDescriptor, Dependencies, VisitableHierarchy<InjectedFieldModel, DependencyModel>
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private DependencyModel dependencyModel;
private Field injectedField;
@@ -124,11 +126,11 @@ public final class InjectedFieldModel
annotBuilder.append( " " );
}
String annots = annotBuilder.toString();
- String message = "Can not inject the field\n "
+ String message = "Can not inject the field" + NL + " "
+ injectedField.getDeclaringClass()
- + "\n {\n " + annots + "\n "
+ + NL + " {" + NL + " " + annots + NL + " "
+ injectedField.getType().getSimpleName() + " " + injectedField.getName()
- + "\n }\nwith value \n " + value + "\nof type\n "
+ + NL + " }" + NL + "with value " + NL + " " + value + NL + "of type" + NL + " "
+ valueClassName;
throw new InjectionException( message, e );
}
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/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 8feca04..0ddb5e6 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
@@ -31,6 +31,8 @@ import static org.junit.Assert.assertThat;
public class ErrorReportingTest extends AbstractPolygeneTest
{
+ private static final String NL = System.getProperty( "line.separator" );
+
@Override
public void assemble( ModuleAssembly module )
{
@@ -41,18 +43,18 @@ public class ErrorReportingTest extends AbstractPolygeneTest
@Override
protected void assemblyException( AssemblyException exception )
{
- 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"
- + " types: [Person,ValueComposite]\n" ) );
+ assertThat( exception.getMessage(), containsString( "Composition Problems Report:" + NL ) );
+ assertThat( exception.getMessage(), containsString( " message: No implementation found for method" + NL
+ + " method: Map doAnotherThing(String name, int value)" + NL
+ + " types: [Person,ValueComposite]" + NL ) );
- assertThat( exception.getMessage(), containsString( " message: No implementation found for method \n"
- + " method: void doOneThing()\n"
- + " types: [Person,ValueComposite]\n" ) );
+ assertThat( exception.getMessage(), containsString( " message: No implementation found for method" + NL
+ + " method: void doOneThing()" + NL
+ + " types: [Person,ValueComposite]" + NL ) );
- assertThat( exception.getMessage(), containsString( " message: No implementation found for method \n"
- + " method: void goForWalk(int minutes)\n"
- + " types: [Pet,ValueComposite]\n" ) );
+ assertThat( exception.getMessage(), containsString( " message: No implementation found for method" + NL
+ + " method: void goForWalk(int minutes)" + NL
+ + " types: [Pet,ValueComposite]" + NL ) );
}
@Test
http://git-wip-us.apache.org/repos/asf/polygene-java/blob/42b3d335/core/spi/src/main/java/org/apache/polygene/spi/entitystore/ConcurrentEntityStateModificationException.java
----------------------------------------------------------------------
diff --git a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/ConcurrentEntityStateModificationException.java b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/ConcurrentEntityStateModificationException.java
index f6bbfe8..132edb2 100644
--- a/core/spi/src/main/java/org/apache/polygene/spi/entitystore/ConcurrentEntityStateModificationException.java
+++ b/core/spi/src/main/java/org/apache/polygene/spi/entitystore/ConcurrentEntityStateModificationException.java
@@ -29,6 +29,8 @@ import org.apache.polygene.api.entity.EntityReference;
public class ConcurrentEntityStateModificationException
extends EntityStoreException
{
+ private static final String NL = System.getProperty( "line.separator" );
+
private Collection<EntityReference> modifiedEntities;
public ConcurrentEntityStateModificationException( Collection<EntityReference> modifiedEntities )
@@ -45,6 +47,6 @@ public class ConcurrentEntityStateModificationException
@Override
public String getMessage()
{
- return "Entities changed concurrently.\nModified entities are;\n" + modifiedEntities;
+ return "Entities changed concurrently." + NL + "Modified entities are;" + NL + modifiedEntities;
}
}
\ No newline at end of file