Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1b36173

Browse files
author
Kangol
committed
files gateway can now boot
1 parent 2c91c51 commit 1b36173

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

boot/src/main/java/com/ricequant/rqboot/boot/IApplication.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
*/
1111
public interface IApplication {
1212

13-
default boolean withDefaultArgs() {
14-
return false;
15-
}
16-
1713
String getAppName();
1814

1915
void customizeArgs(CommandLineArgs definedArgs);

boot/src/main/java/com/ricequant/rqboot/boot/RicequantMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public void init(String[] args) {
146146
}
147147

148148
CommandLineParser cp = new CommandLineParser(iApplication.getAppName());
149-
CommandLineArgs definedArgs = new CommandLineArgs(iApplication.withDefaultArgs());
149+
CommandLineArgs definedArgs = new CommandLineArgs();
150150
iApplication.customizeArgs(definedArgs);
151151

152152
OptionMap optionMap = cp.parse(args, definedArgs);

config/src/main/java/com/ricequant/rqboot/config/cmd/CommandLineArgs.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,18 @@ public class CommandLineArgs {
1717
private final List<IArgument> iArgumentList;
1818

1919
public CommandLineArgs() {
20-
this(false);
21-
}
22-
23-
public CommandLineArgs(boolean withDefaultOptions) {
2420
iOptions = new Options();
2521
iNameArgumentMap = new HashMap<>();
2622
iArgumentList = new ArrayList<>();
2723

2824
withArguments(RicemapDefaultArgs.Help);
2925
withArguments(RicemapDefaultArgs.InstanceName);
30-
31-
if (withDefaultOptions)
32-
initOptions();
3326
}
3427

35-
private void initOptions() {
36-
withArguments(RicemapDefaultArgs.DevMode);
37-
withArguments(RicemapDefaultArgs.ConfigFile);
38-
withArguments(RicemapDefaultArgs.TempDir);
39-
withArguments(RicemapDefaultArgs.DebugLevel);
40-
withArguments(RicemapDefaultArgs.JmxPort);
41-
withArguments(RicemapDefaultArgs.JmxHost);
42-
withArguments(RicemapDefaultArgs.Cwd);
43-
withArguments(RicemapDefaultArgs.IsStatOpen);
44-
withArguments(RicemapDefaultArgs.SerializerType);
28+
public void withDefaultOptions() {
29+
withArguments(RicemapDefaultArgs.DevMode, RicemapDefaultArgs.ConfigFile, RicemapDefaultArgs.TempDir,
30+
RicemapDefaultArgs.DebugLevel, RicemapDefaultArgs.JmxPort, RicemapDefaultArgs.JmxHost,
31+
RicemapDefaultArgs.Cwd, RicemapDefaultArgs.IsStatOpen, RicemapDefaultArgs.SerializerType);
4532
}
4633

4734
public void withArguments(IArgument... arguments) {

0 commit comments

Comments
 (0)