import org.slf4j.LoggerFactory;
public class OsgiRegistrationUtil {
- private static final Logger LOGGER = LoggerFactory.getLogger(OsgiRegistrationUtil.class);
+ private static final Logger LOG = LoggerFactory.getLogger(OsgiRegistrationUtil.class);
private OsgiRegistrationUtil() {
}
@SafeVarargs
- public static <T> AutoCloseable registerService(BundleContext bundleContext, T service, Class<? super T> ... interfaces) {
+ public static <T> AutoCloseable registerService(final BundleContext bundleContext, final T service, final Class<? super T> ... interfaces) {
checkNotNull(service);
checkNotNull(interfaces);
List<AutoCloseable> autoCloseableList = new ArrayList<>();
};
}
- public static AutoCloseable wrap(final BundleTracker bundleTracker) {
+ public static AutoCloseable wrap(final BundleTracker<?> bundleTracker) {
checkNotNull(bundleTracker);
return new AutoCloseable() {
@Override
try {
ac.close();
} catch (Exception e) {
- LOGGER.warn("Exception while closing {}", ac, e);
+ LOG.warn("Exception while closing {}", ac, e);
if (firstException == null) {
firstException = e;
} else {