You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by jk...@apache.org on 2014/12/04 20:46:19 UTC

[1/2] tapestry-5 git commit: TAP5-2425: throw a meaningful exception when trying to use an abstract class as a service implementation

Repository: tapestry-5
Updated Branches:
  refs/heads/master 23e512b1d -> 9b5e19035


TAP5-2425: throw a meaningful exception when trying to use an abstract class as a service implementation


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/b06c013f
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/b06c013f
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/b06c013f

Branch: refs/heads/master
Commit: b06c013f1719c455b46ed4b88b74b66fd963197a
Parents: 23e512b
Author: Jochen Kemnade <jk...@apache.org>
Authored: Thu Dec 4 20:38:32 2014 +0100
Committer: Jochen Kemnade <jk...@apache.org>
Committed: Thu Dec 4 20:38:32 2014 +0100

----------------------------------------------------------------------
 .../tapestry5/ioc/internal/IOCMessages.java     |  5 ++++
 .../ioc/internal/ServiceBinderImpl.java         |  3 ++
 .../ioc/internal/IOCStrings.properties          |  3 +-
 .../ioc/specs/DefaultModuleDefImplSpec.groovy   | 28 +++++++++++++++----
 .../AbstractAutobuildServiceModule.java         | 25 +++++++++++++++++
 .../ioc/internal/AbstractRunnableService.java   | 29 ++++++++++++++++++++
 6 files changed, 87 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
index 7584702..ac39d15 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
@@ -187,6 +187,11 @@ final class IOCMessages
         return MESSAGES.format("no-constructor", implementationClass.getName(), serviceId);
     }
 
