Author: scooter
Date: 2010-11-03 15:39:38 -0700 (Wed, 03 Nov 2010)
New Revision: 22703

Modified:
   cytoscape/trunk/application/src/main/java/cytoscape/data/ImportHandler.java
Log:
Some web sites insert an extra newline when reading a URL.  curl and
firefox appear to eat this line and throw it away.  We should do the same.


Modified: 
cytoscape/trunk/application/src/main/java/cytoscape/data/ImportHandler.java
===================================================================
--- cytoscape/trunk/application/src/main/java/cytoscape/data/ImportHandler.java 
2010-11-03 22:37:56 UTC (rev 22702)
+++ cytoscape/trunk/application/src/main/java/cytoscape/data/ImportHandler.java 
2010-11-03 22:39:38 UTC (rev 22703)
@@ -486,6 +486,8 @@
                 double percent = 0.0d;
 
                 while ((inputLine = in.readLine()) != null) {
+                    // Guard against leading blank lines...
+                    if (progressCount == 0 && inputLine.length() == 0) 
continue;
                     progressCount += inputLine.length();
 
                     //  Report on Progress

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