Use string array in ShellRunner

- In ShellRunner interface replace use of boot's ApplicationArguments
  into plain string array.
- Deprecate old methods with some fallbacks to give
  time for users to do updates.
- NonInteractiveShellRunner contains one breaking change due to its
  public api to set function doing conversion from ApplicationArguments
  which was potentially used via customizer hooks.
- Deprecations planned to get removed in 3.4.x.
- Fixes #1057
This commit is contained in:
Janne Valkealahti
2024-05-02 08:40:17 +01:00
parent aaa7d879dc
commit 71960e5415
9 changed files with 208 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2022 the original author or authors.
* Copyright 2022-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -340,7 +340,12 @@ public interface ShellTestClient extends Closeable {
try {
log.trace("Running {}", data.runner());
data.state().set(-1);
data.runner().run(data.args());
if (data.runner().canRun(data.args)) {
data.runner().run(data.args());
}
else {
data.runner().run(data.args().getSourceArgs());
}
data.state().set(0);
log.trace("Running done {}", data.runner());
} catch (Exception e) {