Author: pwang
Date: 2011-07-27 10:47:30 -0700 (Wed, 27 Jul 2011)
New Revision: 26287
Modified:
cytoscape/trunk/application/src/main/java/cytoscape/data/readers/CytoscapeSessionReader.java
Log:
Fix a null point exception
Modified:
cytoscape/trunk/application/src/main/java/cytoscape/data/readers/CytoscapeSessionReader.java
===================================================================
---
cytoscape/trunk/application/src/main/java/cytoscape/data/readers/CytoscapeSessionReader.java
2011-07-27 16:50:21 UTC (rev 26286)
+++
cytoscape/trunk/application/src/main/java/cytoscape/data/readers/CytoscapeSessionReader.java
2011-07-27 17:47:30 UTC (rev 26287)
@@ -406,9 +406,15 @@
// First, restore image-based custom graphics
for (String id : imageMap.keySet()) {
+ String origId = id;
+
+ int lastSlashPos = id.lastIndexOf('/');
+ if (lastSlashPos != -1)
+ id = id.substring(lastSlashPos + 1);
+
// Create Custom Graphics with specified ID.
final CyCustomGraphics graphics = new
URLImageCustomGraphics(Long.parseLong(id),
- imageMap.get(id).toString());
+ imageMap.get(origId).toString());
// This property contains display name and tags.
final String propEntry = imageProps.getProperty(id);
--
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.