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

ASMAPI.getSystemPropertyFlag using wrong Boolean conversion #31

Closed
jediminer543 opened this issue Aug 11, 2020 · 2 comments
Closed

ASMAPI.getSystemPropertyFlag using wrong Boolean conversion #31

jediminer543 opened this issue Aug 11, 2020 · 2 comments

Comments

@jediminer543
Copy link

As of writing; the ability for coremods to access properties is broken due to the method of boolean conversion.

It currently uses Boolean.getBoolean which reads the given string as a property name and the looks at what the value of that property is. To make a flag "flag" be true pass `-Dcoremod.flag=true -Dtrue=true'

Responsible line:

return Boolean.getBoolean(System.getProperty("coremod."+propertyName, "TRUE"));

@jediminer543
Copy link
Author

Also as a request, as the current behaviour is that any flag that isn't "defined" (in the current wierd way) is to let it be false can this behaviour be preserved, instead of the presumably current aim of making it be true unless falsified

@PaintNinja
Copy link
Contributor

Fixed by #41

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants