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

Fix object to primitive conversion #83

Closed
MarkusJx opened this issue Aug 10, 2023 · 0 comments · Fixed by #84
Closed

Fix object to primitive conversion #83

MarkusJx opened this issue Aug 10, 2023 · 0 comments · Fixed by #84
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MarkusJx
Copy link
Owner

Currently, when an object is converted to a string using

const ArrayList = importClass('java.util.ArrayList');

const list = new ArrayList();
const val = list + '';

The value isn't properly converted to a string using the Java .toString method.
Also, the toString method shouldn't return a Promise<string>, it should return a string.
Therefore, the toStringSync method is useless and should be replaced by a toStringAsync returning a Promise<string>.

@MarkusJx MarkusJx added the bug Something isn't working label Aug 10, 2023
@MarkusJx MarkusJx self-assigned this Aug 10, 2023
@MarkusJx MarkusJx added this to the v2.4.0 milestone Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant