From 2680d03d7160d97be2ae85429e7c457160b056fe Mon Sep 17 00:00:00 2001 From: gjoranv Date: Wed, 2 May 2018 10:27:09 +0200 Subject: Revert "Gjoranv/java9 prep 05" --- .../core/ApplicationEnvironmentModuleTestCase.java | 17 ++++++++--------- .../com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java | 2 -- 2 files changed, 8 insertions(+), 11 deletions(-) (limited to 'jdisc_core/src/test/java/com/yahoo/jdisc/core') diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/core/ApplicationEnvironmentModuleTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/core/ApplicationEnvironmentModuleTestCase.java index 965a132cd92..e8fb53892f0 100644 --- a/jdisc_core/src/test/java/com/yahoo/jdisc/core/ApplicationEnvironmentModuleTestCase.java +++ b/jdisc_core/src/test/java/com/yahoo/jdisc/core/ApplicationEnvironmentModuleTestCase.java @@ -1,25 +1,22 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jdisc.core; -import com.google.inject.Binding; -import com.google.inject.Guice; -import com.google.inject.Injector; -import com.google.inject.Key; +import com.google.inject.*; import com.yahoo.jdisc.application.ContainerActivator; import com.yahoo.jdisc.application.ContainerBuilder; import com.yahoo.jdisc.application.OsgiFramework; import com.yahoo.jdisc.service.CurrentContainer; import com.yahoo.jdisc.test.NonWorkingOsgiFramework; -import org.junit.Test; +import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.concurrent.ThreadFactory; -import static java.util.Collections.emptyList; -import static org.junit.Assert.assertNotNull; +import org.junit.Test; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertNotNull; /** * @author Simon Thoresen @@ -40,7 +37,8 @@ public class ApplicationEnvironmentModuleTestCase { expected.add(entry.getKey().getTypeLiteral().getRawType()); } - ApplicationLoader loader = new ApplicationLoader(new NonWorkingOsgiFramework(), emptyList()); + ApplicationLoader loader = new ApplicationLoader(new NonWorkingOsgiFramework(), + Collections.emptyList()); injector = Guice.createInjector(new ApplicationEnvironmentModule(loader)); for (Map.Entry, Binding> entry : injector.getBindings().entrySet()) { assertNotNull(expected.remove(entry.getKey().getTypeLiteral().getRawType())); @@ -50,7 +48,8 @@ public class ApplicationEnvironmentModuleTestCase { @Test public void requireThatContainerBuilderCanBeInjected() { - ApplicationLoader loader = new ApplicationLoader(new NonWorkingOsgiFramework(), emptyList()); + ApplicationLoader loader = new ApplicationLoader(new NonWorkingOsgiFramework(), + Collections.emptyList()); assertNotNull(new ApplicationEnvironmentModule(loader).containerBuilder()); assertNotNull(Guice.createInjector(new ApplicationEnvironmentModule(loader)) .getInstance(ContainerBuilder.class)); diff --git a/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java b/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java index 7dca8c45d0b..a5897bea124 100644 --- a/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java +++ b/jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java @@ -70,8 +70,6 @@ public class OsgiLogHandlerTestCase { } @Test - // TODO: Remove deprecation annotation and replace calls to LogRecord.setMillis() when we no longer have to support Java 8 - @SuppressWarnings("deprecation") public void requireThatJdk14PropertiesAreAvailableThroughServiceReference() { MyLogService logService = new MyLogService(); -- cgit v1.2.3