#8 BeanIndexer fails for null value

open
nobody
None
5
2007-07-06
2007-07-06
Tim Frith
No

In version 1.0

I get a NullPointerException at line 79 of BeanIndexer
when the value of the field to be indexed is null.

java.lang.NullPointerException
at lius.index.javaobject.BeanIndexer.getPopulatedLiusFields(BeanIndexer.java:79)
at lius.index.Indexer.index(Indexer.java:108)

The code that fails is
String value = o.toString();
when o is null

My fix was to set value to "" if o == null

Discussion