Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4432371

beans persistence will fail if getGetListenerMethod isn't supported

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • client-libs
    • None
    • beta
    • generic
    • generic



      Name: sh120115 Date: 03/30/2001


      The problem is in line 266 of DefaultPersistenceDelegate which
      includes the new getGetListenerMethod of EventListener. I added
      it (to support the new getFooListener stuff in 1.4) and added
      the catch clause at line 270 in the hope of handling the case
      where the method is not defined on 1.3. Unfortunately, a missing
      method throws a MethodNotFoundError, not an exception, so the
      code always fails on 1.3.

      One solution is to include the new EventListener class with
      a distribution of the archiver since it, obviously, contains
      the new method. This would work, but it introduces an order
      dependency on the archiver.jar and the rt.jar - if they are
      the wrong way around the code will break here and people will
      have trouble working out why.

      I think the right thing to do is to change line 270 from:

                  catch (Exception e2) {

      to

                  catch (Throwable e2) {

      to fix the problem. I think this is low risk and would allow me
      to maintain a single version of the code.

      ======================================================================

            shickeysunw Shannon Hickey (Inactive)
            shickeysunw Shannon Hickey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: