Browse Source

Revert "Merge pull request #32088 from Ryan-Dia"

This reverts commit 484aee069e, reversing
changes made to 6bd7f0231d.

See gh-32088
pull/32094/head
Stéphane Nicoll 2 years ago
parent
commit
358555929d
  1. 12
      spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ParamsRequestCondition.java

12
spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/ParamsRequestCondition.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2024 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -137,9 +137,13 @@ public final class ParamsRequestCondition extends AbstractRequestCondition<Param @@ -137,9 +137,13 @@ public final class ParamsRequestCondition extends AbstractRequestCondition<Param
}
private long getValueMatchCount(Set<ParamExpression> expressions) {
return expressions.stream()
.filter(e -> e.getValue() != null && !e.isNegated())
.count();
long count = 0;
for (ParamExpression e : expressions) {
if (e.getValue() != null && !e.isNegated()) {
count++;
}
}
return count;
}

Loading…
Cancel
Save