test/jdk/sun/security/pkcs11/PKCS11Test.java
changeset 48248 55b9b1e184c6
parent 47216 71c04702a3d5
child 48547 7537c762d42d
child 48601 391502ceeed9
equal deleted inserted replaced
48247:fa5a47cad0c9 48248:55b9b1e184c6
   739     static String getDistro() {
   739     static String getDistro() {
   740         return distro;
   740         return distro;
   741     }
   741     }
   742 
   742 
   743     private static String distro() {
   743     private static String distro() {
   744         try (BufferedReader in =
   744         if (props.getProperty("os.name").equals("SunOS")) {
   745             new BufferedReader(new InputStreamReader(
   745             try (BufferedReader in =
   746                 Runtime.getRuntime().exec("uname -v").getInputStream()))) {
   746                          new BufferedReader(new InputStreamReader(
   747 
   747                                  Runtime.getRuntime().exec("uname -v").getInputStream()))) {
   748             return in.readLine();
   748 
   749         } catch (Exception e) {
   749                 return in.readLine();
   750             throw new RuntimeException("Failed to determine distro.", e);
   750             } catch (Exception e) {
       
   751                 throw new RuntimeException("Failed to determine distro.", e);
       
   752             }
       
   753         } else {
       
   754             // Not used outside Solaris
       
   755             return null;
   751         }
   756         }
   752     }
   757     }
   753 
   758 
   754     static byte[] generateData(int length) {
   759     static byte[] generateData(int length) {
   755         byte data[] = new byte[length];
   760         byte data[] = new byte[length];