CVS Update: xmlpull-api-v1/src/java/api/org/xmlpull/v1
Aleksander Andrzej Slominski <[email protected]> Tue, 4 Mar 2003 14:05:31 -0500 (EST)
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
aslom 03/03/04 14:05:31
Modified: src/java/api/org/xmlpull/v1 XmlPullParserFactory.java
Log:
removed need to keep instance of factory but instead just retain its Class
Revision Changes Path
1.23 +9 -4 xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParserFactory.java
Index: XmlPullParserFactory.java
===================================================================
RCS file: /l/extreme/cvspub/xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParserFactory.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -t -w -r1.22 -r1.23
--- XmlPullParserFactory.java 4 Mar 2003 19:02:39 -0000 1.22
+++ XmlPullParserFactory.java 4 Mar 2003 19:05:31 -0000 1.23
@@ -34,7 +34,12 @@
public class XmlPullParserFactory {
/** used as default class to server as context class in newInstance() */
- static XmlPullParserFactory referenceContextClass = new XmlPullParserFactory();
+ final static Class referenceContextClass;
+
+ static {
+ XmlPullParserFactory f = new XmlPullParserFactory();
+ referenceContextClass = f.getClass();
+ }
/** Name of the system or midlet property that should be used for
a system property containing a comma separated list of factory
@@ -259,9 +264,9 @@
if (context == null) {
//NOTE: make sure context uses the same class loader as API classes
- // this is the best we can do and if API is in the same clasloader
- // as implementation then this will work succesfully
- context = referenceContextClass.getClass ();
+ // this is the best we can do without having access to context classloader in J2ME
+ // if API is in the same clasloader as implementation then this will work
+ context = referenceContextClass;
}
String classNamesLocation = null;
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/LIgTpC/vN2EAA/xGHJAA/2U_rlB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/