Lucene - Core
  1. Lucene - Core
  2. LUCENE-6713

TooComplexToDeterminizeException claims to be serializable but actually isn't?

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.3, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This custom exception class, added in LUCENE-6046, claims to be Serializable since in inherits from Throwable yet if you try to serialize it you'll hit runtime exceptions because its members don't implement Serializable.

      We intentionally pushed Java serialization requirements out of Lucene a while back (LUCENE-2908), but maybe for custom exception classes which unfortunately necessarily claim to implement Serializable we need to do something?

      We could just mark the members transient here, but that would mean when you unserialize you get null members on the other end, e.g. you would no longer know which RegExp was problematic ...

      1. LUCENE-6713.patch
        3 kB
        Michael McCandless

        Activity

        Hide
        Michael McCandless added a comment -

        Patch.

        At first I didn't like adding transient to the members here, since it would "secretly" create null fields on the receiving end, but then I noticed we init the exception message with the offending RegExp, so net/net I think this is a good solution.

        Show
        Michael McCandless added a comment - Patch. At first I didn't like adding transient to the members here, since it would "secretly" create null fields on the receiving end, but then I noticed we init the exception message with the offending RegExp, so net/net I think this is a good solution.
        Hide
        ASF subversion and git services added a comment -

        Commit 1694218 from Michael McCandless in branch 'dev/trunk'
        [ https://svn.apache.org/r1694218 ]

        LUCENE-6713: TooComplexToDeterminizeException claims to be serializable but wasn't

        Show
        ASF subversion and git services added a comment - Commit 1694218 from Michael McCandless in branch 'dev/trunk' [ https://svn.apache.org/r1694218 ] LUCENE-6713 : TooComplexToDeterminizeException claims to be serializable but wasn't
        Hide
        ASF subversion and git services added a comment -

        Commit 1694219 from Michael McCandless in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1694219 ]

        LUCENE-6713: TooComplexToDeterminizeException claims to be serializable but wasn't

        Show
        ASF subversion and git services added a comment - Commit 1694219 from Michael McCandless in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1694219 ] LUCENE-6713 : TooComplexToDeterminizeException claims to be serializable but wasn't
        Hide
        Simon Willnauer added a comment -

        thx mike!

        Show
        Simon Willnauer added a comment - thx mike!
        Hide
        Shalin Shekhar Mangar added a comment -

        Bulk close for 5.3.0 release

        Show
        Shalin Shekhar Mangar added a comment - Bulk close for 5.3.0 release

          People

          • Assignee:
            Unassigned
            Reporter:
            Michael McCandless
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development