CVS Update: xmlpull-api-v1/src/java/api/org/xmlpull/v1
Aleksander Andrzej Slominski <[email protected]> Tue, 4 Mar 2003 14:02:39 -0500 (EST)
| Newsgroups | gmane.text.xml.xmlpull.devel |
|---|---|
| Message-ID | <[email protected]> |
aslom 03/03/04 14:02:39
Modified: src/java/api/org/xmlpull/v1 XmlPullParserFactory.java
Log:
more descriptive names, refactored default context class to be created only once and kept in static field
Revision Changes Path
1.22 +6 -5 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.21
retrieving revision 1.22
diff -u -b -t -w -r1.21 -r1.22
--- XmlPullParserFactory.java 4 Mar 2003 17:58:24 -0000 1.21
+++ XmlPullParserFactory.java 4 Mar 2003 19:02:39 -0000 1.22
@@ -33,6 +33,8 @@
*/
public class XmlPullParserFactory {
+ /** used as default class to server as context class in newInstance() */
+ static XmlPullParserFactory referenceContextClass = new XmlPullParserFactory();
/** Name of the system or midlet property that should be used for
a system property containing a comma separated list of factory
@@ -252,15 +254,14 @@
return newInstance(null, null);
}
-
-
public static XmlPullParserFactory newInstance (String classNames, Class context)
throws XmlPullParserException {
if (context == null) {
- //make sure context uses the smae class loader as API classes
- XmlPullParserFactory f = new XmlPullParserFactory();
- context = f.getClass ();
+ //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 ();
}
String classNamesLocation = null;
------------------------ Yahoo! Groups Sponsor ---------------------~-->
New Yahoo! Mail Plus. More flexibility. More control. More power.
Get POP access, more storage, more filters, and more.
http://us.click.yahoo.com/Hcb0iA/P.iFAA/46VHAA/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/