common.core: clean up ProcessUtils a bit
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Tue, 10 Jan 2017 19:26:59 +0000 (14:26 -0500)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Wed, 11 Jan 2017 20:48:47 +0000 (15:48 -0500)
commit71535b53ea497bfe05fbf5dfc40c004d2b45bdc3
tree9456949fb50ea55ebf95bd38374e28193200d753
parent91ba906c58bba1d4991133bdf2641a87b26f44cb
common.core: clean up ProcessUtils a bit

While the code does work, it has some issues that could potentially be
problems with the code if not used in the way it should.

* Extract magic number to constants

This is simple, it makes modifying the behaviour easier.

* Explicitly fill code blocks for catch blocks

Improve code readability. It makes it clear that it is intentional.

* Remove redundant modifier on interfaces

An interface is always static, there is no need to add the keyword
"static" to it.

* Add charsets to inputstream

This explicitly expects the default encoding (UTF8). However, this is
not the ideal solution, it would be much better, later to have an
interface with the charset passed in it. It can be used if we want to
launch a process in another machine.

Change-Id: I5ef919e724dc28d9e73c5276811af88b4de12f67
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/88407
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Tested-by: Alexandre Montplaisir <alexmonthy@efficios.com>
common/org.eclipse.tracecompass.common.core/META-INF/MANIFEST.MF
common/org.eclipse.tracecompass.common.core/src/org/eclipse/tracecompass/common/core/process/ProcessUtils.java
This page took 0.024718 seconds and 5 git commands to generate.