Menu

#9 Fix for thread safety in REST xml parser 1799560

open
nobody
None
5
2008-02-27
2008-02-27
No

As stated in XXX
https://sourceforge.net/tracker/index.php?func=detail&aid=1799560&group_id=131157&atid=721510
the REST class relies on a non-thread safe xml dom parser by default.
The patch puts the parser in a thread-local, which solves the problem.

Patch based on 1.22 of REST.java
http://flickrj.cvs.sourceforge.net/\*checkout*/flickrj/api/src/com/aetrion/flickr/REST.java?revision=1.22

Discussion

  • Hugo Hallman

    Hugo Hallman - 2008-02-27

    Patch file for rev 1.22 of REST.java

     
  • Hugo Hallman

    Hugo Hallman - 2008-02-27

    REST.java 122 fixed

     
  • Hugo Hallman

    Hugo Hallman - 2008-02-27

    Logged In: YES
    user_id=715042
    Originator: YES

    Here's a drop-in replacement for 1.22 which is used in release 1.0
    File Added: REST122b.java

     
  • Nobody/Anonymous

    Logged In: NO

    Why bother caching the parser at all? Does it make a measurable speed difference? Keep it simple unless you know it makes a difference.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.