equal
deleted
inserted
replaced
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]; |