Skip to content

Commit

Permalink
aerogear-214 : fixes IndexOutOfBounds issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasen Bentley committed Oct 9, 2024
1 parent bb47bf3 commit d823684
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,23 @@ static String getResource(UriInfo uriInfo) {
static String getURI(UriInfo uriInfo) {
if (URI_METRICS_ENABLED) {
List<String> matchedURIs = uriInfo.getMatchedURIs();
StringBuilder sb = new StringBuilder();
if (!matchedURIs.isEmpty()) {
StringBuilder sb = new StringBuilder();

if (URI_METRICS_FILTER != null && URI_METRICS_FILTER.length() != 0) {
String[] filter = URI_METRICS_FILTER.split(",");
if (URI_METRICS_FILTER != null && URI_METRICS_FILTER.length() != 0) {
String[] filter = URI_METRICS_FILTER.split(",");

for (int i = 0; i < filter.length; i++) {
if (matchedURIs.get(0).contains(filter[i])) {
for (int i = 0; i < filter.length; i++) {
if (matchedURIs.get(0).contains(filter[i])) {

sb = getURIDetailed(sb, matchedURIs);
sb = getURIDetailed(sb, matchedURIs);
}
}
} else {
sb = getURIDetailed(sb, matchedURIs);
}
} else {
sb = getURIDetailed(sb, matchedURIs);
return sb.toString();
}
return sb.toString();
}
return "";
}
Expand Down

0 comments on commit d823684

Please sign in to comment.