ProxyToys
  1. ProxyToys
  2. PTOYS-6

DelegatingInvoker fails calling Object.finalize

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: None
    • Fix Version/s: 0.1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Just got the following stack trace:

      com.thoughtworks.proxy.toys.delegate.DelegationException: Problem invoking protected void java.lang.Object.finalize() throws java.lang.Throwable
      at com.thoughtworks.proxy.toys.delegate.DelegatingInvoker.invokeOnDelegate(DelegatingInvoker.java:113)
      at com.thoughtworks.proxy.toys.delegate.DelegatingInvoker.invoke(DelegatingInvoker.java:84)
      at de.fnogol.swingtools.table.RoutingInvoker.invoke(RoutingInvoker.java:57)
      at de.fnogol.swingtools.table.ExceptionSafeInvoker.invoke(ExceptionSafeInvoker.java:45)
      at com.thoughtworks.proxy.factory.AbstractProxyFactory$CoincidentalInvocationHandlerAdapter.invoke(AbstractProxyFactory.java:47)
      at javax.swing.table.AbstractTableModel$$EnhancerByCGLIB$$e5a4c510.finalize(<generated>)
      at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
      at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
      at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
      at java.lang.ref.Finalizer$3.run(Finalizer.java:148)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.IllegalAccessException: Class com.thoughtworks.proxy.toys.delegate.DelegatingInvoker can not access a member of class java.lang.Object with modifiers "protected"
      at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)
      at java.lang.reflect.Method.invoke(Method.java:317)
      at com.thoughtworks.proxy.toys.delegate.DelegatingInvoker.invokeOnDelegate(DelegatingInvoker.java:109)
      ... 10 more

      I'm not sure what the correct fix was – IMHO DelegatingInvoker shoild simply skip calling finalize on the delegate.

        Activity

        Hide
        Jörg Schaible added a comment -

        Hi Philipp,

        unfortunately I failed to create a test case for this. I committed my tests though:
        http://permalink.gmane.org/gmane.comp.java.proxytoys.cvs/13

        Possibly this is working now because of cglib-2.0.2 ?

        • Jörg
        Show
        Jörg Schaible added a comment - Hi Philipp, unfortunately I failed to create a test case for this. I committed my tests though: http://permalink.gmane.org/gmane.comp.java.proxytoys.cvs/13 Possibly this is working now because of cglib-2.0.2 ? Jörg
        Jörg Schaible made changes -
        Field Original Value New Value
        Resolution Cannot Reproduce [ 5 ]
        Fix Version/s 0.1 [ 11691 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Joerg Schaible [ joehni ]
        Jörg Schaible made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Jörg Schaible
            Reporter:
            Philipp Meier
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: