diff --git a/core/src/com/google/inject/internal/MissingImplementationErrorHints.java b/core/src/com/google/inject/internal/MissingImplementationErrorHints.java index 0d689c098a..9a4d1e8ad4 100644 --- a/core/src/com/google/inject/internal/MissingImplementationErrorHints.java +++ b/core/src/com/google/inject/internal/MissingImplementationErrorHints.java @@ -41,7 +41,7 @@ private MissingImplementationErrorHints() {} private static final String WILDCARD_SUPER = "? super "; private static final String WILDCARDS_WARNING = - "\nYou might be running into a @JvmSuppressWildcards or @JvmWildcards issue."; + "\nYou might be running into a @JvmSuppressWildcards or @JvmWildcard issue."; private static final String WILDCARDS_POSSIBLE_FIXES = "\nConsider these options instead (these are guesses but use your best judgment):"; @@ -150,7 +150,7 @@ private static boolean areSimilarTypes( /** * Conceptually, this method converts aType to be like bType by adding - * appropriate @JvmSuppressWildcards or @JvmWildcards annotations. This assumes that the two types + * appropriate @JvmSuppressWildcards or @JvmWildcard annotations. This assumes that the two types * only differ in variance (e.g. `Foo` vs `? extends Foo`) and that aType is implemented in * Kotlin. For example, if this method is called with the (List<? super String>, * List<String>), it will return "List<@JvmSuppressWildcards String>". @@ -169,10 +169,10 @@ static String convertToLatterViaJvmAnnotations(TypeLiteral aType, TypeLiteral conversion.append("@JvmSuppressWildcards "); i += WILDCARD_SUPER.length(); // Skip over the "? super " part } else if (b.startsWith(WILDCARD_EXTENDS, j)) { - conversion.append("@JvmWildcards "); + conversion.append("@JvmWildcard "); j += WILDCARD_EXTENDS.length(); // Skip over the "? extends " part } else if (b.startsWith(WILDCARD_SUPER, j)) { - conversion.append("@JvmWildcards "); + conversion.append("@JvmWildcard "); j += WILDCARD_SUPER.length(); // Skip over the "? super " part } } diff --git a/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_extends_clause.txt b/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_extends_clause.txt index 8eb6f55fa5..660b5eef48 100644 --- a/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_extends_clause.txt +++ b/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_extends_clause.txt @@ -2,10 +2,10 @@ Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Producer was bound. -You might be running into a @JvmSuppressWildcards or @JvmWildcards issue. +You might be running into a @JvmSuppressWildcards or @JvmWildcard issue. Consider these options instead (these are guesses but use your best judgment): * Inject this: Producer<@JvmSuppressWildcards Foo> - * Or bind this: Producer<@JvmWildcards Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.provideProducerOfFoo(MissingImplementationErrorKtTest.kt:52) + * Or bind this: Producer<@JvmWildcard Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.provideProducerOfFoo(MissingImplementationErrorKtTest.kt:52) Requested by: 1 : MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.injectProducerOfFoo(MissingImplementationErrorKtTest.kt:56) diff --git a/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_super_clause.txt b/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_super_clause.txt index 8ef12d5e46..1b960ba341 100644 --- a/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_super_clause.txt +++ b/core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_super_clause.txt @@ -2,10 +2,10 @@ Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Consumer was bound. -You might be running into a @JvmSuppressWildcards or @JvmWildcards issue. +You might be running into a @JvmSuppressWildcards or @JvmWildcard issue. Consider these options instead (these are guesses but use your best judgment): * Inject this: Consumer<@JvmSuppressWildcards Foo> - * Or bind this: Consumer<@JvmWildcards Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.provideConsumerOfFoo(MissingImplementationErrorKtTest.kt:95) + * Or bind this: Consumer<@JvmWildcard Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.provideConsumerOfFoo(MissingImplementationErrorKtTest.kt:95) Requested by: 1 : MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.injectConsumerOfFoo(MissingImplementationErrorKtTest.kt:99) diff --git a/core/test/com/google/inject/errors/testdata/missing_implementation_missing_extends_clause.txt b/core/test/com/google/inject/errors/testdata/missing_implementation_missing_extends_clause.txt index 807b46d68e..ed133f5e3a 100644 --- a/core/test/com/google/inject/errors/testdata/missing_implementation_missing_extends_clause.txt +++ b/core/test/com/google/inject/errors/testdata/missing_implementation_missing_extends_clause.txt @@ -2,9 +2,9 @@ Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Producer was bound. -You might be running into a @JvmSuppressWildcards or @JvmWildcards issue. +You might be running into a @JvmSuppressWildcards or @JvmWildcard issue. Consider these options instead (these are guesses but use your best judgment): - * Inject this: Producer<@JvmWildcards Foo> + * Inject this: Producer<@JvmWildcard Foo> * Or bind this: Producer<@JvmSuppressWildcards Foo> at MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule.configure(MissingImplementationErrorKtTest.kt:114) Requested by: diff --git a/core/test/com/google/inject/errors/testdata/missing_implementation_missing_super_clause.txt b/core/test/com/google/inject/errors/testdata/missing_implementation_missing_super_clause.txt index 69bcb8bf56..3c45df36c8 100644 --- a/core/test/com/google/inject/errors/testdata/missing_implementation_missing_super_clause.txt +++ b/core/test/com/google/inject/errors/testdata/missing_implementation_missing_super_clause.txt @@ -2,9 +2,9 @@ Unable to create injector, see the following errors: 1) [Guice/MissingImplementation]: No implementation for Consumer was bound. -You might be running into a @JvmSuppressWildcards or @JvmWildcards issue. +You might be running into a @JvmSuppressWildcards or @JvmWildcard issue. Consider these options instead (these are guesses but use your best judgment): - * Inject this: Consumer<@JvmWildcards Foo> + * Inject this: Consumer<@JvmWildcard Foo> * Or bind this: Consumer<@JvmSuppressWildcards Foo> at MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule.configure(MissingImplementationErrorKtTest.kt:114) Requested by: diff --git a/core/test/com/google/inject/internal/SimilarLookingTypesTest.java b/core/test/com/google/inject/internal/SimilarLookingTypesTest.java index 4406d437b7..57b7fe1ba7 100644 --- a/core/test/com/google/inject/internal/SimilarLookingTypesTest.java +++ b/core/test/com/google/inject/internal/SimilarLookingTypesTest.java @@ -145,7 +145,7 @@ public void oneTypeConversion() { convertToLatterViaJvmAnnotations( new TypeLiteral>() {}, new TypeLiteral>() {})) - .isEqualTo("java.util.Map<@JvmWildcards java.lang.String, java.lang.Integer>"); + .isEqualTo("java.util.Map<@JvmWildcard java.lang.String, java.lang.Integer>"); } @Test @@ -155,7 +155,7 @@ public void mixedConversion() { new TypeLiteral>() {}, new TypeLiteral>() {})) .isEqualTo( - "java.util.Map<@JvmWildcards java.lang.String," + "java.util.Map<@JvmWildcard java.lang.String," + " @JvmSuppressWildcards java.lang.Integer>"); } @@ -166,7 +166,7 @@ public void complexConversion() { new TypeLiteral, ? super Integer>>() {}, new TypeLiteral, Integer>>() {})) .isEqualTo( - "java.util.Map<@JvmWildcards java.util.List," + "java.util.Map<@JvmWildcard java.util.List," + " @JvmSuppressWildcards java.lang.Integer>"); } }