jochen 2005/05/18 15:20:56
Modified: src/xs/org/apache/ws/jaxme/xs/junit Tag: v0_4
ParserTest.java
src/js/org/apache/ws/jaxme/js Tag: v0_4 JavaQNameImpl.java
src/xs/org/apache/ws/jaxme/xs/impl Tag: v0_4 XSTypeImpl.java
Log:
Reverted Mac's bug fix in JavaQNameImpl, because it triggered another bug,
which needs larger code changes to fix and the conservative behaviour to accept
the minor bug seems to be appropriate for the maintenance branch.
Revision Changes Path
No revision
No revision
1.20.2.3 +1 -0
ws-jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java
Index: ParserTest.java
===================================================================
RCS file:
/home/cvs/ws-jaxme/src/xs/org/apache/ws/jaxme/xs/junit/ParserTest.java,v
retrieving revision 1.20.2.2
retrieving revision 1.20.2.3
diff -u -r1.20.2.2 -r1.20.2.3
--- ParserTest.java 27 Apr 2005 19:43:11 -0000 1.20.2.2
+++ ParserTest.java 18 May 2005 22:20:56 -0000 1.20.2.3
@@ -895,6 +895,7 @@
XSAttributable[] aAttributes = aComplexType.getAttributes();
assertEquals(1, aAttributes.length);
XSAttribute aa1 = (XSAttribute) aAttributes[0];
+ assertEquals(new XsQName((String) null, "aa1"), aa1.getName());
XSType b = types[1];
assertEquals(new XsQName((String) null, "b"), b.getName());
No revision
No revision
1.3.2.2 +1 -1 ws-jaxme/src/js/org/apache/ws/jaxme/js/JavaQNameImpl.java
Index: JavaQNameImpl.java
===================================================================
RCS file:
/home/cvs/ws-jaxme/src/js/org/apache/ws/jaxme/js/JavaQNameImpl.java,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- JavaQNameImpl.java 11 May 2005 10:40:19 -0000 1.3.2.1
+++ JavaQNameImpl.java 18 May 2005 22:20:56 -0000 1.3.2.2
@@ -253,7 +253,7 @@
} else {
result = new StandardImpl(pPackageName, pClassName);
}
- names.put(name, result);
+ names.put(result, name);
}
}
return result;
No revision
No revision
1.16.2.1 +13 -8
ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java
Index: XSTypeImpl.java
===================================================================
RCS file:
/home/cvs/ws-jaxme/src/xs/org/apache/ws/jaxme/xs/impl/XSTypeImpl.java,v
retrieving revision 1.16
retrieving revision 1.16.2.1
diff -u -r1.16 -r1.16.2.1
--- XSTypeImpl.java 22 Oct 2004 21:35:06 -0000 1.16
+++ XSTypeImpl.java 18 May 2005 22:20:56 -0000 1.16.2.1
@@ -29,6 +29,7 @@
import org.apache.ws.jaxme.xs.XSSimpleType;
import org.apache.ws.jaxme.xs.XSType;
import org.apache.ws.jaxme.xs.parser.impl.LocSAXException;
+import org.apache.ws.jaxme.xs.types.XSAnyType;
import org.apache.ws.jaxme.xs.xml.*;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
@@ -311,29 +312,33 @@
if (type.isSimple()) {
throw new LocSAXException("Invalid 'extension': The base type " +
base + " is simple.", getLocator());
}
- XSComplexType myComplexType = type.getComplexType();
- if (myComplexType.hasSimpleContent()) {
+ XSComplexType extendedComplexType = type.getComplexType();
+ if (extendedComplexType.hasSimpleContent()) {
throw new LocSAXException("Invalid 'extension': The base type " +
base + " has simple content.",
getLocator());
}
XsTTypeDefParticle particle = extension.getTypeDefParticle();
-
XSGroup group = getGroupByParticle(particle);
XsComplexContentType groupType = getContentTypeByParticle(particle,
group);
if (XsComplexContentType.EMPTY.equals(groupType)) {
- complexContentType = myComplexType.getComplexContentType();
- complexContentParticle = myComplexType.getParticle();
- } else if (myComplexType.isEmpty()) {
+ if (type == XSAnyType.getInstance()) {
+ complexContentType = null;
+ complexContentParticle = null;
+ } else {
+ complexContentType =
extendedComplexType.getComplexContentType();
+ complexContentParticle =
extendedComplexType.getParticle();
+ }
+ } else if (extendedComplexType.isEmpty()) {
complexContentType = groupType;
complexContentParticle = new XSParticleImpl(group);
} else {
- XSGroup sequenceGroup = new ExtensionGroup(pOwner, new
XSParticle[]{myComplexType.getParticle(), new XSParticleImpl(group)});
+ XSGroup sequenceGroup = new ExtensionGroup(pOwner, new
XSParticle[]{extendedComplexType.getParticle(), new XSParticleImpl(group)});
complexContentParticle = new XSParticleImpl(sequenceGroup);
complexContentType = groupType;
}
- XSAttributable[] inheritedAttributes = myComplexType.getAttributes();
+ XSAttributable[] inheritedAttributes =
extendedComplexType.getAttributes();
XSAttributable[] myAttributes =
XSAttributeGroupImpl.getAttributes(XSTypeImpl.this, extension);
attributes = new XSAttributable[inheritedAttributes.length +
myAttributes.length];
System.arraycopy(inheritedAttributes, 0, attributes, 0,
inheritedAttributes.length);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]