polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: Test Error found...
Date Fri, 10 Jul 2015 13:56:24 GMT
So, the question is; SHOULD a AmbiguousTypeException be thrown when one is
asking for a @Service injection of a composite type or ServiceReference<T>?

And I am pretty sure the exact same code is called if one calls
ServiceFinder.findService(), and that would also throw the
AmbiguousTypeException.


Cheers
Niclas

On Fri, Jul 10, 2015 at 4:53 PM, Niclas Hedhman <niclas@hedhman.org> wrote:

> 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 <niclas@hedhman.org>
> wrote:
>
>> 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 <paul@nosphere.org> wrote:
>>
>>> 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<ValueSerialization> inject;
>>>
>>> /Paul
>>>
>>> Niclas Hedhman a écrit :
>>> > 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 <niclas@hedhman.org>
>>> wrote:
>>> >
>>> >> 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 Fri, Jul 10, 2015 at 4:25 PM, Niclas Hedhman <niclas@hedhman.org>
>>> >> wrote:
>>> >>
>>> >>> 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 breakpoint, look at the this.valueSerialization member.
It
>>> has
>>> >>> a ServiceComposite reference to the OrgJsonValueSerializationService,
>>> >>> not the Jackson one.
>>> >>>
>>> >>>
>>> >>> I am trying to figure out how this is at all possible.
>>> >>>
>>> >>>
>>> >>> Cheers
>>> >>> --
>>> >>> Niclas Hedhman, Software Developer
>>> >>> http://zest.apache.org - New Energy for Java
>>> >>>
>>> >> --
>>> >> Niclas Hedhman, Software Developer
>>> >> http://zest.apache.org - New Energy for Java
>>> >>
>>> >
>>> >
>>> >
>>>
>>
>>
>>
>> --
>> Niclas Hedhman, Software Developer
>> http://zest.apache.org - New Energy for Java
>>
>
>
>
> --
> Niclas Hedhman, Software Developer
> http://zest.apache.org - New Energy for Java
>



-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message