jdk/test/java/io/readBytes/MemoryLeak.java
changeset 27785 29d4cb4a8f5e
parent 5506 202f599c92aa
equal deleted inserted replaced
27784:a51d6d4e0528 27785:29d4cb4a8f5e
    38         s.close();
    38         s.close();
    39         for (int i = 0; i < 10000; i++) {
    39         for (int i = 0; i < 10000; i++) {
    40             try {
    40             try {
    41                 s.read(bytes);
    41                 s.read(bytes);
    42                 throw new Error("expected IOException");
    42                 throw new Error("expected IOException");
    43             } catch (IOException _) {
    43             } catch (IOException expected) {
    44                 /* OK */
    44                 /* OK */
    45             } catch (OutOfMemoryError oome) {
    45             } catch (OutOfMemoryError oome) {
    46                 System.out.printf("Got OutOfMemoryError, i=%d%n", i);
    46                 System.out.printf("Got OutOfMemoryError, i=%d%n", i);
    47                 throw oome;
    47                 throw oome;
    48             }
    48             }