Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add new (default) signatures #241

Open
rmannibucau opened this issue Dec 11, 2023 · 0 comments
Open

Add new (default) signatures #241

rmannibucau opened this issue Dec 11, 2023 · 0 comments

Comments

@rmannibucau
Copy link

Hi,

It would be neat to have some new built-in signature bundles.
I identified two needs:

  • Ensure there is no reflection in the code (ease graalvm native-image usage)
  • Ensure CompletionFutures async utilities are not called without an explicit constructor (can likely be extended to more calls but it was my immediate need)

Here is the signatures.txt I'm using right now (covers most of the common patterns I saw even if not 100% complete):

java.lang.Class @ No reflection using class api.
java.lang.invoke.MethodHandle @ No reflection using java.lang.invoke.MethodHandle api.

java.util.concurrent.CompletableFuture#supplyAsync(java.util.function.Supplier) @ No CompletableFuture.supplyAsync without an explicit executor.
java.util.concurrent.CompletableFuture#runAsync(java.lang.Runnable) @ No CompletableFuture.runAsync without an explicit executor.

Indeed I can bundle this as a jar and make it a dependency of the forbidden apis plugin but if it was built-in it would be more convenient to enable (in the same spirit than commons-io I'd say).

Hope it makes sense

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Development

No branches or pull requests

1 participant