[
https://issues.apache.org/jira/browse/CB-4907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Peter updated CB-4907:
----------------------
Issue Type: Sub-task (was: Task)
Parent: CB-4909
> FB - FileTransfer.java - method does not close stream
> -----------------------------------------------------
>
> Key: CB-4907
> URL: https://issues.apache.org/jira/browse/CB-4907
> Project: Apache Cordova
> Issue Type: Sub-task
> Components: Android
> Affects Versions: 2.9.0
> Reporter: Peter
> Priority: Minor
>
> Resolve FindBugs reported issue in *FileTransfer.java*:
> Before
> {code}
> String line = reader.readLine();
> while(line != null)
> {
> bodyBuilder.append(line);
> line = reader.readLine();
> if(line != null)
> bodyBuilder.append('\n');
> }
> body = bodyBuilder.toString();
> {code}
> After
> {code}
> try {
> String line = reader.readLine();
> while(line != null) {
> bodyBuilder.append(line);
> line = reader.readLine();
> if(line != null) {
> bodyBuilder.append('\n');
> }
> }
> body = bodyBuilder.toString();
> } finally {
> reader.close();
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira