Re: Kxml: (no subject)
Aleksander Slominski <[email protected]> Sat, 15 Nov 2003 01:04:21 -0500
| Newsgroups | gmane.text.xml.xmlpull.devel,gmane.comp.java.enhydra.kxml |
|---|---|
| Message-ID | <[email protected]> |
Stefan Haustein wrote: > [email protected] wrote: > >> i've downloaded your version 2.1.7, because you compiled 2.1.8 with >> the wrong version. >> After initializing the pullparserfactory, my jre throws a error. > hi Siegfried, what is exactly the error? >> So i decided to decompile >> your class files with jad. (hope that is no problem for you ;-)) >> I've removed your gotos, i think that were once labels....? > >> I've added the java file of PullParserFactory. you will see my changes. > > > which kind of JRE are you using? the gotos appearing in the decompiled > code are probably resulting from break statements.... The original > source of the Factory is availabel at xmlpull.org. > what is relevant part of the code i looked on it but i could fnd find any break/continue in code that does jump to LABEL, the only bbreak is: public static XmlPullParserFactory newInstance (String classNames, Class context) throws XmlPullParserException { if (context == null) { //NOTE: make sure context uses the same class loader as API classes // 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; if (classNames == null || classNames.length() == 0 || "DEFAULT".equals(classNames)) { try { InputStream is = context.getResourceAsStream (RESOURCE_NAME); if (is == null) throw new XmlPullParserException ("resource not found: "+RESOURCE_NAME +" make sure that parser implementing XmlPull API is available"); final StringBuffer sb = new StringBuffer(); while (true) { final int ch = is.read(); if (ch < 0) break; else if (ch > ' ') sb.append((char) ch); } is.close (); classNames = sb.toString (); } catch (Exception e) { throw new XmlPullParserException (null, null, e); } classNamesLocation = "resource "+RESOURCE_NAME+" that contained '"+classNames+"'"; } else { classNamesLocation = "parameter classNames to newInstance() that contained '"+classNames+"'"; and i would expect it to work fine in any JVM?! so i wonder where "goto" happened? see source code for more details: http://www.xmlpull.org/viewcvs/~checkout~/xmlpull-api-v1/src/java/api/org/xmlpull/v1/XmlPullParserFactory.java we would like to get this fixed but i guess we need more info (i did not get this java source file you sent?!). thanks, alek -- The best way to predict the future is to invent it - Alan Kay ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/