Suppress warnings in tests

This commit is contained in:
Sam Brannen
2022-01-03 16:11:15 +01:00
parent 97625e3658
commit 6555d3b42d
3 changed files with 26 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 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.
@@ -291,6 +291,7 @@ public class MediaTypeTests {
MediaType allXml = new MediaType("application", "*+xml");
MediaType all = MediaType.ALL;
@SuppressWarnings("deprecation")
Comparator<MediaType> comp = MediaType.SPECIFICITY_COMPARATOR;
// equal
@@ -334,6 +335,7 @@ public class MediaTypeTests {
}
@Test
@SuppressWarnings("deprecation")
public void sortBySpecificityRelated() {
MediaType audioBasic = new MediaType("audio", "basic");
MediaType audio = new MediaType("audio");
@@ -364,6 +366,7 @@ public class MediaTypeTests {
}
@Test
@SuppressWarnings("deprecation")
public void sortBySpecificityUnrelated() {
MediaType audioBasic = new MediaType("audio", "basic");
MediaType audioWave = new MediaType("audio", "wave");
@@ -395,6 +398,7 @@ public class MediaTypeTests {
MediaType allXml = new MediaType("application", "*+xml");
MediaType all = MediaType.ALL;
@SuppressWarnings("deprecation")
Comparator<MediaType> comp = MediaType.QUALITY_VALUE_COMPARATOR;
// equal
@@ -438,6 +442,7 @@ public class MediaTypeTests {
}
@Test
@SuppressWarnings("deprecation")
public void sortByQualityRelated() {
MediaType audioBasic = new MediaType("audio", "basic");
MediaType audio = new MediaType("audio");
@@ -468,6 +473,7 @@ public class MediaTypeTests {
}
@Test
@SuppressWarnings("deprecation")
public void sortByQualityUnrelated() {
MediaType audioBasic = new MediaType("audio", "basic");
MediaType audioWave = new MediaType("audio", "wave");

View File

@@ -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.
@@ -147,6 +147,7 @@ public class ProtobufHttpMessageConverterTests {
new ProtobufHttpMessageConverter.ProtobufJavaFormatSupport(),
this.extensionRegistry);
MockHttpOutputMessage outputMessage = new MockHttpOutputMessage();
@SuppressWarnings("deprecation")
MediaType contentType = MediaType.APPLICATION_JSON_UTF8;
this.converter.write(this.testMsg, contentType, outputMessage);