pombreda / clamshell-cli

Automatically exported from code.google.com/p/clamshell-cli
Apache License 2.0
0 stars 0 forks source link

Using "*" as value for inputPattern results in exception #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The docu states 'So, if your shell tool will only have one input controller, 
you can change [inputPattern] [...] to "*".'

What steps will reproduce the problem?
1. change the value of inputPattern of in the example cli.config to "*"
2. start clamshell-cli with java -jar cli.jar

What is the expected output? What do you see instead?

D:\_Powershell\Clamshell-Cli\Installation\clamshellcli-0.5.2>java -jar cli.jar
Exception in thread "main" java.util.regex.PatternSyntaxException: Dangling 
meta character '*' near index 0
*
^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.sequence(Unknown Source)
        at java.util.regex.Pattern.expr(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at org.clamshellcli.core.AnInputController.configureController(AnInputController.java:87)
        at org.clamshellcli.core.AnInputController.plug(AnInputController.java:74)
        at org.clamshellcli.impl.CmdController.plug(CmdController.java:88)
        at org.clamshellcli.impl.CliConsole.plug(CliConsole.java:85)
        at org.clamshellcli.impl.CliShell.plug(CliShell.java:67)
        at cli.Run.main(Run.java:78)

What version of the product are you using? On what operating system?

0.5.2

Please provide any additional information below.

Original issue reported on code.google.com by Scholz...@googlemail.com on 13 Jul 2012 at 1:08

GoogleCodeExporter commented 9 years ago
Thank you for reporting this.  I was able to reproduce the problem.  It was not 
a code issue but a documentation issue.  The regular expression in the 
documentation should have read '.*' instead of just '*'.  I fixed the 
documentation.

Original comment by vladimir...@gmail.com on 20 Jul 2012 at 9:26