Accumulo
  1. Accumulo
  2. ACCUMULO-189

RegExFilter deepCopy NullPointerException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0, 1.5.0
    • Component/s: client, tserver
    • Labels:

      Description

      If any of the regex matcher objects are null (i.e. for example, if you only specify a regex for the column family), the deepCopy call will throw a NullPointerException.

      1. RegExFilter.patch
        1 kB
        Jason Trost
      2. RegExFilter-patch-updated.patch
        1 kB
        Jason Trost
      3. RegExFilter-test.patch
        1 kB
        Jason Trost
      4. RegExFilterTest-patch-updated.patch
        0.7 kB
        Jason Trost

        Activity

        Hide
        Jason Trost added a comment -

        see attached patches

        Show
        Jason Trost added a comment - see attached patches
        Hide
        Jason Trost added a comment -

        patches attached.

        Show
        Jason Trost added a comment - patches attached.
        Hide
        Keith Turner added a comment -

        I changed the affects version. This bug will be fixed for 1.5 and probably 1.4, so it will not affect those versions when released. If its not fixed for 1.4, then the affects version should be set to 1.4

        Show
        Keith Turner added a comment - I changed the affects version. This bug will be fixed for 1.5 and probably 1.4, so it will not affect those versions when released. If its not fixed for 1.4, then the affects version should be set to 1.4
        Hide
        Billie Rinaldi added a comment -

        Jason, thanks for the patches and for finding this bug. I very, very recently made some changes to the RegExFilter and some other user iterators that involved removing their constructors and using their static configuration methods for testing (see ACCUMULO-167). For example:

        RegExFilter rei = new RegExFilter();
        IteratorSetting is = new IteratorSetting(1, RegExFilter.class);
        RegExFilter.setRegexs(is, ".*2", null, null, null, false);
        rei.init(new SortedMapIterator(tm), is.getProperties(), new DefaultIteratorEnvironment());

        Also, I moved the RegExFilterTest to the ...iterators.user package. Could you do an svn update and recreate your patches, using the new syntax above for the test?

        Show
        Billie Rinaldi added a comment - Jason, thanks for the patches and for finding this bug. I very, very recently made some changes to the RegExFilter and some other user iterators that involved removing their constructors and using their static configuration methods for testing (see ACCUMULO-167 ). For example: RegExFilter rei = new RegExFilter(); IteratorSetting is = new IteratorSetting(1, RegExFilter.class); RegExFilter.setRegexs(is, ".*2", null, null, null, false); rei.init(new SortedMapIterator(tm), is.getProperties(), new DefaultIteratorEnvironment()); Also, I moved the RegExFilterTest to the ...iterators.user package. Could you do an svn update and recreate your patches, using the new syntax above for the test?
        Hide
        Billie Rinaldi added a comment -

        If you'd prefer that I make the changes based on your existing patch, let me know.

        Show
        Billie Rinaldi added a comment - If you'd prefer that I make the changes based on your existing patch, let me know.
        Hide
        Jason Trost added a comment -

        updated patch

        Show
        Jason Trost added a comment - updated patch

          People

          • Assignee:
            Jason Trost
            Reporter:
            Jason Trost
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development