Author: ruschein
Date: 2010-07-09 15:29:18 -0700 (Fri, 09 Jul 2010)
New Revision: 20876
Modified:
cytoscape/trunk/src/cytoscape/CytoscapeInit.java
Log:
Simplified my earlier fix.
Modified: cytoscape/trunk/src/cytoscape/CytoscapeInit.java
===================================================================
--- cytoscape/trunk/src/cytoscape/CytoscapeInit.java 2010-07-09 22:21:19 UTC
(rev 20875)
+++ cytoscape/trunk/src/cytoscape/CytoscapeInit.java 2010-07-09 22:29:18 UTC
(rev 20876)
@@ -456,7 +456,7 @@
final File shortName = new
File(sessionFile);
final String absolutePath =
shortName.getAbsolutePath();
- final URL sessionURL = new
URL("file://" + escapePercentSign(absolutePath));
+ final URL sessionURL = new
URL("file://" + absolutePath.replace("%", "%25"));
reader = new
CytoscapeSessionReader(sessionURL);
sessionName = shortName.getName();
}
@@ -478,21 +478,6 @@
return false;
}
- /**
- * @return
- */
- private String escapePercentSign(final String rawString) {
- final StringBuilder cookedString = new
StringBuilder(rawString.length());
- for (int i = 0; i < rawString.length(); ++i) {
- final char ch = rawString.charAt(i);
- if (ch == '%')
- cookedString.append("%25");
- else
- cookedString.append(ch);
- }
- return cookedString.toString();
- }
-
private static void initProperties() {
if (properties == null) {
properties = new Properties();
--
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.