This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.testing.osgi-mock-1.4.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git
commit 9b26d4c4619ba739ac35c46628c1dd1a97e9d352 Author: Robert Munteanu <[email protected]> AuthorDate: Tue Jun 9 15:29:45 2015 +0000 OsgiServiceUtil: clarify exception message when no matching references were found git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1684446 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java b/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java index 82c722c..2c427e5 100644 --- a/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java +++ b/src/main/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtil.java @@ -310,7 +310,7 @@ final class OsgiServiceUtil { boolean isOptional = (reference.getCardinality() == ReferenceCardinality.OPTIONAL_UNARY || reference .getCardinality() == ReferenceCardinality.OPTIONAL_MULTIPLE); if (!isOptional) { - throw new ReferenceViolationException("Unable to inject mandatory reference '" + reference.getName() + "' for class " + targetClass.getName()); + throw new ReferenceViolationException("Unable to inject mandatory reference '" + reference.getName() + "' for class " + targetClass.getName() + " : no matching services were found."); } } -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
