Hello Dev list,

I have a question about the open source process: I've been using open source 
for quite a while, but this is my first time contributing.

I've found a bug in JackRabbit core and I have a fix (details below).  I 
believe the proper thing for me to do is open a JIRA issue with all the 
information and the patch.  Is this the correct thing to do?

Thanks
Morrell


Bug details:

Workspace.copy(String srcAbsPath, String destAbsPath): when copying properties 
whose type is WeakReferenece, the duplicated property has a property type of 
Reference

Fix:
BatchedItemOperations.copy(Path srcPath,
                       ItemStateManager srcStateMgr,
                       HierarchyManager srcHierMgr,
                       AccessManager srcAccessMgr,
                       Path destPath,
                       int flag)
{
…
               NodeId adjusted = refTracker.getMappedId(values[i].getNodeId());
                if (adjusted != null) {
                    newVals[i] = InternalValue.create(adjusted,prop.getType() 
== PropertyType.WEAKREFERENCE);
                    modified = true;
                } else {
                    // reference doesn't need adjusting, just copy old value
                    newVals[i] = values[i];
                }
…
}


Reply via email to