jdk/test/java/io/Reader/SkipNegative.java
changeset 5810 e83d67ad8c96
parent 5506 202f599c92aa
child 7668 d4a77089c587
equal deleted inserted replaced
5809:6e38efd0293f 5810:e83d67ad8c96
    39         try {
    39         try {
    40             long actual = fr.skip(nchars);
    40             long actual = fr.skip(nchars);
    41         } catch(IllegalArgumentException e){
    41         } catch(IllegalArgumentException e){
    42             // Negative argument caught
    42             // Negative argument caught
    43             return;
    43             return;
       
    44         } finally {
       
    45             fr.close();
    44         }
    46         }
    45         throw new Exception("Skip should not accept negative values");
    47         throw new Exception("Skip should not accept negative values");
    46     }
    48     }
    47 }
    49 }