jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1762) Improvement to MultiValueCollectionConverterImpl to Map collections with element class Object.class
Date Sun, 28 Sep 2008 14:27:44 GMT

    [ https://issues.apache.org/jira/browse/JCR-1762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635225#action_12635225
] 

Christophe Lombart commented on JCR-1762:
-----------------------------------------

Now it works on my machine with the updated patch - thanks
I have reviewed your patch and I'm wondering why you have modified the class AbstractMapperImpl
with that change : 
@@ -198,7 +200,7 @@
    public ClassDescriptor getClassDescriptorByClass(Class clazz) {
 	   ClassDescriptor descriptor = mappingDescriptor.getClassDescriptorByName(clazz.getName());
 	   if (descriptor==null) {
-			throw new IncorrectPersistentClassException("Class of type: " + clazz.getName() + " has
no descriptor.");
+			//throw new IncorrectPersistentClassException("Class of type: " + clazz.getName() + "
has no descriptor.");
 	   }
        return descriptor ;
    }

If we keep the old code, your patch is still working. 


> Improvement to MultiValueCollectionConverterImpl to Map collections with element class
Object.class
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1762
>                 URL: https://issues.apache.org/jira/browse/JCR-1762
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-ocm
>    Affects Versions: 1.5
>         Environment: Java 5 and Up
>            Reporter: Boni Gopalan
>            Assignee: Christophe Lombart
>            Priority: Minor
>         Attachments: JCR-1762-updated.patch, JCR-1762.patch, testresults.txt
>
>   Original Estimate: 3h
>  Remaining Estimate: 3h
>
> Currently MultiValueCollectionConverterImpl  does not support elements of type Object.class.
 The type of the contained class has to be specified either through the mapping file or through
the Bean annotation.  Even with that flexibility Object.class is specifically excluded (For
good reasons.).  
> My view is that by definition MultiValueCollectionConverterImpl   should make a best
effort to convert and that best effort should include using Undefined UndefinedTypeConverterImpl
to convert an object when all the other conversion strategies run out.  To this resolve I
have patched the OCM source.  I have test cases also.  I will upload the patch files right
after.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message