Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-3782

An incomplete fix for the NPE bugs in Directory.java

Details

    • New

    Description

      The fix revision 499089 was aimed to remove an NPE bug (LUCENE-773) on the value of "lockFactory " in the method "clearLock" of the file "/lucene/java/trunk/src/java/org/apache/lucene/store/Directory.java" , but it is incomplete.

      Since the value "lockFactory " could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods.

      The buggy code locations the same fix needs to be applied at are as bellows:

      Line 106 of the methods "doc()" , and "freq":

      public Lock makeLock(String name)

      { [Line 106] return lockFactory.makeLock(name); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            guangtai Guangtai Liang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified