Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Fix (un)marshal bug #1135 #1155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import java.lang.reflect.InvocationTargetException;
import java.util.Collection;

import com.sun.xml.bind.v2.model.core.ClassInfo;
import com.sun.xml.bind.v2.model.core.ID;
import com.sun.xml.bind.v2.model.core.PropertyKind;
import com.sun.xml.bind.v2.model.runtime.RuntimeAttributePropertyInfo;
Expand Down Expand Up @@ -152,6 +153,9 @@ static boolean isLeaf(RuntimePropertyInfo info) {
RuntimeTypeInfo rti = types.iterator().next();
if(!(rti instanceof RuntimeNonElement)) return false;

//if hasSubClasses it's not a leaf and we can't optimize, see #1135
if (rti instanceof ClassInfo && ((ClassInfo) rti).hasSubClasses()) return false;

if(info.id()==ID.IDREF)
// IDREF is always handled as leaf -- Transducer maps IDREF String back to an object
return true;
Expand Down