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 for index out of bounds exception keycloak 25 issue 214 #1

Conversation

jbentley6
Copy link
Owner

should fix IndexOutOfBoundsException with keycloak 25

Motivation

aerogear#214

What

Adding a check that matchedURIs is not an empty list to ResourceExtractor.getURI

Why

Currently when using version keycloak-metrics-spi-6.0.0.jar with Keycloak 25 when a call comes into a URI that doesn't have a matching resource uriInfo.getMatchedURIs returns an empty list see https://jakarta.ee/specifications/platform/9/apidocs/jakarta/ws/rs/core/uriinfo#getMatchedURIs--

How

Adding a check to ensure that get(0) is not called on the empty list

Verification Steps

Add the steps required to check this change. Following an example.

  1. Go to XX >> YY >> SS
  2. Create a new item N with the info X
  3. Try to edit this item
  4. Check if in the left menu the feature X is not so long present.

Checklist:

  • Code has been tested locally by PR requester
  • Changes have been successfully verified by another team member

Progress

  • Finished task
  • TODO

Additional Notes

PS.: Add images and/or .gifs to illustrate what was changed if this pull request modifies the appearance/output of something presented to the users.

should fix IndexOutOfBoundsException with keycloak 25
@jbentley6 jbentley6 closed this Oct 9, 2024
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.

1 participant