Closed GoogleCodeExporter closed 9 years ago
Original comment by kkape...@gmail.com
on 24 Feb 2012 at 11:53
If the streams are closed properly the issue goes away?
Have you already fixed it yourself? Do you have a patch?
Original comment by kkape...@gmail.com
on 24 Feb 2012 at 3:45
I move the initialization of oldStream and newStream object outside the
try->catch->block
....
String[] css = new String[]{};
InputStream oldStream = null;
InputStream newStream = null;
....
and add a finally block
finally {
try {
if(oldStream != null) oldStream.close();
} catch (IOException e) {
//ignore this exception
}
try {
if(newStream != null) newStream.close();
} catch (IOException e) {
//ignore this exception
}
}
furthermore it would be helpful to rewrite Line 167-169
InputStreamReader oldReader = null;
BufferedReader oldBuffer = null;
InputStreamReader newISReader = null;
BufferedReader newBuffer = null;
try {
oldReader = new InputStreamReader(oldStream);
oldBuffer = new BufferedReader(oldReader);
newISReader = new InputStreamReader(newStream);
newBuffer = new BufferedReader(newISReader);
DaisyDiff.diffTag(oldBuffer, newBuffer, postProcess);
} catch (Exception e) {
System.out.println(e);
} finally {
oldBuffer.close();
newBuffer.close();
oldReader.close();
newISReader.close();
}
Original comment by firecree...@gmail.com
on 24 Feb 2012 at 11:33
Can you perform a diff on your code to create a patch and post it here? I will
apply it to trunk after testing.
Original comment by kkape...@gmail.com
on 25 Feb 2012 at 9:39
A local test shows, that this will prevent a resource blocking problem.
Original comment by firecree...@gmail.com
on 27 Feb 2012 at 4:41
Attachments:
Fixed in subversion r175
Original comment by kkape...@gmail.com
on 27 Feb 2012 at 8:59
Original issue reported on code.google.com by
firecree...@gmail.com
on 24 Feb 2012 at 9:58