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

IllegalArgumentException when using hyphen as a delimiter in the CLI #47

Closed
joelittlejohn opened this issue Jun 23, 2013 · 3 comments
Closed
Milestone

Comments

@joelittlejohn
Copy link
Owner

Original author: pmarchw...@gmail.com (May 08, 2012 00:12:56)

What steps will reproduce the problem?

  1. Use word-delimiters option with a hyphen value from the CLI

What is the expected output?
The name of the generated file.

What do you see instead?
pmarchwiak$ ./jsonschema2pojo -s schema.json -t src/java/ -p com.example --word-delimiters "-"
Exception in thread "main" java.lang.IllegalArgumentException: Can not set [C field com.googlecode.jsonschema2pojo.cli.Arguments.propertyWordDelimiters to java.lang.String
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
at java.lang.reflect.Field.set(Field.java:657)
at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:211)
at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:159)
at com.beust.jcommander.JCommander.parseValues(JCommander.java:553)
at com.beust.jcommander.JCommander.parse(JCommander.java:246)
at com.beust.jcommander.JCommander.parse(JCommander.java:229)
at com.googlecode.jsonschema2pojo.cli.Arguments.parse(Arguments.java:76)
at com.googlecode.jsonschema2pojo.cli.Jsonschema2Pojo.main(Jsonschema2Pojo.java:58)

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

0.2.3
OS X 10.6.8

Original issue: http://code.google.com/p/jsonschema2pojo/issues/detail?id=47

@joelittlejohn
Copy link
Owner Author

From pmarchw...@gmail.com on May 08, 2012 00:33:05
Fix with unit test in http://code.google.com/r/pmarchwiak-issue47/ .

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on May 08, 2012 09:24:59
Thanks for raising this and providing the fix Patrick, that's brilliant!

I'll merge today.

Cheers

@joelittlejohn
Copy link
Owner Author

From joelittl...@gmail.com on May 08, 2012 12:55:49
Patch merged.

Thanks again!

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