cosmetic: cleanup null-analysis annotations
diff --git a/core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java b/core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
index d2b87a6..e21e846 100644
--- a/core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
+++ b/core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
@@ -52,7 +52,6 @@
/**
* Teardown actions after test method execution
*/
- @SuppressWarnings("null")
protected void tearDown() {
if (componentContext != null) {
// deactivate all services
@@ -72,7 +71,6 @@
/**
* @return OSGi component context
*/
- @SuppressWarnings("null")
public final @NotNull ComponentContext componentContext() {
if (this.componentContext == null) {
this.componentContext = MockOsgi.newComponentContext();
@@ -83,7 +81,6 @@
/**
* @return OSGi Bundle context
*/
- @SuppressWarnings("null")
public final @NotNull BundleContext bundleContext() {
return componentContext().getBundleContext();
}
@@ -197,7 +194,7 @@
* @return The services instances or an empty array.
* @throws RuntimeException If the <code>filter</code> string is not a valid OSGi service filter string.
*/
- @SuppressWarnings({ "unchecked", "null" })
+ @SuppressWarnings("unchecked")
public final @NotNull <ServiceType> ServiceType @NotNull [] getServices(@NotNull final Class<ServiceType> serviceType, @Nullable final String filter) {
try {
ServiceReference[] serviceReferences = bundleContext().getServiceReferences(serviceType.getName(), filter);
diff --git a/core/src/test/java/org/apache/sling/testing/mock/osgi/ManifestScannerTest.java b/core/src/test/java/org/apache/sling/testing/mock/osgi/ManifestScannerTest.java
index 2e04eaa..8a536c5 100644
--- a/core/src/test/java/org/apache/sling/testing/mock/osgi/ManifestScannerTest.java
+++ b/core/src/test/java/org/apache/sling/testing/mock/osgi/ManifestScannerTest.java
@@ -25,7 +25,6 @@
import org.junit.Test;
import org.osgi.framework.Constants;
-@SuppressWarnings("null")
public class ManifestScannerTest {
/**
diff --git a/core/src/test/java/org/apache/sling/testing/mock/osgi/MockConfigurationAdminTest.java b/core/src/test/java/org/apache/sling/testing/mock/osgi/MockConfigurationAdminTest.java
index de663b4..187efbd 100644
--- a/core/src/test/java/org/apache/sling/testing/mock/osgi/MockConfigurationAdminTest.java
+++ b/core/src/test/java/org/apache/sling/testing/mock/osgi/MockConfigurationAdminTest.java
@@ -32,7 +32,6 @@
import com.google.common.collect.ImmutableMap;
-@SuppressWarnings("null")
public class MockConfigurationAdminTest {
private static final String[] TEST_ADAPTABLES = new String[] {
diff --git a/core/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java b/core/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java
index 9e69984..d174bf1 100644
--- a/core/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java
+++ b/core/src/test/java/org/apache/sling/testing/mock/osgi/OsgiServiceUtilActivateDeactivateTest.java
@@ -36,7 +36,6 @@
/**
* Test different variants of activate/deactivate methods with varying signatures.
*/
-@SuppressWarnings("null")
public class OsgiServiceUtilActivateDeactivateTest {
private Map<String,Object> map = ImmutableMap.<String, Object>of("prop1", "value1",