aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Googler <noreply@google.com>2016-04-20 17:31:23 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2016-04-21 10:57:46 +0000
commitb1945fe6ecc62dc245cd77ec5e2d343db2ddd893 (patch)
tree790edb430901fec371c7abcab2a02eaa3a766c8c
parentead2be4eb2ad5a241fcab8f675d83ecb034fff9f (diff)
Switch from relying on the Guice-specific annotations to the JSR-330 standard annotations.
-- MOS_MIGRATED_REVID=120351013
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/BUILD2
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/SignalHandlers.java6
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stderr.java6
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/internal/Stdout.java6
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/BUILD1
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/TopLevelSuite.java6
-rw-r--r--src/java_tools/junitrunner/java/com/google/testing/junit/runner/junit4/Xml.java6
7 files changed, 17 insertions, 16 deletions
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 {
}