+    static String abstractServiceImplementation(Class implementationClass, String serviceId)
+    {
+        return MESSAGES.format("abstract-service-implementation", implementationClass.getName(), serviceId);
+    }
+
     static String bindMethodMustBeStatic(String methodId)
     {
         return MESSAGES.format("bind-method-must-be-static", methodId);

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
index e7ec9e1..d93ed2e 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceBinderImpl.java
@@ -28,6 +28,7 @@ import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.util.Arrays;
 import java.util.Set;
 
@@ -140,6 +141,8 @@ public class ServiceBinderImpl implements ServiceBinder, ServiceBindingOptions
 
     private ObjectCreatorSource createStandardConstructorBasedObjectCreatorSource()
     {
+        if (Modifier.isAbstract(serviceImplementation.getModifiers()))
+            throw new RuntimeException(IOCMessages.abstractServiceImplementation(serviceImplementation, serviceId));
         final Constructor constructor = InternalUtils.findAutobuildConstructor(serviceImplementation);
 
         if (constructor == null)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
index 73fe7e7..6710b91 100644
--- a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
+++ b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
@@ -65,4 +65,5 @@ overlapping-service-proxy-providers=Setting a new service proxy provider when th
 unexpected-service-proxy-provider=Unexpected service proxy provider when clearing the provider. This may indicate that you have multiple IoC Registries.
 no-proxy-provider=Service token for service '%s' can not be converted back into a proxy because no proxy provider has been registered. This may indicate that an IoC Registry has not been started yet.
 contribution-for-nonexistent-service=Contribution %s is for service '%s', which does not exist.
-contribution-for-unqualified-service=Contribution %s is for service '%s' qualified with marker annotations %s, which does not exist.
\ No newline at end of file
+contribution-for-unqualified-service=Contribution %s is for service '%s' qualified with marker annotations %s, which does not exist.
+abstract-service-implementation=Class %s (implementation of service '%s') is abstract.

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/test/groovy/ioc/specs/DefaultModuleDefImplSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/DefaultModuleDefImplSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/DefaultModuleDefImplSpec.groovy
index 91f6dc3..e46f469 100644
--- a/tapestry-ioc/src/test/groovy/ioc/specs/DefaultModuleDefImplSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/ioc/specs/DefaultModuleDefImplSpec.groovy
@@ -7,9 +7,12 @@ import org.apache.tapestry5.ioc.def.ServiceDef3
 import org.apache.tapestry5.ioc.internal.services.PlasticProxyFactoryImpl
 import org.apache.tapestry5.ioc.services.PlasticProxyFactory
 import org.slf4j.Logger
+
+import spock.lang.Issue;
 import spock.lang.Shared
 import spock.lang.Specification
 import spock.lang.Unroll
+
 import org.apache.tapestry5.ioc.*
 import org.apache.tapestry5.ioc.internal.*
 
@@ -415,15 +418,15 @@ class DefaultModuleDefImplSpec extends Specification {
 
   def "Multiple marker annotations can be added to service via ServiceBindingOptions"() {
 	  when:
-  
+
 	  def md = module MarkerModule
 	  def sd = md.getServiceDef "ColorfulGreeter"
-  
+
 	  then:
-  
+
 	  sd.markers == [RedMarker, BlueMarker] as Set
 	}
-  
+
   def "public synthetic methods on module class are ignored"() {
     def moduleClass = createSyntheticModuleClass()
 
@@ -435,7 +438,7 @@ class DefaultModuleDefImplSpec extends Specification {
 
     md.serviceIds.size() == 1
   }
-  
+
   def "Methods overridden from Object are ignored"() {
 
     when:
@@ -447,6 +450,21 @@ class DefaultModuleDefImplSpec extends Specification {
     md.serviceIds.size() == 1
   }
 
+  @Issue('https://issues.apache.org/jira/browse/TAP5-2425')
+  def "a service implementation must not be abstract"() {
+
+    when:
+
+    module AbstractAutobuildServiceModule
+
+    then:
+
+    RuntimeException e = thrown()
+
+    e.message.contains "Class org.apache.tapestry5.ioc.internal.AbstractRunnableService (implementation of service 'Runnable') is abstract."
+
+  }
+
 
   private createSyntheticModuleClass() {
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractAutobuildServiceModule.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractAutobuildServiceModule.java b/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractAutobuildServiceModule.java
new file mode 100644
index 0000000..13bc367
--- /dev/null
+++ b/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractAutobuildServiceModule.java
@@ -0,0 +1,25 @@
+// Copyright 2007, 2010 The Apache Software Foundation
+//
+// Licensed 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.tapestry5.ioc.internal;
+
+import org.apache.tapestry5.ioc.ServiceBinder;
+
+public class AbstractAutobuildServiceModule
+{
+    public static void bind(ServiceBinder binder)
+    {
+        binder.bind(Runnable.class, AbstractRunnableService.class).preventReloading();
+    }
+}

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/b06c013f/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractRunnableService.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractRunnableService.java b/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractRunnableService.java
new file mode 100644
index 0000000..978286a
--- /dev/null
+++ b/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/AbstractRunnableService.java
@@ -0,0 +1,29 @@
+// Copyright 2014 The Apache Software Foundation
+//
+// Licensed 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.tapestry5.ioc.internal;
+
+/**
+ * This service implementation is abstract, which triggers an exception.
+ */
+public abstract class AbstractRunnableService implements Runnable
+{
+
+
+    @Override
+    public void run()
+    {
+    }
+
+}


[2/2] tapestry-5 git commit: TAP5-2422: Include the MappedConfiguration key in the error message for duplicate contributions

Posted by jk...@apache.org.
TAP5-2422: Include the MappedConfiguration key in the error message for duplicate contributions


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9b5e1903
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9b5e1903
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9b5e1903

Branch: refs/heads/master
Commit: 9b5e19035f0e779f40231b0275e473c7def1b2cc
Parents: b06c013
Author: Jochen Kemnade <jk...@apache.org>
Authored: Thu Dec 4 20:45:12 2014 +0100
Committer: Jochen Kemnade <jk...@apache.org>
Committed: Thu Dec 4 20:45:12 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java | 4 ++--
 .../ioc/internal/ValidatingMappedConfigurationWrapper.java       | 2 +-
 .../org/apache/tapestry5/ioc/internal/IOCStrings.properties      | 2 +-
 .../ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy    | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
index ac39d15..f3b8388 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
@@ -137,9 +137,9 @@ final class IOCMessages
         return MESSAGES.format("generic-type-not-supported", type);
     }
 
-    static String contributionDuplicateKey(String serviceId, ContributionDef existingDef)
+    static String contributionDuplicateKey(String serviceId, Object key, ContributionDef existingDef)
     {
-        return MESSAGES.format("contribution-duplicate-key", serviceId, existingDef);
+        return MESSAGES.format("contribution-duplicate-key", serviceId, key, existingDef);
     }
 
     static String errorBuildingService(String serviceId, ServiceDef serviceDef, Throwable cause)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
index f88c47c..096dcda 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
@@ -85,7 +85,7 @@ public class ValidatingMappedConfigurationWrapper<K, V> extends AbstractConfigur
         ContributionDef existing = keyToContributor.get(key);
 
         if (existing != null)
-            throw new IllegalArgumentException(IOCMessages.contributionDuplicateKey(serviceId, existing));
+            throw new IllegalArgumentException(IOCMessages.contributionDuplicateKey(serviceId, key, existing));
 
         map.put(key, coerced);
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
index 6710b91..c30c149 100644
--- a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
+++ b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
@@ -43,7 +43,7 @@ contribution-was-null=Service contribution (to service '%s') was null.
 contribution-key-was-null=Key for service contribution (to service '%s') was null.
 contribution-wrong-key-type=Key for service contribution (to service '%s') was an instance of %s, \
   but the expected key type was %s.
-contribution-duplicate-key=Service contribution (to service '%s') conflicts with existing contribution (by %s).
+contribution-duplicate-key=Service contribution (to service '%s') for key '%s' conflicts with existing contribution (by %s).
 generic-type-not-supported=Generic type '%s' is not supported. Only simple parameterized lists are \
   supported.
 error-building-service=Error building service proxy for service '%s' (at %s): %s

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
index 60241a7..2bc5816 100644
--- a/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
@@ -97,7 +97,7 @@ class ValidatingMappedConfigurationWrapperSpec extends AbstractSharedRegistrySpe
 
     IllegalArgumentException e = thrown()
 
-    e.message.contains "Service contribution (to service 'Baz') conflicts with existing contribution"
+    e.message.contains "Service contribution (to service 'Baz') for key 'class java.lang.Integer' conflicts with existing contribution"
 
     keyToContribution[Integer].is(def1)
     map.isEmpty()


[2/2] tapestry-5 git commit: TAP5-2422: Include the MappedConfiguration key in the error message for duplicate contributions

Posted by jk...@apache.org.
TAP5-2422: Include the MappedConfiguration key in the error message for duplicate contributions


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/9b5e1903
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/9b5e1903
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/9b5e1903

Branch: refs/heads/master
Commit: 9b5e19035f0e779f40231b0275e473c7def1b2cc
Parents: b06c013
Author: Jochen Kemnade <jk...@apache.org>
Authored: Thu Dec 4 20:45:12 2014 +0100
Committer: Jochen Kemnade <jk...@apache.org>
Committed: Thu Dec 4 20:45:12 2014 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java | 4 ++--
 .../ioc/internal/ValidatingMappedConfigurationWrapper.java       | 2 +-
 .../org/apache/tapestry5/ioc/internal/IOCStrings.properties      | 2 +-
 .../ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy    | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
index ac39d15..f3b8388 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java
@@ -137,9 +137,9 @@ final class IOCMessages
         return MESSAGES.format("generic-type-not-supported", type);
     }
 
-    static String contributionDuplicateKey(String serviceId, ContributionDef existingDef)
+    static String contributionDuplicateKey(String serviceId, Object key, ContributionDef existingDef)
     {
-        return MESSAGES.format("contribution-duplicate-key", serviceId, existingDef);
+        return MESSAGES.format("contribution-duplicate-key", serviceId, key, existingDef);
     }
 
     static String errorBuildingService(String serviceId, ServiceDef serviceDef, Throwable cause)

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
index f88c47c..096dcda 100644
--- a/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
+++ b/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ValidatingMappedConfigurationWrapper.java
@@ -85,7 +85,7 @@ public class ValidatingMappedConfigurationWrapper<K, V> extends AbstractConfigur
         ContributionDef existing = keyToContributor.get(key);
 
         if (existing != null)
-            throw new IllegalArgumentException(IOCMessages.contributionDuplicateKey(serviceId, existing));
+            throw new IllegalArgumentException(IOCMessages.contributionDuplicateKey(serviceId, key, existing));
 
         map.put(key, coerced);
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
index 6710b91..c30c149 100644
--- a/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
+++ b/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/IOCStrings.properties
@@ -43,7 +43,7 @@ contribution-was-null=Service contribution (to service '%s') was null.
 contribution-key-was-null=Key for service contribution (to service '%s') was null.
 contribution-wrong-key-type=Key for service contribution (to service '%s') was an instance of %s, \
   but the expected key type was %s.
-contribution-duplicate-key=Service contribution (to service '%s') conflicts with existing contribution (by %s).
+contribution-duplicate-key=Service contribution (to service '%s') for key '%s' conflicts with existing contribution (by %s).
 generic-type-not-supported=Generic type '%s' is not supported. Only simple parameterized lists are \
   supported.
 error-building-service=Error building service proxy for service '%s' (at %s): %s

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/9b5e1903/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
----------------------------------------------------------------------
diff --git a/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy b/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
index 60241a7..2bc5816 100644
--- a/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
+++ b/tapestry-ioc/src/test/groovy/ioc/specs/ValidatingMappedConfigurationWrapperSpec.groovy
@@ -97,7 +97,7 @@ class ValidatingMappedConfigurationWrapperSpec extends AbstractSharedRegistrySpe
 
     IllegalArgumentException e = thrown()
 
-    e.message.contains "Service contribution (to service 'Baz') conflicts with existing contribution"
+    e.message.contains "Service contribution (to service 'Baz') for key 'class java.lang.Integer' conflicts with existing contribution"
 
     keyToContribution[Integer].is(def1)
     map.isEmpty()