Skip to content

Commit

Permalink
Merge pull request #725 from amitjoy/fix/724
Browse files Browse the repository at this point in the history
Removed deprecated usages
  • Loading branch information
amitjoy authored Jan 29, 2024
2 parents 28c31a2 + 006a847 commit c5801de
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public enum RpcType {
SOCKET_RPC
}

private static final long RESULT_TIMEOUT = Duration.ofSeconds(20).toMillis();
private static final long WATCHDOG_TIMEOUT = Duration.ofSeconds(30).toMillis();
private static final Duration RESULT_TIMEOUT = Duration.ofSeconds(20);
private static final Duration WATCHDOG_TIMEOUT = Duration.ofSeconds(30);
private static final AtomicInteger sequence = new AtomicInteger(1000);
private static final Pattern BSN_PATTERN = Pattern.compile("\\s*([^;\\s]+).*");
public static final String PROPERTY_ENABLE_LOGGING = "osgi.fx.enable.logging";
Expand Down Expand Up @@ -404,8 +404,9 @@ public String execCliCommand(final String command) {
cmdLine.addArgument(commandEntries.get(i));
}
final DefaultExecuteResultHandler resultHandler = new DefaultExecuteResultHandler();
final ExecuteWatchdog watchdog = new ExecuteWatchdog(WATCHDOG_TIMEOUT);
final Executor executor = new DefaultExecutor();
final ExecuteWatchdog watchdog = ExecuteWatchdog.builder().setTimeout(WATCHDOG_TIMEOUT)
.get();
final Executor executor = DefaultExecutor.builder().get();
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
final PumpStreamHandler streamHandler = new PumpStreamHandler(outputStream);

Expand Down

0 comments on commit c5801de

Please sign in to comment.