< prev index next >
test/javax/sound/sampled/DataLine/LongFramePosition.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -28,11 +28,10 @@
/**
* @test
* @bug 5049129
* @summary DataLine.getLongFramePosition
- * @key headful
*/
public class LongFramePosition {
public static void main(String[] args) throws Exception {
boolean failed = false;
@@ -57,14 +56,14 @@
System.out.println("## FAILED: frame positions are not the same!");
}
} finally {
sdl.close();
}
- } catch(LineUnavailableException e){
+ } catch (LineUnavailableException | IllegalArgumentException e) {
System.out.println(e);
System.out.println("Cannot execute test.");
return;
}
- if (failed) throw new Exception("Test FAILED!");
+ if (failed) throw new RuntimeException("Test FAILED!");
System.out.println("Test Passed.");
}
}
< prev index next >