[json-lib-user] 1.5 API within jdk1.3 version, generating "no such method" error
Brought to you by:
aalmiray
From: Masaru T. <mas...@gm...> - 2011-08-01 09:23:31
|
Hello Json-lib group member, I searched a little for any similar post to this but in vain. Sorry if my search was not sufficient and this post is redundant. Using json-lib-2.4-jdk13.jar, I encountered an error, running an application on JVM 1.4. I tracked down in the source and now am able to point out where (net.sf.json.AbstractJSON.removeInstance(Object)) an Java 1.5 API used in this library. The java.lang.ThreadLocal.remove() is a method available only since 1.5. Though it is used in the above mentioned method. Can anyone confirm me if my following correction is functionnally OK? abstract class AbstractJSON { private static class CycleSet extends ThreadLocal { // ... add the following method public void remove() { set(initialValue()); } } // ... I wonder if you manage to compile the jdk1.3 version library without any compilation error? Best regards, Masaru |