General warning cleanup

This commit is contained in:
johni0702
2015-07-19 16:18:34 +02:00
parent 4f718ab302
commit 6422558028
31 changed files with 88 additions and 281 deletions

View File

@@ -17,15 +17,11 @@ public class WindowsUriScheme extends UriScheme {
private void regAdd(String args) throws IOException, InterruptedException {
Process process = Runtime.getRuntime().exec("REG ADD HKCU\\Software\\Classes" + args);
try {
if (process.waitFor() != 0) {
StringBuilderWriter writer = new StringBuilderWriter();
IOUtils.copy(process.getInputStream(), writer);
IOUtils.copy(process.getErrorStream(), writer);
throw new IOException(writer.toString());
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
if (process.waitFor() != 0) {
StringBuilderWriter writer = new StringBuilderWriter();
IOUtils.copy(process.getInputStream(), writer);
IOUtils.copy(process.getErrorStream(), writer);
throw new IOException(writer.toString());
}
}
}