You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by ce...@apache.org on 2005/03/14 16:47:30 UTC
svn commit: r157430 - in
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl:
schema/SchemaTypeSystemImpl.java validator/ValidatingInfoXMLStreamReader.java
Author: cezar
Date: Mon Mar 14 07:47:25 2005
New Revision: 157430
URL: http://svn.apache.org/viewcvs?view=rev&rev=157430
Log:
Fix for XMLBeans build in Maven, fix in ValidatingInfoXMLStreamReader.
Modified:
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java
xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/validator/ValidatingInfoXMLStreamReader.java
Modified: xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java?view=diff&r1=157429&r2=157430
==============================================================================
--- xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java (original)
+++ xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/schema/SchemaTypeSystemImpl.java Mon Mar 14 07:47:25 2005
@@ -147,15 +147,24 @@
* repackage process scomp needs to load from old package and generate into
* a new package.
*/
- public static String METADATA_PACKAGE_GEN = (
+ public static String METADATA_PACKAGE_GEN;
+ static
+ {
+ // fix for maven classloader
+ Package stsPackage = SchemaTypeSystem.class.getPackage();
+ String stsPackageName = (stsPackage==null) ?
+ SchemaTypeSystem.class.getName().substring(0, SchemaTypeSystem.class.getName().lastIndexOf(".")) :
+ stsPackage.getName();
+
+ METADATA_PACKAGE_GEN = (
// next line should use String addition to avoid replacement by Repackager: "org." + "apache." + "xmlbeans"
- ("org." + "apache." + "xmlbeans").equals(SchemaTypeSystem.class.getPackage().getName()) ?
+ ("org." + "apache." + "xmlbeans").equals(stsPackageName) ?
// This is the original org apache xmlbeans package, to maintain backwards compatibility resource pathes must remain the same
"" :
// This is the private package XMLBeans, all the metadata will end up in a specific/private resource path
- SchemaTypeSystem.class.getPackage().getName().replaceAll("\\.", "_")
+ stsPackageName.replaceAll("\\.", "_")
);
-
+ }
private static String nameToPathString(String nameForSystem)
{
Modified: xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/validator/ValidatingInfoXMLStreamReader.java
URL: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/validator/ValidatingInfoXMLStreamReader.java?view=diff&r1=157429&r2=157430
==============================================================================
--- xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/validator/ValidatingInfoXMLStreamReader.java (original)
+++ xmlbeans/trunk/src/typeimpl/org/apache/xmlbeans/impl/validator/ValidatingInfoXMLStreamReader.java Mon Mar 14 07:47:25 2005
@@ -79,7 +79,7 @@
*/
public SchemaType getCurrentElementSchemaType()
{
- return _validator.getCurrentElementSchemaType();
+ return _validator==null ? null : _validator.getCurrentElementSchemaType();
}
/**
@@ -87,7 +87,7 @@
*/
public SchemaLocalElement getCurrentElement ( )
{
- return _validator.getCurrentElement();
+ return _validator==null ? null : _validator.getCurrentElement();
}
/**
@@ -97,7 +97,7 @@
*/
public SchemaParticle getCurrentWildcardElement()
{
- return _validator.getCurrentWildcardElement();
+ return _validator==null ? null : _validator.getCurrentWildcardElement();
}
/**
@@ -106,7 +106,7 @@
*/
public SchemaLocalAttribute getCurrentAttribute()
{
- return _validator.getCurrentAttribute();
+ return _validator==null ? null : _validator.getCurrentAttribute();
}
/**
@@ -114,66 +114,66 @@
*/
public SchemaAttributeModel getCurrentWildcardAttribute()
{
- return _validator.getCurrentWildcardAttribute();
+ return _validator==null ? null : _validator.getCurrentWildcardAttribute();
}
public String getStringValue()
{
- return _validator.getStringValue();
+ return _validator==null ? null : _validator.getStringValue();
}
public BigDecimal getDecimalValue()
{
- return _validator.getDecimalValue();
+ return _validator==null ? null : _validator.getDecimalValue();
}
public boolean getBooleanValue()
{
- return _validator.getBooleanValue();
+ return _validator==null ? false : _validator.getBooleanValue();
}
public float getFloatValue()
{
- return _validator.getFloatValue();
+ return _validator==null ? 0 : _validator.getFloatValue();
}
public double getDoubleValue()
{
- return _validator.getDoubleValue();
+ return _validator==null ? 0 : _validator.getDoubleValue();
}
public QName getQNameValue()
{
- return _validator.getQNameValue();
+ return _validator==null ? null : _validator.getQNameValue();
}
public GDate getGDateValue()
{
- return _validator.getGDateValue();
+ return _validator==null ? null : _validator.getGDateValue();
}
public GDuration getGDurationValue()
{
- return _validator.getGDurationValue();
+ return _validator==null ? null : _validator.getGDurationValue();
}
public byte[] getByteArrayValue()
{
- return _validator.getByteArrayValue();
+ return _validator==null ? null : _validator.getByteArrayValue();
}
public List getListValue()
{
- return _validator.getListValue();
+ return _validator==null ? null : _validator.getListValue();
}
public List getListTypes()
{
- return _validator.getListTypes();
+ return _validator==null ? null : _validator.getListTypes();
}
public SchemaType getUnionType()
{
- return _validator.getUnionType();
+ return _validator==null ? null : _validator.getUnionType();
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org