Skip to content

Commit

Permalink
issue-1146: AnyAttribute is now generated in case of inheritance (ecl…
Browse files Browse the repository at this point in the history
…ipse-ee4j#1356)

Signed-off-by: Rémy Cosne <[email protected]>
  • Loading branch information
rcosne authored and lukasj committed Oct 15, 2019
1 parent 68edda4 commit 9956d06
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import com.sun.tools.xjc.reader.xmlschema.bindinfo.BIFactoryMethod;
import com.sun.xml.bind.v2.model.core.ClassInfo;
import com.sun.xml.bind.v2.model.core.Element;
import com.sun.xml.xsom.ForeignAttributes;
import com.sun.xml.xsom.XSComponent;

import org.xml.sax.Locator;
Expand Down Expand Up @@ -188,9 +189,12 @@ public boolean declaresAttributeWildcard() {
public boolean inheritsAttributeWildcard() {
if (getRefBaseClass() != null) {
CClassRef cref = (CClassRef)baseClass;
if (cref.getSchemaComponent().getForeignAttributes().size() > 0) {
return true;
}

for(ForeignAttributes foreignAttributes: cref.getSchemaComponent().getForeignAttributes()) {
if(foreignAttributes.getLength() > 0) {
return true;
}
}
} else {
for( CClassInfo c=getBaseClass(); c!=null; c=c.getBaseClass() ) {
if(c.hasAttributeWildcard)
Expand Down

0 comments on commit 9956d06

Please sign in to comment.