From b1945fe6ecc62dc245cd77ec5e2d343db2ddd893 Mon Sep 17 00:00:00 2001 From: Googler Date: Wed, 20 Apr 2016 17:31:23 +0000 Subject: Switch from relying on the Guice-specific annotations to the JSR-330 standard annotations. -- MOS_MIGRATED_REVID=120351013 --- .../junitrunner/java/com/google/testing/junit/runner/internal/BUILD | 2 +- .../com/google/testing/junit/runner/internal/SignalHandlers.java | 6 +++--- .../java/com/google/testing/junit/runner/internal/Stderr.java | 6 +++--- .../java/com/google/testing/junit/runner/internal/Stdout.java | 6 +++--- .../junitrunner/java/com/google/testing/junit/runner/junit4/BUILD | 1 + .../java/com/google/testing/junit/runner/junit4/TopLevelSuite.java | 6 +++--- .../java/com/google/testing/junit/runner/junit4/Xml.java | 6 +++--- 7 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src/java_tools/junitrunner/java/com') diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/BUILD b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/BUILD index 696fd36cea..149420bbff 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/BUILD +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/BUILD @@ -5,9 +5,9 @@ java_library( srcs = glob(["*.java"]), deps = [ "//third_party:guava", - "//third_party:guice", "//third_party:joda_time", "//third_party:jsr305", + "//third_party:jsr330_inject", "//third_party:junit4", ], ) diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/SignalHandlers.java b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/SignalHandlers.java index c1573d5a78..fb146ea8e8 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/SignalHandlers.java +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/SignalHandlers.java @@ -14,13 +14,13 @@ package com.google.testing.junit.runner.internal; -import com.google.inject.Inject; - import sun.misc.Signal; import sun.misc.SignalHandler; import java.util.concurrent.atomic.AtomicReference; +import javax.inject.Inject; + /** * Helper class to install signal handlers. */ @@ -74,7 +74,7 @@ public class SignalHandlers { */ public interface HandlerInstaller { /** - * @see sun.misc.Signal#handle(sun.misc.Signal, sun.misc.SignalHandler) + * @see sun.misc.Signal#handle(sun.misc.Signal, sun.misc.SignalHandler) */ SignalHandler install(Signal signal, SignalHandler handler); } diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stderr.java b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stderr.java index 80b37eb0d0..d7c7db9bf6 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stderr.java +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stderr.java @@ -14,18 +14,18 @@ package com.google.testing.junit.runner.internal; -import com.google.inject.BindingAnnotation; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import javax.inject.Qualifier; + /** * Binding annotation for a {@link java.io.PrintStream} printing to stderr. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.PARAMETER, ElementType.METHOD}) -@BindingAnnotation +@Qualifier public @interface Stderr { } diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stdout.java b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stdout.java index 051968bc98..3f8174d422 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stdout.java +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stdout.java @@ -14,18 +14,18 @@ package com.google.testing.junit.runner.internal; -import com.google.inject.BindingAnnotation; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import javax.inject.Qualifier; + /** * Binding annotation for a {@link java.io.PrintStream} printing to stdout. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.PARAMETER, ElementType.METHOD}) -@BindingAnnotation +@Qualifier public @interface Stdout { } diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/BUILD b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/BUILD index a9a1f8632d..0141b76a3c 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/BUILD +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/BUILD @@ -25,6 +25,7 @@ java_library( "//third_party:guice", "//third_party:joda_time", "//third_party:jsr305", + "//third_party:jsr330_inject", "//third_party:junit4", ], ) diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/TopLevelSuite.java b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/TopLevelSuite.java index 7f9d720daa..13b5b083bb 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/TopLevelSuite.java +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/TopLevelSuite.java @@ -14,18 +14,18 @@ package com.google.testing.junit.runner.junit4; -import com.google.inject.BindingAnnotation; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import javax.inject.Qualifier; + /** * Binding annotation for an object that represents the top-level suite. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.PARAMETER, ElementType.METHOD}) -@BindingAnnotation +@Qualifier @interface TopLevelSuite { } diff --git a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/Xml.java b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/Xml.java index d531b2b288..1cff1de139 100644 --- a/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/Xml.java +++ b/src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/Xml.java @@ -14,19 +14,19 @@ package com.google.testing.junit.runner.junit4; -import com.google.inject.BindingAnnotation; - import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import javax.inject.Qualifier; + /** * Binding annotation that indicates that the given {@code String} or stream * represents XML. */ @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.PARAMETER, ElementType.METHOD}) -@BindingAnnotation +@Qualifier @interface Xml { } -- cgit v1.2.3