Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EmptyStackException when no args are passed to object annotated with Parameters #95

Closed
remkop opened this issue Apr 17, 2017 · 1 comment

Comments

@remkop
Copy link
Owner

remkop commented Apr 17, 2017

picocli.CommandLine$ParameterException: EmptyStackException: null while processing option[0] '?'.
	at picocli.CommandLine$ParameterException.create(CommandLine.java:3147)
	at picocli.CommandLine$ParameterException.access$900(CommandLine.java:3134)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:1034)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:1019)
	at picocli.CommandLine.parse(CommandLine.java:191)
	at picocli.CommandLine.parse(CommandLine.java:176)
	at picocli.CommandLine$parse.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
EmptyStackException: null while processing option[0] '?'.
	at jp.co.smbcnikko.refdata.LoadVolumeCurves.run(LoadVolumeCurves.groovy:19)
	at groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:263)
	at groovy.lang.GroovyShell.run(GroovyShell.java:518)
	at groovy.lang.GroovyShell.run(GroovyShell.java:507)
	at groovy.ui.GroovyMain.processOnce(GroovyMain.java:653)
	at groovy.ui.GroovyMain.run(GroovyMain.java:384)
	at groovy.ui.GroovyMain.process(GroovyMain.java:370)
	at groovy.ui.GroovyMain.processArgs(GroovyMain.java:129)
	at groovy.ui.GroovyMain.main(GroovyMain.java:109)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:109)
	at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:131)
Caused by: java.util.EmptyStackException
	at java.util.Stack.peek(Stack.java:102)
	at java.util.Stack.pop(Stack.java:84)
	at picocli.CommandLine$Interpreter.processPositionalParameters0(CommandLine.java:1119)
	at picocli.CommandLine$Interpreter.parse(CommandLine.java:1027)
	... 22 more
@remkop remkop added this to the 0.4.0 user manual milestone Apr 17, 2017
@remkop
Copy link
Owner Author

remkop commented Apr 17, 2017

processPostionalParameters0 needs this fix (line 1119)

                for (int i = 0; i < indexRange.min && !argsCopy.isEmpty(); i++) { argsCopy.pop(); }

@remkop remkop closed this as completed in 5b08d20 Apr 17, 2017
@remkop remkop modified the milestones: 0.4.0 user manual, 0.9.1 bugfixes Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant