Author: jm
Date: 2012-06-19 12:40:31 -0700 (Tue, 19 Jun 2012)
New Revision: 29619

Modified:
   
core3/impl/trunk/psi-mi-impl/impl/src/main/java/org/cytoscape/psi_mi/internal/data_mapper/PSIMI25EntryMapper.java
Log:
Fixes #1147: Fixed null pointer exception in PSI MI 2.5 mapper


Modified: 
core3/impl/trunk/psi-mi-impl/impl/src/main/java/org/cytoscape/psi_mi/internal/data_mapper/PSIMI25EntryMapper.java
===================================================================
--- 
core3/impl/trunk/psi-mi-impl/impl/src/main/java/org/cytoscape/psi_mi/internal/data_mapper/PSIMI25EntryMapper.java
   2012-06-19 17:58:05 UTC (rev 29618)
+++ 
core3/impl/trunk/psi-mi-impl/impl/src/main/java/org/cytoscape/psi_mi/internal/data_mapper/PSIMI25EntryMapper.java
   2012-06-19 19:40:31 UTC (rev 29619)
@@ -222,9 +222,16 @@
        
        private void processEdge(final Participant source, final Participant 
target, final Interaction interaction,
                        final Collection<Participant> nodes, CyTable nodeTable, 
CyTable edgeTable) {
-               final CyNode sourceCyNode = 
id2NodeMap.get(source.getInteractor().getId());
-               final CyNode targetCyNode = 
id2NodeMap.get(target.getInteractor().getId());
+               Interactor sourceInteractor = source.getInteractor();
+               Interactor targetInteractor = target.getInteractor();
                
+               if (sourceInteractor == null || targetInteractor == null) {
+                       return;
+               }
+               
+               final CyNode sourceCyNode = 
id2NodeMap.get(sourceInteractor.getId());
+               final CyNode targetCyNode = 
id2NodeMap.get(targetInteractor.getId());
+               
                // PPI does not have directinarity
                final CyEdge edge = network.addEdge(sourceCyNode, targetCyNode, 
false);
 

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