POLYGENE-234 : Adding a default name to services.
Project: http://git-wip-us.apache.org/repos/asf/polygene-java/repo Commit: http://git-wip-us.apache.org/repos/asf/polygene-java/commit/6c5f9865 Tree: http://git-wip-us.apache.org/repos/asf/polygene-java/tree/6c5f9865 Diff: http://git-wip-us.apache.org/repos/asf/polygene-java/diff/6c5f9865 Branch: refs/heads/develop Commit: 6c5f98655233a66a981accbb09314eb6f0076162 Parents: 3364190 Author: niclas <[email protected]> Authored: Sun Mar 5 13:21:11 2017 +0800 Committer: niclas <[email protected]> Committed: Sun Mar 5 13:21:11 2017 +0800 ---------------------------------------------------------------------- .../apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/polygene-java/blob/6c5f9865/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java ---------------------------------------------------------------------- diff --git a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java index 9fe0cb0..45dfc74 100644 --- a/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java +++ b/core/runtime/src/main/java/org/apache/polygene/runtime/bootstrap/ServiceDeclarationImpl.java @@ -58,6 +58,9 @@ public final class ServiceDeclarationImpl { for( ServiceAssemblyImpl serviceAssembly : serviceAssemblies ) { + if( identity == null ) { + identity = serviceAssembly.types.get(0).getName(); + } serviceAssembly.identity = new StringIdentity( identity ); } return this;
