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 88544 Details for
Bug 217429
[api] IllegalThreadStateException when multiple threads do AbstractHostShellOutputReader.addOutputListener()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
A patch fixing the issue
illegalThread_hostShellReader.diff.txt (text/plain), 1.81 KB, created by
Martin Oberhuber
on 2008-02-01 08:00:44 EST
(
hide
)
Description:
A patch fixing the issue
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2008-02-01 08:00:44 EST
Size:
1.81 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services >Index: src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java,v >retrieving revision 1.7 >diff -u -r1.7 AbstractHostShellOutputReader.java >--- src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java 3 Aug 2007 14:32:52 -0000 1.7 >+++ src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java 31 Jan 2008 17:10:33 -0000 >@@ -18,6 +18,7 @@ > package org.eclipse.rse.services.shells; > > import java.util.ArrayList; >+import java.util.Collections; > import java.util.List; > > public abstract class AbstractHostShellOutputReader extends Thread implements IHostShellOutputReader >@@ -38,7 +39,7 @@ > public AbstractHostShellOutputReader(IHostShell hostShell, boolean isErrorReader) > { > _hostShell = hostShell; >- _listeners = new ArrayList(); >+ _listeners = Collections.synchronizedList(new ArrayList()); > _linesOfOutput = new ArrayList(); > _consumerOffset = 0; > _isErrorReader = isErrorReader; >@@ -102,12 +103,18 @@ > } > } > >+ protected final synchronized void startIfNotAlive() { >+ if (!isAlive()) { >+ start(); >+ } >+ } >+ > public IHostOutput readLine() > { > if (!isAlive()) > { > internalReadLine(); >- start(); >+ startIfNotAlive(); > } > return (IHostOutput)_linesOfOutput.get(_consumerOffset++); > } >@@ -126,10 +133,7 @@ > public void addOutputListener(IHostShellOutputListener listener) > { > _listeners.add(listener); >- if (!isAlive()) >- { >- start(); >- } >+ startIfNotAlive(); > } > > public void fireOutputChanged(IHostShellChangeEvent event)
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
Actions:
View
|
Diff
Attachments on
bug 217429
: 88544