cosmetic: eliminate some warnings
authorStefan Seifert <sseifert@apache.org>
Fri, 4 Dec 2015 20:35:52 +0000 (20:35 +0000)
committerStefan Seifert <sseifert@apache.org>
Fri, 4 Dec 2015 20:35:52 +0000 (20:35 +0000)
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/bundles/extensions/models/impl@1718026 13f79535-47bb-0310-9956-ffa450edef68

src/main/java/org/apache/sling/models/impl/AdapterImplementations.java
src/test/java/org/apache/sling/models/impl/AdapterFactoryTest.java
src/test/java/org/apache/sling/models/impl/ImplementsExtendsTest.java

index 75c2bc4..ac8843e 100644 (file)
@@ -186,10 +186,10 @@ final class AdapterImplementations {
     }
 
     /**
-     * 
      * @param adapterType the type to check
      * @return {@code true} in case the given type is a model (may be with a different adapter class)
      */
+    @SuppressWarnings("unchecked")
     public <ModelType> boolean isModelClass(Class<ModelType> adapterType) {
         String key = adapterType.getName();
         
@@ -206,4 +206,5 @@ final class AdapterImplementations {
         }
         return true;
     }
+
 }
index 284c96d..711c96f 100644 (file)
@@ -74,6 +74,7 @@ public class AdapterFactoryTest {
     }
 
     @Test
+    @SuppressWarnings("deprecation")
     public void testIsModelClass() {
         Assert.assertTrue(factory.isModelClass(resource, DefaultStringModel.class));
         Assert.assertFalse(factory.isModelClass(resource, InvalidModelWithMissingAnnotation.class));
index ea2dcd5..f120770 100644 (file)
@@ -176,6 +176,7 @@ public class ImplementsExtendsTest {
      * class is the adapter still works.
      */
     @Test
+    @SuppressWarnings("deprecation")
     public void testImplementsNoPicker() {
         factory.unbindImplementationPicker(firstImplementationPicker, firstImplementationPickerProps);
 
@@ -208,6 +209,7 @@ public class ImplementsExtendsTest {
      * Test implementation class with a mapping that is not valid (an interface that is not implemented).
      */
     @Test
+    @SuppressWarnings("deprecation")
     public void testInvalidImplementsInterfaceModel() {
         Resource res = getMockResourceWithProps();
         InvalidSampleServiceInterface model = factory.getAdapter(res, InvalidSampleServiceInterface.class);