Author: pwang
Date: 2010-12-17 17:17:37 -0800 (Fri, 17 Dec 2010)
New Revision: 23239
Modified:
core3/search-impl/trunk/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
Log:
Add null point check
Modified:
core3/search-impl/trunk/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
===================================================================
---
core3/search-impl/trunk/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
2010-12-18 01:13:45 UTC (rev 23238)
+++
core3/search-impl/trunk/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
2010-12-18 01:17:37 UTC (rev 23239)
@@ -147,11 +147,23 @@
continue;
}
doc.add(new Field(attrIndexingName, attrValue,
Field.Store.YES, Field.Index.ANALYZED));
- } else if (valueType == Integer.class) {
+ } else if (valueType == Integer.class) {
+ if (graphObject.getCyRow().get(attrName,
Integer.class) == null){
+ continue;
+ }
String attrValue =
NumberUtils.long2sortableStr(graphObject.getCyRow().get(attrName,
Integer.class));
+ if (attrValue == null){
+ continue;
+ }
doc.add(new Field(attrIndexingName, attrValue,
Field.Store.YES, Field.Index.ANALYZED));
- } else if (valueType == Double.class) {
+ } else if (valueType == Double.class) {
+ if (graphObject.getCyRow().get(attrName,
Double.class) == null){
+ continue;
+ }
String attrValue =
NumberUtils.double2sortableStr(graphObject.getCyRow().get(attrName,
Double.class));
+ if (attrValue == null){
+ continue;
+ }
doc.add(new Field(attrIndexingName, attrValue,
Field.Store.YES, Field.Index.ANALYZED));
} else if (valueType == Boolean.class) {
String attrValue =
graphObject.getCyRow().get(attrName, Boolean.class).toString();
--
You received this message because you are subscribed to the Google Groups
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cytoscape-cvs?hl=en.