@@ -65,7 +65,7 @@ public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMe
6565 }
6666 catch (NoSuchMethodException ex ) {
6767 // Should never happen
68- throw new IllegalStateException ("No handler for HTTP OPTIONS" , ex );
68+ throw new IllegalStateException ("Failed to retrieve internal handler method for HTTP OPTIONS" , ex );
6969 }
7070 }
7171
@@ -183,7 +183,6 @@ private Map<String, MultiValueMap<String, String>> extractMatrixVariables(
183183 /**
184184 * Iterate all RequestMappingInfo's once again, look if any match by URL at
185185 * least and raise exceptions according to what doesn't match.
186- *
187186 * @throws HttpRequestMethodNotSupportedException if there are matches by URL
188187 * but not by HTTP method
189188 * @throws HttpMediaTypeNotAcceptableException if there are matches by URL
@@ -243,7 +242,6 @@ private static class PartialMatchHelper {
243242
244243 private final List <PartialMatch > partialMatches = new ArrayList <PartialMatch >();
245244
246-
247245 public PartialMatchHelper (Set <RequestMappingInfo > infos , HttpServletRequest request ) {
248246 for (RequestMappingInfo info : infos ) {
249247 if (info .getPatternsCondition ().getMatchingCondition (request ) != null ) {
@@ -252,7 +250,6 @@ public PartialMatchHelper(Set<RequestMappingInfo> infos, HttpServletRequest requ
252250 }
253251 }
254252
255-
256253 /**
257254 * Whether there any partial matches.
258255 */
@@ -387,20 +384,18 @@ private static class PartialMatch {
387384
388385 private final boolean paramsMatch ;
389386
390-
391387 /**
392388 * @param info RequestMappingInfo that matches the URL path.
393389 * @param request the current request
394390 */
395391 public PartialMatch (RequestMappingInfo info , HttpServletRequest request ) {
396392 this .info = info ;
397- this .methodsMatch = info .getMethodsCondition ().getMatchingCondition (request ) != null ;
398- this .consumesMatch = info .getConsumesCondition ().getMatchingCondition (request ) != null ;
399- this .producesMatch = info .getProducesCondition ().getMatchingCondition (request ) != null ;
400- this .paramsMatch = info .getParamsCondition ().getMatchingCondition (request ) != null ;
393+ this .methodsMatch = ( info .getMethodsCondition ().getMatchingCondition (request ) != null ) ;
394+ this .consumesMatch = ( info .getConsumesCondition ().getMatchingCondition (request ) != null ) ;
395+ this .producesMatch = ( info .getProducesCondition ().getMatchingCondition (request ) != null ) ;
396+ this .paramsMatch = ( info .getParamsCondition ().getMatchingCondition (request ) != null ) ;
401397 }
402398
403-
404399 public RequestMappingInfo getInfo () {
405400 return this .info ;
406401 }
@@ -410,15 +405,15 @@ public boolean hasMethodsMatch() {
410405 }
411406
412407 public boolean hasConsumesMatch () {
413- return hasMethodsMatch () && this .consumesMatch ;
408+ return ( hasMethodsMatch () && this .consumesMatch ) ;
414409 }
415410
416411 public boolean hasProducesMatch () {
417- return hasConsumesMatch () && this .producesMatch ;
412+ return ( hasConsumesMatch () && this .producesMatch ) ;
418413 }
419414
420415 public boolean hasParamsMatch () {
421- return hasProducesMatch () && this .paramsMatch ;
416+ return ( hasProducesMatch () && this .paramsMatch ) ;
422417 }
423418
424419 @ Override
@@ -428,14 +423,14 @@ public String toString() {
428423 }
429424 }
430425
426+
431427 /**
432428 * Default handler for HTTP OPTIONS.
433429 */
434430 private static class HttpOptionsHandler {
435431
436432 private final HttpHeaders headers = new HttpHeaders ();
437433
438-
439434 public HttpOptionsHandler (Set <String > declaredMethods ) {
440435 this .headers .setAllow (initAllowedHttpMethods (declaredMethods ));
441436 }
0 commit comments