Commit fc1c7b3 1 parent 24e4180 commit fc1c7b3 Copy full SHA for fc1c7b3
File tree 1 file changed +5
-6
lines changed
http-client/src/main/java/io/micronaut/http/client/filter
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -91,11 +91,6 @@ public HttpClientFilterResolver(
91
91
annotationMetadata .stringValues (Filter .class )
92
92
);
93
93
}).filter (entry -> {
94
- final HttpClientFilter filter = entry .httpClientFilter ;
95
- if (filter instanceof Toggleable && !((Toggleable ) filter ).isEnabled ()) {
96
- return false ;
97
- }
98
-
99
94
boolean matches ;
100
95
AnnotationMetadata annotationMetadata = entry .annotationMetadata ;
101
96
if (annotationValue != null ) {
@@ -121,6 +116,10 @@ public List<HttpClientFilter> resolveFilters(HttpRequest<?> request) {
121
116
io .micronaut .http .HttpMethod method = request .getMethod ();
122
117
List <HttpClientFilter > filterList = new ArrayList <>(clientFilters .size ());
123
118
for (HttpClientFilterEntry filterEntry : clientFilters ) {
119
+ final HttpClientFilter filter = filterEntry .httpClientFilter ;
120
+ if (filter instanceof Toggleable && !((Toggleable ) filter ).isEnabled ()) {
121
+ continue ;
122
+ }
124
123
boolean matches = true ;
125
124
if (filterEntry .hasMethods ) {
126
125
matches = anyMethodMatches (method , filterEntry .filterMethods );
@@ -130,7 +129,7 @@ public List<HttpClientFilter> resolveFilters(HttpRequest<?> request) {
130
129
}
131
130
132
131
if (matches ) {
133
- filterList .add (filterEntry . httpClientFilter );
132
+ filterList .add (filter );
134
133
}
135
134
}
136
135
return filterList ;
You can’t perform that action at this time.
0 commit comments