Author: pwang
Date: 2011-03-24 14:29:04 -0700 (Thu, 24 Mar 2011)
New Revision: 24586
Modified:
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/PreviewTablePanel.java
Log:
Do not close the inputStream after use in preview Panel
Modified:
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/PreviewTablePanel.java
===================================================================
---
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/PreviewTablePanel.java
2011-03-24 21:24:07 UTC (rev 24585)
+++
core3/table-import-impl/trunk/src/main/java/org/cytoscape/tableimport/internal/ui/PreviewTablePanel.java
2011-03-24 21:29:04 UTC (rev 24586)
@@ -949,9 +949,12 @@
try {
BufferedReader bufRd = null;
- //is = URLUtil.getInputStream(sourceURL);
+ if (this.is == null){
+ this.is = URLUtil.getInputStream(sourceURL);
+ }
+
try {
- bufRd = new BufferedReader(new
InputStreamReader(is));
+ bufRd = new BufferedReader(new
InputStreamReader(this.is));
/*
* Generate reg. exp. for delimiter.
*/
@@ -1028,12 +1031,14 @@
}
}
} finally {
- if (bufRd != null) {
- bufRd.close();
- }
+ //Do not close this inputStream after use in
preview Panel
+ //if (bufRd != null) {
+ // bufRd.close();
+ //}
}
} finally {
- if (is != null) {
+ // If the inputStream is passed in from parameter, do
not close it
+ if (sourceURL != null && is != null) {
is.close();
}
}
--
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.