Author: pwang
Date: 2012-01-10 17:04:45 -0800 (Tue, 10 Jan 2012)
New Revision: 27975

Modified:
   
core3/impl/trunk/search-impl/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
Log:
Fixed a null pointer exception

Modified: 
core3/impl/trunk/search-impl/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
===================================================================
--- 
core3/impl/trunk/search-impl/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
   2012-01-10 23:53:46 UTC (rev 27974)
+++ 
core3/impl/trunk/search-impl/src/main/java/org/cytoscape/search/internal/EnhancedSearchIndex.java
   2012-01-11 01:04:45 UTC (rev 27975)
@@ -141,8 +141,10 @@
                                field.setDoubleValue(attrValue);
                                doc.add(field);
                        } else if (valueType == Boolean.class) {
-                               String attrValue = 
network.getRow(graphObject).get(attrName, Boolean.class).toString();
-                               doc.add(new Field(attrIndexingName, attrValue, 
Field.Store.YES, Field.Index.ANALYZED));
+                               if (network.getRow(graphObject).get(attrName, 
Boolean.class) != null){
+                                       String attrValue = 
network.getRow(graphObject).get(attrName, Boolean.class).toString();
+                                       doc.add(new Field(attrIndexingName, 
attrValue, Field.Store.YES, Field.Index.ANALYZED));                             
    
+                               }
                        } else if (valueType == List.class) {
                                List attrValueList = 
network.getRow(graphObject).get(attrName, List.class);
                                if (attrValueList != null) {

-- 
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.

Reply via email to