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

Improve Java to Ballerina call logic #2135

Merged

Conversation

warunalakshitha
Copy link
Contributor

Purpose

Found some native code can be improved when testing hanging issue.

Fixes:

Examples

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility
  • No commons package changes (if there are any, please update the GraphQL version in GraphQL tools and Ballerina dev tools)
  • No compiler package changes (if there are any, please update the GraphQL version in Ballerina dev tools)

@@ -67,15 +63,11 @@ private static Object invokeClientMethod(Environment env, BObject client, BStrin

private static Object invokeClientMethod(Environment env, BObject client, String methodName, Object[] paramFeed) {
return env.yieldAndRun(() -> {
CompletableFuture<Object> balFuture = new CompletableFuture<>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to creating future now. we can directly pass the result

Copy link
Member

@ThisaruGuruge ThisaruGuruge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ThisaruGuruge ThisaruGuruge merged commit 73ddff7 into ballerina-platform:master Dec 19, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants