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

FixedValue#value(Object) does not consider JavaConstant #961

Closed
ljnelson opened this issue Oct 18, 2020 · 2 comments
Closed

FixedValue#value(Object) does not consider JavaConstant #961

ljnelson opened this issue Oct 18, 2020 · 2 comments
Assignees
Milestone

Comments

@ljnelson
Copy link
Contributor

I'm aware that FixedValue has two value methods. One takes a JavaConstant and the other takes an Object.

The one that takes an Object does not check to see if the Object is, itself, a JavaConstant implementation. I think it should, and should then delegate to the value(JavaConstant) method.

(Obviously the work around is for the user herself to do the (tedious, boring) instanceof check before choosing which method to invoke.)

I'll file a PR soon.

@raphw raphw self-assigned this Oct 18, 2020
@raphw raphw added this to the 1.10.17 milestone Oct 18, 2020
@raphw
Copy link
Owner

raphw commented Oct 18, 2020

The value methods should all support TypeDescription, JavaConstant and literal values, this is an oversight! Thanks for fixing!

@ljnelson
Copy link
Contributor Author

See #962.

@raphw raphw closed this as completed in b9c0f67 Oct 31, 2020
raphw added a commit that referenced this issue Oct 31, 2020
Fixes #961 by handing JavaConstant case in FixedValue.value() method
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

2 participants