|
|
@ -33,19 +33,20 @@ public class ReaderLeaks {
|
|
|
|
} catch (IOException e) {
|
|
|
|
} catch (IOException e) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This test seems to be flaky in the CI at the moment.
|
|
|
|
public void readerClosedOk() throws IOException {
|
|
|
|
We guess it's because of timeouts in the analysis.
|
|
|
|
Reader r = null;
|
|
|
|
public void readerClosedOk() throws IOException {
|
|
|
|
try {
|
|
|
|
Reader r = null;
|
|
|
|
r = new FileReader("testing.txt");
|
|
|
|
try {
|
|
|
|
boolean ready = r.ready();
|
|
|
|
r = new FileReader("testing.txt");
|
|
|
|
r.close();
|
|
|
|
boolean ready = r.ready();
|
|
|
|
} catch (IOException e) {
|
|
|
|
r.close();
|
|
|
|
} finally {
|
|
|
|
} catch (IOException e) {
|
|
|
|
if (r != null) r.close();
|
|
|
|
} finally {
|
|
|
|
}
|
|
|
|
if (r != null) r.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
// BufferedReader tests
|
|
|
|
// BufferedReader tests
|
|
|
|
|
|
|
|
|
|
|
|
public void bufferedReaderNotClosedAfterRead() {
|
|
|
|
public void bufferedReaderNotClosedAfterRead() {
|
|
|
|