lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32403] - [PATCH] When locks are disabled, IndexWriter.close() throws NullPointerException
Date Sun, 28 Nov 2004 15:32:47 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32403>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32403





------- Additional Comments From bernhard.messer@intrafind.de  2004-11-28 16:32 -------
Wolf,

can you add a small sample how to raise the NullpointerException. I tried to
recreate your problem but it never occurs. If you have a look at the
implementation of IndexWriter, the writeLock member is created and assigned
within the constructor.

Lock writeLock = directory.makeLock(IndexWriter.WRITE_LOCK_NAME);
if (!writeLock.obtain(WRITE_LOCK_TIMEOUT)) // obtain write lock
   throw new IOException("Index locked for write: " + writeLock);
this.writeLock = writeLock;   

So the only possible chance that it isn't assigned and has a null value, is when
the IOException is thrown.

thanks
Bernhard

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message