Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.1.0
-
None
Description
In org.apache.pluto.core.ContainerInvocation:
private static final InheritableThreadLocal CONTAINERS =
new InheritableThreadLocal();
...
public static void clearInvocation()
The remove() method was added to InheritableThreadLocal in 1.5. I've attached a unit test, that when compiled with 1.5 with -target set to 1.4, fails when run on a 1.4 JVM.
Unit test compiled with a Java 1.5 javac with -target 1.4
Unit test run with a Java 1.4 java:
There was 1 error:
1) testClearInvocation(org.apache.pluto.core.ContainerInvocationTest)java.lang.NoSuchMethodError: java.lang.ThreadLocal.remove()V
at org.apache.pluto.core.ContainerInvocation.clearInvocation(ContainerInvocation.java:64)
at org.apache.pluto.core.ContainerInvocationTest.testClearInvocation(ContainerInvocationTest.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
FAILURES!!!
Tests run: 2, Failures: 0, Errors: 1