Revxrsal / Lamp

A modern annotations-driven commands framework for Java and Kotlin
MIT License
202 stars 38 forks source link

Fixing redundant check #61

Closed SrBlecaute01 closed 1 year ago

SrBlecaute01 commented 1 year ago

In the last commit: Fix Optional's def causing issues It has a redundancy in the checks, preventing the error of missing arguments from being called. This way, when using a command without putting the arguments, the values ​​are passed as null instead of sending missing arguments.

I partially fixed it by removing a piece of code that was previously removed. However, as I haven't tested all the features of the code, I don't know if it would cause any errors in the future, apparently it's working.

Revxrsal commented 1 year ago

Appreciate the work. In the next version though, @Optional will no longer take a def value, as this functionality will be exclusive to @Default. Therefore I think it's better to just wait until the next release. Thanks for the heads-up though!