fix null pointer exception in line 861 when the error stream is not provided - #1
fix null pointer exception in line 861 when the error stream is not provided#1FlashBytes wants to merge 5 commits into
Conversation
…resent but was used to read from it
…resent but was used to read from it
…resent but was used to read from it
| return null; | ||
| } | ||
|
|
||
| BufferedReader rd = new BufferedReader(new InputStreamReader(is)); |
There was a problem hiding this comment.
I think you can surround just this line with a try-catch block. Only put BufferedReader rd = null; before.
There was a problem hiding this comment.
I am not sure as the lifetime of objects within a try block is local to the try block. This means other commands that are not part of the try block "do not see the object".
There was a problem hiding this comment.
Variable is not local to a scope if it was declared outside the scope. Therefore it should work:
BufferedReader rd = null;
try {
rd = ....
} ...
|
@renereichenbach we need to revise the implementation. There is already flow to retry getting output in catch statement of IO error. Basically, I recommend throw IOException in case |
…resent but was used to read from it
…resent but was used to read from it
|
@zhutik I made a change. Please review. Thanks |
…resent but was used to read from it