Skip to content

Commit

Permalink
Merge pull request #218 from jbentley6/aerogear-214
Browse files Browse the repository at this point in the history
aerogear-214 : Fixes IndexOutOfBounds issue
  • Loading branch information
pb82 authored Nov 7, 2024
2 parents 6a1ea6c + d823684 commit 435ff6f
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 435ff6f

Please sign in to comment.