You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by gn...@apache.org on 2009/05/19 17:12:15 UTC
svn commit: r776351 -
/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java
Author: gnodet
Date: Tue May 19 15:12:15 2009
New Revision: 776351
URL: http://svn.apache.org/viewvc?rev=776351&view=rev
Log:
Minor change so that creating new lists for injection will be easier
Modified:
geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java
Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java?rev=776351&r1=776350&r2=776351&view=diff
==============================================================================
--- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java (original)
+++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/CollectionBasedServiceReferenceRecipe.java Tue May 19 15:12:15 2009
@@ -280,12 +280,15 @@
if (references == null) {
references = useRef != null ? useRef : false;
LOGGER.debug("ManagedCollection references={}", references);
- } else if (useRef != null && references.booleanValue() != useRef.booleanValue()) {
- throw new ComponentDefinitionException("The same <ref-list/> or <ref-set/> can not be " +
- "injected as Collection<ServiceReference> and Collection<NotServiceReference> at the same time");
+ return this;
+ } else if (useRef == null || references.booleanValue() == useRef.booleanValue()) {
+ return this;
}
- return this;
+ // TODO: create a new collectio if needed?
+ throw new ComponentDefinitionException("The same <ref-list/> or <ref-set/> can not be " +
+ "injected as Collection<ServiceReference> and Collection<NotServiceReference> at the same time");
} else {
+ // TODO: create a new collectio if needed?
throw new ComponentDefinitionException("Unsupported conversion to " + type);
}
}