xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Katzman, Anatoly" <Anatoly_Katz...@bmc.com>
Subject RE: XMLBeans and JDK 1.3
Date Thu, 18 Dec 2003 10:35:39 GMT
Here is my list of problems (just run javac 1.3 against the XMLBeans
source). I will be glad to get your corrections and suggestions.

assert
	- solution: 
		-- instead of native 1.4's assert, use a class like
utils.Assert with static method 
		assertTrue( boolean expression) that throws
utils.AssertError in case the expression evaluates to false
		-- nice to have: ability to disable Assertions with a
property or configuration file
		-- replace 1.4's native asserts by Assert.assertTrue() calls
	- questions:
		-- org.apache.commons.lang.Validate looks like one that can
do the job; other suggestions?

nested exceptions
	org.apache.commons.lang.exception seems to be the answer

import java.net.URI; 
	- functionality required:
		-- construction from a raw string
		-- URI.isAbsolute()
		-- from java.io.File to URI and back
		-- from java.net.URL to URI and back
		-- URI.relative(), URI.resolve(), URI.relativize()
		-- URI.getScheme, getPath, getFragment, getQuery, getRawPath
		-- URI.equal, toString
	- may be used as an incomplete substitutes: 
		-- org.apache.xml.utils.URI
		-- org.apache.axis.types.URI
		-- org.apache.xerces.utils.URI

import java.net.URISyntaxException;
	- will disappear as we get rid of URI

import java.nio.channels.FileChannel;
	- in XMLBeans, is used for copying files; 
	may be replaced by transferring bytes between two Streams - possibly
at the expense of performance

java.nio.charset.Charset;
	- as it is used in XMLBeans, is easily replaced by encoding name
String

java.util.regex.*;
	- Jakarta provides two solutions for Regular Expression Evaluation:
ORO and RegExp
	Pattern languages compatibility is the name of the game here.

java.util.LinkedHashMap;
	org.apache.commons.collections.SequencedHashMap
java.util.LinkedHashSet;
	no idea, any suggestions?
java.util.IdentityHashMap;
	- anyone knows a Jakarta counterpart for IdentityHashMap?
	- if does not exist, the Sun's code of java.util.IdentityHashMap
could be copied and re-used. 
	Does Sun license permits such a use?
	- in case the Sun license prohibits re-using of JDK 1.4 sources in a
Jakarta project, 
	I can reproduce the "map-by-reference" functionality by my own
Map-derived class

java.lang.CharSequence
	- since 1.4 classes String and StringBuffer both inherit from
java.lang.CharSequence
	- solution: duplicate all XMLBeans' public methods that take
CharSequence: for String and for StringBuffer; 
	XMLBeans uses no other CharSequence derivatives

StringBuffer.lastIndexOf()
	- use String.lastIndexOf() instead

String.split()
	- XMLBeans don't invoke this method with complicated regular
expressions, so we can use StringTokenizer instead

URLConnection.addRequestProperty()
	- XMLBeans uses it to set HTTP request properties; so we can use
HttpURLConnection.addRequestProperty() instead

Again, some points might be missing here, please correct me if so.

Regards,

Anatoly Katzman	






-----Original Message-----
From: Patrick Calahan [mailto:pcal@bea.com]
Sent: Thursday, December 18, 2003 9:42 AM
To: xmlbeans-dev@xml.apache.org; xmlbeans-user@xml.apache.org;
xmlbeans-dev@xml.apache.org
Subject: RE: XMLBeans and JDK 1.3


Yeah, would be nice, but if we're serious about supporting 1.3, we have to 
make the call now.   I know I already have a few small 1.4 dependencies (on 
java.util.logging).  Those would be easy enough to rip out, but some other 
considerations include:

- Losing built-in exception chaining will be a little painful
- I believe LinkedHashMap was new in 1.4, and I think I've seen it used in 
a few places
- probably others, can't think of any right now

We can certainly roll our own solutions for these kinds of things, but 
that's something that's always a lot easier to do sooner than later.  Also, 
if we want to do 1.3, we should set up a monkey to run the tests against 
the xbean binaries on 1.3, so that we can find out immediately when we 
introduce a 1.4 dependency.

-p


At 11:11 PM 12/17/2003 -0800, David Remy wrote:
>yes, i agree, i think it would be very valuable.
>
> > -----Original Message-----
> > From: Katzman, Anatoly [mailto:Anatoly_Katzman@bmc.com]
> > Sent: Wednesday, December 17, 2003 6:34 AM
> > To: xmlbeans-dev@xml.apache.org; xmlbeans-user@xml.apache.org
> > Subject: XMLBeans and JDK 1.3
> >
> >
> > I would like to use XMLBeans in a product that is required to
> > run with JDK
> > 1.3 (while XMLBeans is initially based on 1.4)
> > Is there any activity for porting XMLBeans to 1.3 ?
> > Does anyone think it would be a valuable contribution to the
> > project to
> > "downgrade" the JDK dependency of XMLBeans?
> >
> >
> >
> > -
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> > Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
> >
> >
>
>- ---------------------------------------------------------------------
>To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
>Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message