An incomplete fix for the NPE bugs in Directory.java
----------------------------------------------------

                 Key: LUCENE-3782
                 URL: https://issues.apache.org/jira/browse/LUCENE-3782
             Project: Lucene - Java
          Issue Type: Bug
          Components: core/store
    Affects Versions: 3.0
            Reporter: Guangtai Liang
            Priority: Critical


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);

          }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to