From 86fbb8678a505520caf4d23cbacee647a6cb2bb6 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 10 Nov 2022 18:24:57 +0100 Subject: [PATCH] Use unquoted value in assertion message in MediaType.checkParameters() Closes gh-29461 --- .../src/main/java/org/springframework/http/MediaType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/MediaType.java b/spring-web/src/main/java/org/springframework/http/MediaType.java index d3e8377510..a7a95ba66f 100644 --- a/spring-web/src/main/java/org/springframework/http/MediaType.java +++ b/spring-web/src/main/java/org/springframework/http/MediaType.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 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. @@ -534,7 +534,7 @@ public class MediaType extends MimeType implements Serializable { String unquotedValue = unquote(value); double d = Double.parseDouble(unquotedValue); Assert.isTrue(d >= 0D && d <= 1D, - () -> "Invalid quality value \"" + value + "\": should be between 0.0 and 1.0"); + () -> "Invalid quality value \"" + unquotedValue + "\": should be between 0.0 and 1.0"); } }