Wicket
  1. Wicket
  2. WICKET-4264

JavaSerializer Does Not Call SerializableChecker

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.0, 1.5.1, 1.5.2, 1.5.3
    • Fix Version/s: 1.5.4, 6.0.0-beta1
    • Component/s: wicket
    • Labels:
      None
    • Environment:

      Description

      In the new JavaSerializer class, it has a CheckerOutputStream which extends ObjectOutputStream. The intent is to use the ObjectOutputStream.writeObjectOverride() support. However, the writeObjectOverride() method is never called unless you use the no-arg constructor from the ObjectOutputStream class (which sets the "enableOverride" flag to true). The CheckerOutputStream uses the ObjectOutputStream(OutputStream) constructor in its constructor. Worse yet, even if the writeObjectOverride() method were to be called, it would create a StackOverflowError because it's calling the super.writeObject() method which is what called it in the first place (infinite recursion).

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1d 19h 19m 1 Martin Grigorov 27/Nov/11 11:48
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.5.4 [ 12319051 ]
        Fix Version/s 6.0.0 [ 12315431 ]
        Resolution Fixed [ 1 ]
        Hide
        Martin Grigorov added a comment -

        Thanks for the patch, James!
        I fixed it almost like you did in the patch, just I preserved the method signatures.
        No API breaks, no new classes used.

        Show
        Martin Grigorov added a comment - Thanks for the patch, James! I fixed it almost like you did in the patch, just I preserved the method signatures. No API breaks, no new classes used.
        Martin Grigorov made changes -
        Assignee Martin Grigorov [ mgrigorov ]
        James Carman made changes -
        Environment Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
        Maven home: /usr/local/programs/current/maven
        Java version: 1.7.0_01, vendor: Oracle Corporation
        Java home: /usr/local/programs/jdk1.7.0_01/jre
        Default locale: en_US, platform encoding: UTF-8
        OS name: "linux", version: "2.6.35.14-103.fc14.x86_64", arch: "amd64", family: "unix"
        James Carman made changes -
        Field Original Value New Value
        Attachment WICKET-4264.patch [ 12505141 ]
        Hide
        James Carman added a comment -

        Here is what I propose to be the solution. Let me know what you think and I'll try to come up with a way to write a unit test for this.

        Show
        James Carman added a comment - Here is what I propose to be the solution. Let me know what you think and I'll try to come up with a way to write a unit test for this.
        James Carman created issue -

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            James Carman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development