File tree 1 file changed +11
-9
lines changed
src/main/java/org/jboss/aerogear/keycloak/metrics
1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -65,21 +65,23 @@ static String getResource(UriInfo uriInfo) {
65
65
static String getURI (UriInfo uriInfo ) {
66
66
if (URI_METRICS_ENABLED ) {
67
67
List <String > matchedURIs = uriInfo .getMatchedURIs ();
68
- StringBuilder sb = new StringBuilder ();
68
+ if (!matchedURIs .isEmpty ()) {
69
+ StringBuilder sb = new StringBuilder ();
69
70
70
- if (URI_METRICS_FILTER != null && URI_METRICS_FILTER .length () != 0 ) {
71
- String [] filter = URI_METRICS_FILTER .split ("," );
71
+ if (URI_METRICS_FILTER != null && URI_METRICS_FILTER .length () != 0 ) {
72
+ String [] filter = URI_METRICS_FILTER .split ("," );
72
73
73
- for (int i = 0 ; i < filter .length ; i ++) {
74
- if (matchedURIs .get (0 ).contains (filter [i ])) {
74
+ for (int i = 0 ; i < filter .length ; i ++) {
75
+ if (matchedURIs .get (0 ).contains (filter [i ])) {
75
76
76
- sb = getURIDetailed (sb , matchedURIs );
77
+ sb = getURIDetailed (sb , matchedURIs );
78
+ }
77
79
}
80
+ } else {
81
+ sb = getURIDetailed (sb , matchedURIs );
78
82
}
79
- } else {
80
- sb = getURIDetailed (sb , matchedURIs );
83
+ return sb .toString ();
81
84
}
82
- return sb .toString ();
83
85
}
84
86
return "" ;
85
87
}
You can’t perform that action at this time.
0 commit comments