--- a/jdk/test/sun/security/pkcs11/PKCS11Test.java Mon Dec 05 17:04:02 2016 -0800
+++ b/jdk/test/sun/security/pkcs11/PKCS11Test.java Mon Dec 05 19:06:55 2016 -0800
@@ -642,6 +642,8 @@
static final boolean badNSSVersion =
getNSSVersion() >= 3.11 && getNSSVersion() < 3.12;
+ private static final String distro = distro();
+
static final boolean badSolarisSparc =
System.getProperty("os.name").equals("SunOS") &&
System.getProperty("os.arch").equals("sparcv9") &&
@@ -735,13 +737,17 @@
* Get the identifier for the operating system distribution
*/
static String getDistro() {
+ return distro;
+ }
+
+ private static String distro() {
try (BufferedReader in =
new BufferedReader(new InputStreamReader(
Runtime.getRuntime().exec("uname -v").getInputStream()))) {
return in.readLine();
} catch (Exception e) {
- return "";
+ throw new RuntimeException("Failed to determine distro.", e);
}
}