Issue Details (XML | Word | Printable)

Key: LUCENE-1233
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Michael McCandless
Reporter: Michael McCandless
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

Fix Document.getFieldables and others to never return null

Created: 14/Mar/08 10:49 AM   Updated: 01/Dec/08 09:18 AM
Return to search
Component/s: Index
Affects Version/s: 2.1, 2.2, 2.3, 2.3.1
Fix Version/s: 2.4

Time Tracking:
Not Specified

Lucene Fields: New
Resolution Date: 14/Mar/08 11:07 AM


 Description  « Hide
Document.getFieldables (and other similar methods) returns null if there are no fields matching the name. We can avoid NPE in consumers of this API if instead we return an empty array.

Spinoff from http://markmail.org/message/g2nzstmce4cnf3zj



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #637053 Fri Mar 14 11:08:28 UTC 2008 mikemccand LUCENE-1233: return empty array instead of null for certain get*s methods in Document
Files Changed
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/document/Document.java
MODIFY /lucene/java/trunk/CHANGES.txt

Repository Revision Date User Message
ASF #637844 Mon Mar 17 11:31:46 UTC 2008 mikemccand LUCENE-1233: correct javadocs
Files Changed
MODIFY /lucene/java/trunk/src/java/org/apache/lucene/document/Document.java