You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ra...@apache.org on 2006/05/19 23:54:08 UTC
svn commit: r407918 - in
/xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema:
SchemaPropertyImpl.java SchemaTypeImpl.java
Author: radup
Date: Fri May 19 14:54:07 2006
New Revision: 407918
URL: http://svn.apache.org/viewvc?rev=407918&view=rev
Log:
Backport two fixes from V2 into V1.
Modified:
xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaPropertyImpl.java
xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
Modified: xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaPropertyImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaPropertyImpl.java?rev=407918&r1=407917&r2=407918&view=diff
==============================================================================
--- xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaPropertyImpl.java (original)
+++ xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaPropertyImpl.java Fri May 19 14:54:07 2006
@@ -95,7 +95,7 @@
{ mutate(); _typeref = typeref; }
public SchemaType javaBasedOnType()
- { return _javaBasedOnTypeRef.get(); }
+ { return _javaBasedOnTypeRef == null ? null : _javaBasedOnTypeRef.get(); }
public boolean extendsJavaSingleton()
{ return _extendsSingleton; }
Modified: xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java
URL: http://svn.apache.org/viewvc/xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java?rev=407918&r1=407917&r2=407918&view=diff
==============================================================================
--- xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java (original)
+++ xmlbeans/branches/1.x/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeImpl.java Fri May 19 14:54:07 2006
@@ -1914,6 +1914,14 @@
if (isNoType())
return false;
+ if (getSimpleVariety() == UNION)
+ {
+ SchemaType[] members = getUnionMemberTypes();
+ for (int i = 0; i < members.length; i++)
+ if (members[i].isAssignableFrom(type))
+ return true;
+ }
+
int depth = ((SchemaTypeImpl)type).getBaseDepth() - getBaseDepth();
if (depth < 0)
return false;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org