]
RH Bugzilla Integration commented on WFLY-2141:
-----------------------------------------------
Paul Gier <pgier(a)redhat.com> changed the Status of [bug
Unexpected non-integer input in vault.sh causes error
-----------------------------------------------------
Key: WFLY-2141
URL:
https://issues.jboss.org/browse/WFLY-2141
Project: WildFly
Issue Type: Bug
Components: Security
Affects Versions: 8.0.0.Alpha4
Reporter: Chao Wang
Assignee: Chao Wang
Priority: Minor
Fix For: 8.0.0.Beta1
Execute bin/vault.sh, then input a non-integer parameter cause:
{noformat}
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Scanner.java:909)
at java.util.Scanner.next(Scanner.java:1530)
at java.util.Scanner.nextInt(Scanner.java:2160)
at java.util.Scanner.nextInt(Scanner.java:2119)
at org.jboss.as.security.vault.VaultTool.main(VaultTool.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.modules.Module.run(Module.java:292)
at org.jboss.modules.Main.main(Main.java:455)
{noformat}
Because VaultTool.main() only scans next token of the input as an int, better catch the
InputMismatchException and exit peacefully as default action.