mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 17:18:50 -05:00
Close input stream after reading to fix strict mode warning.
This commit is contained in:
parent
2b0b929aa2
commit
c44b19cda6
@ -1060,8 +1060,15 @@ public class MimeUtility {
|
||||
* Now we read the part into a buffer for further processing. Because
|
||||
* the stream is now wrapped we'll remove any transfer encoding at this point.
|
||||
*/
|
||||
InputStream in = part.getBody().getInputStream();
|
||||
return readToString(in, charset);
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = part.getBody().getInputStream();
|
||||
return readToString(in, charset);
|
||||
} finally {
|
||||
if (in != null) {
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user