Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 120481 Details for
Bug 252060
InputStream from HostShellProcessAdapter incorrectly throws IOException
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
patch to fix problem
clipboard.txt (text/plain), 1.69 KB, created by
Greg Watson
on 2008-12-15 10:46:12 EST
(
hide
)
Description:
patch to fix problem
Filename:
MIME Type:
Creator:
Greg Watson
Created:
2008-12-15 10:46:12 EST
Size:
1.69 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services >Index: src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java,v >retrieving revision 1.3 >diff -u -r1.3 HostShellProcessAdapter.java >--- src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java 16 Nov 2006 10:17:05 -0000 1.3 >+++ src/org/eclipse/rse/services/shells/HostShellProcessAdapter.java 15 Dec 2008 15:40:25 -0000 >@@ -11,6 +11,7 @@ > * Martin Oberhuber (Wind River) - moved from org.eclipse.rse.remotecdt (bug 161777) > * Martin Oberhuber (Wind River) - renamed from HostShellAdapter (bug 161777) > * Martin Oberhuber (Wind River) - improved Javadoc >+ * Greg Watson (IBM) - patch for bug #252060 > *******************************************************************************/ > > package org.eclipse.rse.services.shells; >@@ -154,13 +155,20 @@ > */ > public void shellOutputChanged(IHostShellChangeEvent event) { > IHostOutput[] input = event.getLines(); >+ if (input.length == 0) { >+ try { >+ outputStream.close(); >+ } catch (IOException e) { >+ } >+ return; >+ } > OutputStream outputStream = event.isError() ? hostShellError : hostShellInput; > try { >- for(int i = 0; i < input.length; i++) { >- outputStream.write(input[i].getString().getBytes()); >- outputStream.write('\n'); >- outputStream.flush(); >- } >+ for(int i = 0; i < input.length; i++) { >+ outputStream.write(input[i].getString().getBytes()); >+ outputStream.write('\n'); >+ outputStream.flush(); >+ } > } catch(IOException e) { > // Ignore > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
anna.dushistova
:
iplog+
anna.dushistova
:
review+
Actions:
View
|
Diff
Attachments on
bug 252060
:
120183
| 120481