You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/12/05 14:26:09 UTC
[commons-exec] branch master updated: Java-style Array declaration
and remove empty finally block
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-exec.git
The following commit(s) were added to refs/heads/master by this push:
new c8d0e57 Java-style Array declaration and remove empty finally block
new 24f0a1c Merge pull request #26 from CnNullptr/master
c8d0e57 is described below
commit c8d0e571a700e2d7bf0c1afd6b488b9729b8facf
Author: nullptr <ju...@outlook.com>
AuthorDate: Sat Dec 5 17:10:35 2020 +0800
Java-style Array declaration and remove empty finally block
---
src/main/java/org/apache/commons/exec/InputStreamPumper.java | 1 -
src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/exec/InputStreamPumper.java b/src/main/java/org/apache/commons/exec/InputStreamPumper.java
index d84a775..6adee33 100644
--- a/src/main/java/org/apache/commons/exec/InputStreamPumper.java
+++ b/src/main/java/org/apache/commons/exec/InputStreamPumper.java
@@ -71,7 +71,6 @@ public class InputStreamPumper implements Runnable {
} catch (final Exception e) {
final String msg = "Got exception while reading/writing the stream";
DebugUtils.handleException(msg ,e);
- } finally {
}
}
diff --git a/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java b/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
index 8f0d28a..819ce08 100644
--- a/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
+++ b/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java
@@ -113,7 +113,7 @@ public class VmsCommandLauncher extends Java13CommandLauncher {
if (cmd.isFile()) {// We assume it is it a script file
out.print("$ @");
// This is a bit crude, but seems to work
- final String parts[] = StringUtils.split(command,"/");
+ final String[] parts = StringUtils.split(command,"/");
out.print(parts[0]); // device
out.print(":[");
out.print(parts[1]); // top level directory