From c42b5ad80e73c93bf3f4be1a7f428db45ebc2683 Mon Sep 17 00:00:00 2001 From: Marc Breslow Date: Sat, 23 Jan 2016 12:36:30 -0500 Subject: [PATCH] The testGetJSON() method had a strange cast to (Object) that I removed to improve readability and maintainability. This was identified by findbugs rule BC_IMPOSSIBLE_CAST. --- .../test/java/org/apache/tika/server/TikaDetectorsTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tika-server/src/test/java/org/apache/tika/server/TikaDetectorsTest.java b/tika-server/src/test/java/org/apache/tika/server/TikaDetectorsTest.java index 21bece31beb..6bbfbf2a492 100644 --- a/tika-server/src/test/java/org/apache/tika/server/TikaDetectorsTest.java +++ b/tika-server/src/test/java/org/apache/tika/server/TikaDetectorsTest.java @@ -100,7 +100,7 @@ public void testGetJSON() throws Exception { .get(); String jsonStr = getStringFromInputStream((InputStream) response.getEntity()); - Map> json = (Map>) JSON.parse(jsonStr); + Map json = (Map) JSON.parse(jsonStr); // Should have a nested structure assertTrue(json.containsKey("name")); @@ -110,7 +110,7 @@ public void testGetJSON() throws Exception { assertEquals(Boolean.TRUE, json.get("composite")); // At least 4 child detectors, none of them composite - Object[] children = (Object[]) (Object) json.get("children"); + Object[] children = (Object[]) json.get("children"); assertTrue(children.length >= 4); boolean hasOgg = false, hasPOIFS = false, hasZIP = false, hasMime = false; for (Object o : children) {