aboutsummaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/test/java/com/yahoo/jdisc/core
diff options
context:
space:
mode:
authorgjoranv <gjoranv@gmail.com>2018-05-02 10:27:09 +0200
committerGitHub <noreply@github.com>2018-05-02 10:27:09 +0200
commit2680d03d7160d97be2ae85429e7c457160b056fe (patch)
treefd0112e1748ba73c0efb95dbd6be52c43b04740d /jdisc_core/src/test/java/com/yahoo/jdisc/core
parent5a47ec87c934f42f66700437c9541ee5be7b669f (diff)
Revert "Gjoranv/java9 prep 05"
Diffstat (limited to 'jdisc_core/src/test/java/com/yahoo/jdisc/core')
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/core/ApplicationEnvironmentModuleTestCase.java17
-rw-r--r--jdisc_core/src/test/java/com/yahoo/jdisc/core/OsgiLogHandlerTestCase.java2
2 files changed, 8 insertions, 11 deletions
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 <a href="mailto:simon@yahoo-inc.com">Simon Thoresen</a>
@@ -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.<Module>emptyList());
injector = Guice.createInjector(new ApplicationEnvironmentModule(loader));
for (Map.Entry<Key<?>, 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.<Module>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();