Fix AWS Lambda RequestHandler resolution #50739
Open
+947
−137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It started as a small quest to fix an issue detected by running the Quarkus CI build with IBM Semeru and I stumbled upon the fact that we had one test (
LambdaWithHierarchyTest) relying on the fact that the method we wanted was the first method returned bygetMethods(), which was clearly wrong and just pure luck.In Semeru, the order in which the methods were returned wasn't the same and the test failed.
I worked on fixing the issue but I ended up relying on a LOT of reflection at runtime (see intermediary commit), which wasn't ideal.
I then decided to rewrite the whole thing using Jandex and it allowed me to reduce the usage of reflection to the case where we have a
Collectiontype as we need to get theParameterizedTypefrom the method parameter and I wasn't sure about serializing it, even if I saw some elements in Redis were serializing a specific impl ofParameterType.I let it at that as the new implementation should already be a lot better and tests pass both with Temurin and Semeru.