Skip to content

Fix infinite recursion when a @Suggestions method returns a CompletableFuture#771

Merged
jpenilla merged 2 commits intoIncendo:masterfrom
emilyy-dev:fix/soe-annotation-future-suggestions
Sep 11, 2024
Merged

Fix infinite recursion when a @Suggestions method returns a CompletableFuture#771
jpenilla merged 2 commits intoIncendo:masterfrom
emilyy-dev:fix/soe-annotation-future-suggestions

Conversation

@emilyy-dev
Copy link
Copy Markdown
Contributor

MethodSuggestionProvider#mapSuggestions calls itself when the method's input (the @Suggestions method return value) is a CompletableFuture, instead of the unused #mapFuture, leading to a StackOverflowError.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 11, 2024

Test Results

 88 files  ±0   88 suites  ±0   10s ⏱️ -4s
429 tests +1  429 ✅ +1  0 💤 ±0  0 ❌ ±0 
474 runs  +1  474 ✅ +1  0 💤 ±0  0 ❌ ±0 

Results for commit c9e7dd4. ± Comparison against base commit 8c3d2e6.

This pull request removes 3 and adds 4 tests. Note that renamed tests count towards both.
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [5] instance=string list source
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [6] instance=source with CommandInput injected
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [7] instance=source with injected value
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [5] instance=list future source
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [6] instance=string list source
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [7] instance=source with CommandInput injected
org.incendo.cloud.annotations.feature.MethodSuggestionProviderTest ‑ [8] instance=source with injected value

♻️ This comment has been updated with latest results.

@jpenilla jpenilla merged commit 600e10c into Incendo:master Sep 11, 2024
@emilyy-dev emilyy-dev deleted the fix/soe-annotation-future-suggestions branch September 11, 2024 12:15
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