Bug 558489 - [console] Remove unnecessary encoding/decoding in ProcessConsole output handling
Summary: [console] Remove unnecessary encoding/decoding in ProcessConsole output handling
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.14   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.15 M1   Edit
Assignee: Paul Pazderski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 553348 553533 558463
  Show dependency tree
 
Reported: 2019-12-19 17:14 EST by Paul Pazderski CLA
Modified: 2020-05-02 10:55 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pazderski CLA 2019-12-19 17:14:22 EST
The part mentioned in the summary is that ProcessConsole is receiving output from process via IStreamMonitor as String. Then it transform this string to bytes and pass it to IOConsoleOutputStream which... transform those bytes back into a string.

This is not only unnecessary it can corrupt the content because the encoding to encode and decode can differ. It is unlikely but possible.

Another major part of this change is the refactoring of ProcessConsole's part in output handling for bug 558463.

And last but not least since I'm already changing encoding stuff I changed some encodings passed as names to use proper Charset class. Spares us a few unnecessary charset lookups.
Comment 1 Eclipse Genie CLA 2019-12-19 17:18:03 EST
New Gerrit change created: https://git.eclipse.org/r/154846
Comment 3 Sarika Sinha CLA 2020-01-06 01:10:18 EST
Steps to verify this bug?
Comment 4 Paul Pazderski CLA 2020-01-06 03:19:15 EST
Well, the best you can do is print something to console and see that it's not corrupted.