Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-313

o.a.p.core.ContainerInvocation.clearInvocation() requires 1.5

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.0
    • 1.1.1
    • portlet container
    • None

    Description

      In org.apache.pluto.core.ContainerInvocation:

      private static final InheritableThreadLocal CONTAINERS =
      new InheritableThreadLocal();
      ...
      public static void clearInvocation()

      { CONTAINERS.remove(); }

      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

      Attachments

        1. ContainerInvocationTest.java
          0.6 kB
          Elliot Metsger

        Activity

          People

            emetsger Elliot Metsger
            emetsger Elliot Metsger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: