Remove @Deprecated bundles4test TestBundleDiag 58/58058/2
authorMichael Vorburger <vorburger@redhat.com>
Tue, 30 May 2017 18:00:51 +0000 (20:00 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 12 Jun 2017 13:22:37 +0000 (13:22 +0000)
as infrautils.ready does not use this anymore, now

Change-Id: Idd26ebd139d3ddb7ed8c8ef65c8301497f9158d4
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/SystemStateFailureException.java [deleted file]
bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/TestBundleDiag.java [deleted file]

diff --git a/bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/SystemStateFailureException.java b/bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/SystemStateFailureException.java
deleted file mode 100644 (file)
index f1c25cd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.odlparent.bundles4test;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import org.opendaylight.odlparent.bundlestest.lib.BundleDiagInfos;
-
-@Deprecated
-@SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS")
-public class SystemStateFailureException
-        extends org.opendaylight.odlparent.bundlestest.lib.SystemStateFailureException {
-
-    // TODO remove along with @Deprecated TestBundleDiag
-
-    private static final long serialVersionUID = 1L;
-
-    public SystemStateFailureException(String message, BundleDiagInfos bundleDiagInfos) {
-        super(message, bundleDiagInfos);
-    }
-
-    public SystemStateFailureException(String message, BundleDiagInfos bundleDiagInfos, Throwable cause) {
-        super(message, bundleDiagInfos, cause);
-    }
-
-}
diff --git a/bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/TestBundleDiag.java b/bundles4-test/src/main/java/org/opendaylight/odlparent/bundles4test/TestBundleDiag.java
deleted file mode 100644 (file)
index b218d9b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.odlparent.bundles4test;
-
-import java.util.concurrent.TimeUnit;
-import org.apache.karaf.bundle.core.BundleService;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-
-/**
- * Utility for OSGi bundles' diagnostics.
- *
- * @deprecated use the non-static {@link TestBundleDiag} instead of this.
- *
- * @author Michael Vorburger.ch
- */
-@Deprecated
-public final class TestBundleDiag {
-
-    // TODO This @Deprecated class is about to be removed, it's just kept here so not to cause a compilation error
-    // in infrautils.ready, which already uses this, but which will be changed ASAP
-
-    private TestBundleDiag() { }
-
-    public static void checkBundleDiagInfos(BundleContext bundleContext, long timeout, TimeUnit timeoutUnit)
-            throws SystemStateFailureException {
-        ServiceReference<BundleService> bundleServiceReference = bundleContext.getServiceReference(BundleService.class);
-        try {
-            BundleService bundleService = bundleContext.getService(bundleServiceReference);
-            org.opendaylight.odlparent.bundlestest.lib.TestBundleDiag diag =
-                    new org.opendaylight.odlparent.bundlestest.lib.TestBundleDiag(bundleContext, bundleService);
-            diag.checkBundleDiagInfos(timeout, timeoutUnit);
-        } catch (org.opendaylight.odlparent.bundlestest.lib.SystemStateFailureException e) {
-            throw new SystemStateFailureException(e.getMessage(), e.getBundleDiagInfos(), e.getCause());
-        } finally {
-            if (bundleServiceReference != null) {
-                bundleContext.ungetService(bundleServiceReference);
-            }
-        }
-    }
-
-}