Skip to content

Commit e37c478

Browse files
committed
Removing unecessary compiler suppressions
1 parent 7b647fd commit e37c478

File tree

10 files changed

+2
-24
lines changed

10 files changed

+2
-24
lines changed

geowebcache/core/src/main/java/org/geowebcache/util/ServletUtils.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public static String[][] selectedStringArraysFromMap(Map<String, String[]> map,
103103
*
104104
* @return map subset containing (URL decoded) values for {@code keys}, with keys normalized to upper case
105105
*/
106-
@SuppressWarnings("unchecked")
107106
public static Map<String, String> selectedStringsFromMap(Map<String, ?> map, String encoding, String... keys) {
108107

109108
map = new CaseInsensitiveMap<>(map);

geowebcache/core/src/test/java/org/geowebcache/MockExtensionRuleTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,6 @@ public void testAddsTypedExtensions() throws Throwable {
172172
rule.apply(
173173
new Statement() {
174174

175-
@SuppressWarnings("unchecked")
176175
@Override
177176
public void evaluate() throws Throwable {
178177
String bean1 = "THISISTHEBEAN";

geowebcache/core/src/test/java/org/geowebcache/config/BlobStoreConfigurationTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,6 @@ public void testExceptionInAddListenerDoesntBlockOtherListeners() throws Excepti
477477
EasyMock.verify(listener2);
478478
}
479479

480-
@SuppressWarnings("unchecked")
481480
@Test
482481
public void testExceptionInAddListenerRecordsSuppressedExceptions() throws Exception {
483482
BlobStoreConfigurationListener listener1 =
@@ -578,7 +577,6 @@ public void testExceptionInModifyListenerDoesntBlockOtherListeners() throws Exce
578577
EasyMock.verify(listener2);
579578
}
580579

581-
@SuppressWarnings("unchecked")
582580
@Test
583581
public void testExceptionInModifyListenerRecordsSuppressedExceptions() throws Exception {
584582
BlobStoreConfigurationListener listener1 =
@@ -683,7 +681,6 @@ public void testExceptionInRenameListenerDoesntBlockOtherListeners() throws Exce
683681
EasyMock.verify(listener2);
684682
}
685683

686-
@SuppressWarnings("unchecked")
687684
@Test
688685
public void testExceptionInRenameListenerRecordsSuppressedExceptions() throws Exception {
689686
BlobStoreConfigurationListener listener1 =
@@ -788,7 +785,6 @@ public void testExceptionInRemoveListenerDoesntBlockOtherListeners() throws Exce
788785
EasyMock.verify(listener2);
789786
}
790787

791-
@SuppressWarnings("unchecked")
792788
@Test
793789
public void testExceptionInRemoveListenerRecordsSuppressedExceptions() throws Exception {
794790
BlobStoreConfigurationListener listener1 =

geowebcache/core/src/test/java/org/geowebcache/config/ListenerCollectionTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ public void testExceptionDoesntPreventOthers() throws Exception {
143143
control.verify();
144144
}
145145

146-
@SuppressWarnings("unchecked")
147146
@Test
148147
public void testSuppressedExceptionsRecorded() throws Exception {
149148
ListenerCollection<Runnable> collection = new ListenerCollection<>();

geowebcache/core/src/test/java/org/geowebcache/seed/SeedTaskTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public void tearDown() throws Exception {}
7474

7575
/** For a metatiled seed request over a given zoom level, make sure the correct wms calls are issued */
7676
@Test
77-
@SuppressWarnings("serial")
7877
public void testSeedWMSRequests() throws Exception {
7978
WMSLayer tl = createWMSLayer("image/png");
8079

@@ -243,7 +242,6 @@ protected void makeRequest(
243242

244243
/** Make sure when seeding a given zoom level, the correct tiles are sent to the {@link StorageBroker} */
245244
@Test
246-
@SuppressWarnings("serial")
247245
public void testSeedStoredTiles() throws Exception {
248246

249247
WMSLayer tl = createWMSLayer("image/png");

geowebcache/core/src/test/java/org/geowebcache/seed/TruncateBboxRequestTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939

4040
public class TruncateBboxRequestTest {
4141

42-
@SuppressWarnings("unchecked")
4342
protected SeedRequest seedRequest(
4443
String layerName,
4544
String gridSet,

geowebcache/core/src/test/java/org/geowebcache/storage/AbstractBlobStoreTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,6 @@ public void testMetadataWithPercentInValue() throws Exception {
664664
assertThat(store.getLayerMetadata("testLayer", "testKey"), equalTo("test%Value"));
665665
}
666666

667-
@SuppressWarnings("unchecked")
668667
@Test
669668
public void testParameterList() throws Exception {
670669
Map<String, String> params1 = Collections.singletonMap("testKey", "testValue1");

geowebcache/sqlite/src/test/java/org/geowebcache/sqlite/MbtilesBlobStoreTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ public void testRenameOperation() throws Exception {
270270
}
271271

272272
@Test
273-
@SuppressWarnings("unchecked") // TODO: remove when upgrading to Hamcrest 2
273+
// TODO: remove when upgrading to Hamcrest 2
274274
public void testOpeningDatabaseFileWithMbtilesMetadata() throws Exception {
275275
// create and instantiate mbtiles metadata
276276
File mbtilesMetadataDirectory = buildRootFile("mbtiles-metadata");

geowebcache/wms/src/test/java/org/geowebcache/config/wms/GetCapabilitiesConfigurationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ WebMapServer getWMS() {
171171
}
172172

173173
@Test
174-
@SuppressWarnings("unchecked") // to be removed once we upgrade to Hamcrest 2, @SafeVarArgs
174+
// to be removed once we upgrade to Hamcrest 2, @SafeVarArgs
175175
public void testDelegateInitializingLayers() throws Exception {
176176
GridSetBroker broker = new GridSetBroker(Collections.singletonList(new DefaultGridsets(false, false)));
177177
String url = "http://test/wms";

geowebcache/wmts/src/test/java/org/geowebcache/service/wmts/WMTSServiceTest.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ public void testGetCap() throws Exception {
295295

296296
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
297297

298-
@SuppressWarnings("unchecked")
299298
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
300299
kvp.put("service", new String[] {"WMTS"});
301300
kvp.put("version", new String[] {"1.0.0"});
@@ -553,7 +552,6 @@ public ServiceInformation getServiceInformation() {
553552
when(gwcd.getServletPrefix()).thenReturn(null);
554553
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
555554
extensions.forEach(service::addExtension);
556-
@SuppressWarnings("unchecked")
557555
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
558556
kvp.put("service", new String[] {"WMTS"});
559557
kvp.put("version", new String[] {"1.0.0"});
@@ -625,7 +623,6 @@ public void testGetCapServiceInfo() throws Exception {
625623

626624
service = new WMTSService(sb, tldx, null, mock(RuntimeStats.class));
627625

628-
@SuppressWarnings("unchecked")
629626
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
630627
kvp.put("service", new String[] {"WMTS"});
631628
kvp.put("version", new String[] {"1.0.0"});
@@ -690,7 +687,6 @@ public void testGetCapOneWGS84BBox() throws Exception {
690687

691688
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
692689

693-
@SuppressWarnings("unchecked")
694690
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
695691
kvp.put("service", new String[] {"WMTS"});
696692
kvp.put("version", new String[] {"1.0.0"});
@@ -758,7 +754,6 @@ public void testGetCapUnboundedStyleFilter() throws Exception {
758754

759755
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
760756

761-
@SuppressWarnings("unchecked")
762757
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
763758
kvp.put("service", new String[] {"WMTS"});
764759
kvp.put("version", new String[] {"1.0.0"});
@@ -820,7 +815,6 @@ public void testGetCapEmptyStyleFilter() throws Exception {
820815

821816
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
822817

823-
@SuppressWarnings("unchecked")
824818
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
825819
kvp.put("service", new String[] {"WMTS"});
826820
kvp.put("version", new String[] {"1.0.0"});
@@ -882,7 +876,6 @@ public void testGetCapMultipleStyles() throws Exception {
882876

883877
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
884878

885-
@SuppressWarnings("unchecked")
886879
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
887880
kvp.put("service", new String[] {"WMTS"});
888881
kvp.put("version", new String[] {"1.0.0"});
@@ -979,7 +972,6 @@ private static XpathEngine buildWMTSXPath() {
979972
* , "text/html" , "application/vnd.ogc.gml" then checks if in the capabilities documents each <ResourceURL>
980973
* elements contains both the dimensions components.
981974
*/
982-
@SuppressWarnings("unchecked")
983975
@Test
984976
public void testGetCapWithMultipleDimensions() throws Exception {
985977

@@ -1053,7 +1045,6 @@ public void testGetCapWithMultipleDimensions() throws Exception {
10531045
assertEquals("2", xpath.evaluate("count(//wmts:Contents/wmts:Layer/wmts:Dimension/ows:Identifier)", doc));
10541046
}
10551047

1056-
@SuppressWarnings("unchecked")
10571048
@Test
10581049
public void testGetTileWithStyle() throws Exception {
10591050

@@ -1124,7 +1115,6 @@ public void testDispatchCustomOperations() throws Exception {
11241115
GeoWebCacheDispatcher gwcd = mock(GeoWebCacheDispatcher.class);
11251116
when(gwcd.getServletPrefix()).thenReturn(null);
11261117
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
1127-
@SuppressWarnings("unchecked")
11281118
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
11291119
kvp.put("service", new String[] {"WMTS"});
11301120
kvp.put("version", new String[] {"1.0.0"});
@@ -1384,7 +1374,6 @@ public void testGetCapWithTileJSONDifferentUrls() throws Exception {
13841374

13851375
service = new WMTSService(sb, tld, null, mock(RuntimeStats.class));
13861376

1387-
@SuppressWarnings("unchecked")
13881377
Map<String, String[]> kvp = new CaseInsensitiveMap<>();
13891378
kvp.put("service", new String[] {"WMTS"});
13901379
kvp.put("version", new String[] {"1.0.0"});

0 commit comments

Comments
 (0)