jsuereth / scala-mojo-support

Helper to create maven mojo projects in the Scala languages
BSD 3-Clause "New" or "Revised" License
20 stars 10 forks source link

Support unboxing of mojo parameters. #18

Closed argv-minus-one closed 11 years ago

argv-minus-one commented 11 years ago

Currently, the scala-mojo-support code throws an exception if it encounters a mojo parameter with a primitive type.

This change adds support for unboxing, by simply stripping out the offending type check. I did this because:

This change also adds handling for Maven passing a null value to a parameter with a primitive type. I don't think it will ever do this, but in case it does, scala-mojo-support will now react by resetting the var to the default value for its primitive type (0 for integers, floats, and characters, and false for Boolean).

jsuereth commented 11 years ago

LGTM. Thanks for the fix!