Ah, so the testcase around all of this is listing a usecase like;
public interface MyService
public interface MyService2 extends MyService
That both MyService and MyService can be injected with their primary type.
TypeLookup would need to better understand type hierarchies, but I suspect
th
That was quick... single() also throw IllegalArgumentException on zero
results. I added a atMostOne() method in Iterables. All this will be
re-written in 3.0 and use Java 8 Function+Stream API.
On Fri, Jul 10, 2015 at 5:09 PM, Niclas Hedhman wrote:
> I am introducing a small fix (use single() in
I am introducing a small fix (use single() instead of first(), catch
IllegalArgumentException and rethrow a AmbiguousTypeException), and the
output is
org.qi4j.api.composite.AmbiguousTypeException: More than one model matches
the classname
org.qi4j.api.value.ValueSerialization:[OrgJsonValueSeriali
So, the question is; SHOULD a AmbiguousTypeException be thrown when one is
asking for a @Service injection of a composite type or ServiceReference?
And I am pretty sure the exact same code is called if one calls
ServiceFinder.findService(), and that would also throw the
AmbiguousTypeException.
C
And it is not done there... It takes, and instantiates, the first one. Line
378 in TypeLookup
On Fri, Jul 10, 2015 at 4:50 PM, Niclas Hedhman wrote:
> The findService() (single instance) should be checking ambiguity, where as
> findServices() shouldn't. I am looking into that at the moment.
>
>
The findService() (single instance) should be checking ambiguity, where as
findServices() shouldn't. I am looking into that at the moment.
On Fri, Jul 10, 2015 at 4:45 PM, Paul Merlin wrote:
> Good catch Niclas.
>
> No AmbiguousTypeException should be expected though.
>
> There is two services r
Good catch Niclas.
No AmbiguousTypeException should be expected though.
There is two services registered for the ValueSerialization type with !=
identities, possibly different qualifiers etc... there's no type
ambiguity with multiple services of the same type.
Think @Service Iterable inject;
/P
EntityTestAssembler is the answer... which is invoked in the
AbstractValueCompositeSerializationTest.
I'll resolve that. Sorry for the noise.
On Fri, Jul 10, 2015 at 4:31 PM, Niclas Hedhman wrote:
> So, the Module contains TWO ValueSerialization systems, both the OrgJson
> and the Jackson ones.
So, the Module contains TWO ValueSerialization systems, both the OrgJson
and the Jackson ones.
That should then raise the question, Why don't we get
AmbigiousTypeException??
There are also a MemoryEntityStore and a UuidIdentityGenerator in the
Module Where are those coming from?
Cheers
On
I think I have found a Testcase problem, while trying to improve the
ValueSerialization subsystem.
To show what I mean;
a. Put a breakpoint on the first line in the only(!) test in
AbstractValueCompositeSerializationTest
b. Run the JacksonValueCompositeSerializationTest.
c. At breakpoi
10 matches
Mail list logo