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

feat: Java methods returning java.lang primitive #1710

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

farfromrefug
Copy link
Contributor

@farfromrefug farfromrefug commented May 4, 2022

converted to JS corresponding type. This is an issue which always bugged me on difference between Float/Integer/Double/Long and basic float/int/long... handling

This is kind of a breaking change since JS codes doing floatValue() before wont work anymore and will crash.
We have a few in N core for which i ll create a PR

converted to JS corresponding type
@cla-bot cla-bot bot added the cla: yes label May 4, 2022
@triniwiz
Copy link
Member

We can look this for the next major release

@NathanWalker NathanWalker changed the base branch from master to main November 21, 2022 18:12
@farfromrefug
Copy link
Contributor Author

@triniwiz @NathanWalker can we consider this one now (needs to be updated though)? I am facing this again while implementing a new plugin where i have to pass new java.lang.Integer(value) which seems really unecessary. Also it is slower than handling it on the runtime side

@farfromrefug
Copy link
Contributor Author

@triniwiz in this PR i handle callback return result type. And i see it is tricky as it is a breaking change.
Now i am facing the issue of java apis which sometimes takes a boolean as parameter and sometimes a java.lang.Boolean. I really would like the runtime to handle that automatically from a JS boolean.
Do you see where this would be happening? I am ok implementing it but i dont see where it would be done

@triniwiz
Copy link
Member

@farfromrefug in the converter when building the args we can try converting primitives to the objects.

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

Successfully merging this pull request may close these issues.

2 participants