Well, since you cast to ValueComposite on the second line of
ValueCompositeType.toJSON(), I don't see much choices... sounds like the
previous version is better?

BTW, it may be a good idea to add an Interface extending Serializable
property in your test suite in order to increase test coverage (point me to
the right test case and I'll do it)

phil

P.S. currently investigating funny race conditions in entity instances
creation in version 7... I'll check if disappeared in V8



Rickard Öberg-3 wrote:
> 
> phil vd wrote:
>> Yes, I spent the weekend upgrading to 0.8 (and Git) and the problem is
>> still
>> there.
>> When you use an interface extending Serializable as a Property it fails
>> to
>> go to 'valueType = new SerializableType( nameOf( type ) )' in
>> ValueType.newValueType() because of the
>> ValueCompositeType.isValueComposite() test
> <snip>
> 
> Duh, yeah, you're right. Now I get it.
> 
> Ok, so what to do? Change so that isValueComposite() checks the more 
> specific ValueComposite.class.isAssignableOf(type) and then let cases 
> where a non-ValueComposite type is used be caught by SerializableType?
> 
> /Rickard
> 
>> 
>> The current code is : 
>> 
>>  public static boolean isValueComposite( Type type )
>>     {
>>      return type instanceof Class && ( (Class) type ).isInterface(); <--
>> catching all interfaces
>>     }
>> 
>> And the previous one (weeks ago):
>> 
>>  public static boolean isValueComposite( Type type )
>>     {
>>      return type instanceof Class &&   
>>      ValueComposite.class.isAssignableFrom( (Class) type ); <-- catching
>> anything assignable to ValueComposite
>>     }
>> 
>> Am I lost or am I lost ?
>> 
>> Philippe
>> 
>> 
>> Rickard Öberg-3 wrote:
>>> philippe van dyck wrote:
>>>> BTW, could be related to http://issues.ops4j.org/browse/QI-181
>>> Are you still having problems with this? I am using properties with 
>>> serializable types and it's working, so I don't really understand your 
>>> problem. Can you give us more specifics?
>>>
>>> /Rickard
>>>
>>> _______________________________________________
>>> qi4j-dev mailing list
>>> [email protected]
>>> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
>>>
>>>
>> 
> 
> 
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Value-%21%3D-Serializable-Interface-tp23255086p23365915.html
Sent from the Qi4j-dev mailing list archive at Nabble.com.


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to