Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8198317: Enhance JavacTool.getTask for flexibility #1896
8198317: Enhance JavacTool.getTask for flexibility #1896
Changes from 1 commit
5ac98f7
f73c405
e13c072
909140e
File filter
Jump to
jonathan-gibbonsDec 29, 2020
Contributor
The variable name
bais
is "surprising". Is it a cut-n-paste from elsewhere? I was expecting to seebaos
as an acronym for "byte array output stream",bais
suggests "byte array input stream".lgxbslgxDec 29, 2020
Author
Contributor
Fixed. I used
ByteArrayInputStream bais = new ByteArrayInputStream();
at the beginning. Then I identified theByteArrayInputStream
is not right and changed to useByteArrayOutputStream
. But I forgot to revise the variable namebais
. Sorry for wasting the time at this careless detail.jonathan-gibbonsDec 29, 2020
Contributor
Although not strictly necessary in this case, it is good practice to use
try ... finally
to reset values back to some previous value. In other words, theSystem.setErr(prev);
should be in thefinally
clause.lgxbslgxDec 29, 2020
Author
Contributor
Fixed.