Skip to content

Commit 21381e3

Browse files
java-team-github-botGuice Team
authored andcommitted
Fix typo JvmWildcards -> JvmWildcard
PiperOrigin-RevId: 698484191
1 parent 74ec25c commit 21381e3

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

core/src/com/google/inject/internal/MissingImplementationErrorHints.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ private MissingImplementationErrorHints() {}
4141
private static final String WILDCARD_SUPER = "? super ";
4242

4343
private static final String WILDCARDS_WARNING =
44-
"\nYou might be running into a @JvmSuppressWildcards or @JvmWildcards issue.";
44+
"\nYou might be running into a @JvmSuppressWildcards or @JvmWildcard issue.";
4545

4646
private static final String WILDCARDS_POSSIBLE_FIXES =
4747
"\nConsider these options instead (these are guesses but use your best judgment):";
@@ -150,7 +150,7 @@ private static boolean areSimilarTypes(
150150

151151
/**
152152
* Conceptually, this method converts aType to be like bType by adding
153-
* appropriate @JvmSuppressWildcards or @JvmWildcards annotations. This assumes that the two types
153+
* appropriate @JvmSuppressWildcards or @JvmWildcard annotations. This assumes that the two types
154154
* only differ in variance (e.g. `Foo` vs `? extends Foo`) and that aType is implemented in
155155
* Kotlin. For example, if this method is called with the (List<? super String>,
156156
* List<String>), it will return "List<@JvmSuppressWildcards String>".
@@ -169,10 +169,10 @@ static String convertToLatterViaJvmAnnotations(TypeLiteral<?> aType, TypeLiteral
169169
conversion.append("@JvmSuppressWildcards ");
170170
i += WILDCARD_SUPER.length(); // Skip over the "? super " part
171171
} else if (b.startsWith(WILDCARD_EXTENDS, j)) {
172-
conversion.append("@JvmWildcards ");
172+
conversion.append("@JvmWildcard ");
173173
j += WILDCARD_EXTENDS.length(); // Skip over the "? extends " part
174174
} else if (b.startsWith(WILDCARD_SUPER, j)) {
175-
conversion.append("@JvmWildcards ");
175+
conversion.append("@JvmWildcard ");
176176
j += WILDCARD_SUPER.length(); // Skip over the "? super " part
177177
}
178178
}

core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_extends_clause.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Unable to create injector, see the following errors:
22

33
1) [Guice/MissingImplementation]: No implementation for Producer<? extends Foo> was bound.
44

5-
You might be running into a @JvmSuppressWildcards or @JvmWildcards issue.
5+
You might be running into a @JvmSuppressWildcards or @JvmWildcard issue.
66
Consider these options instead (these are guesses but use your best judgment):
77
* Inject this: Producer<@JvmSuppressWildcards Foo>
8-
* Or bind this: Producer<@JvmWildcards Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.provideProducerOfFoo(MissingImplementationErrorKtTest.kt:52)
8+
* Or bind this: Producer<@JvmWildcard Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.provideProducerOfFoo(MissingImplementationErrorKtTest.kt:52)
99

1010
Requested by:
1111
1 : MissingImplementationErrorKtTest$InjectionHasUnnecessaryExtendsClauseModule.injectProducerOfFoo(MissingImplementationErrorKtTest.kt:56)

core/test/com/google/inject/errors/testdata/missing_implementation_has_unnecessary_super_clause.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Unable to create injector, see the following errors:
22

33
1) [Guice/MissingImplementation]: No implementation for Consumer<? super Foo> was bound.
44

5-
You might be running into a @JvmSuppressWildcards or @JvmWildcards issue.
5+
You might be running into a @JvmSuppressWildcards or @JvmWildcard issue.
66
Consider these options instead (these are guesses but use your best judgment):
77
* Inject this: Consumer<@JvmSuppressWildcards Foo>
8-
* Or bind this: Consumer<@JvmWildcards Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.provideConsumerOfFoo(MissingImplementationErrorKtTest.kt:95)
8+
* Or bind this: Consumer<@JvmWildcard Foo> at MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.provideConsumerOfFoo(MissingImplementationErrorKtTest.kt:95)
99

1010
Requested by:
1111
1 : MissingImplementationErrorKtTest$InjectionHasUnnecessarySuperClauseModule.injectConsumerOfFoo(MissingImplementationErrorKtTest.kt:99)

core/test/com/google/inject/errors/testdata/missing_implementation_missing_extends_clause.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Unable to create injector, see the following errors:
22

33
1) [Guice/MissingImplementation]: No implementation for Producer<Foo> was bound.
44

5-
You might be running into a @JvmSuppressWildcards or @JvmWildcards issue.
5+
You might be running into a @JvmSuppressWildcards or @JvmWildcard issue.
66
Consider these options instead (these are guesses but use your best judgment):
7-
* Inject this: Producer<@JvmWildcards Foo>
7+
* Inject this: Producer<@JvmWildcard Foo>
88
* Or bind this: Producer<@JvmSuppressWildcards Foo> at MissingImplementationErrorKtTest$InjectionMissingExtendsClauseModule.configure(MissingImplementationErrorKtTest.kt:114)
99

1010
Requested by:

core/test/com/google/inject/errors/testdata/missing_implementation_missing_super_clause.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ Unable to create injector, see the following errors:
22

33
1) [Guice/MissingImplementation]: No implementation for Consumer<Foo> was bound.
44

5-
You might be running into a @JvmSuppressWildcards or @JvmWildcards issue.
5+
You might be running into a @JvmSuppressWildcards or @JvmWildcard issue.
66
Consider these options instead (these are guesses but use your best judgment):
7-
* Inject this: Consumer<@JvmWildcards Foo>
7+
* Inject this: Consumer<@JvmWildcard Foo>
88
* Or bind this: Consumer<@JvmSuppressWildcards Foo> at MissingImplementationErrorKtTest$InjectionMissingSuperClauseModule.configure(MissingImplementationErrorKtTest.kt:114)
99

1010
Requested by:

core/test/com/google/inject/internal/SimilarLookingTypesTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void oneTypeConversion() {
145145
convertToLatterViaJvmAnnotations(
146146
new TypeLiteral<Map<String, Integer>>() {},
147147
new TypeLiteral<Map<? extends String, Integer>>() {}))
148-
.isEqualTo("java.util.Map<@JvmWildcards java.lang.String, java.lang.Integer>");
148+
.isEqualTo("java.util.Map<@JvmWildcard java.lang.String, java.lang.Integer>");
149149
}
150150

151151
@Test
@@ -155,7 +155,7 @@ public void mixedConversion() {
155155
new TypeLiteral<Map<String, ? extends Integer>>() {},
156156
new TypeLiteral<Map<? extends String, Integer>>() {}))
157157
.isEqualTo(
158-
"java.util.Map<@JvmWildcards java.lang.String,"
158+
"java.util.Map<@JvmWildcard java.lang.String,"
159159
+ " @JvmSuppressWildcards java.lang.Integer>");
160160
}
161161

@@ -166,7 +166,7 @@ public void complexConversion() {
166166
new TypeLiteral<Map<List<? extends String>, ? super Integer>>() {},
167167
new TypeLiteral<Map<? extends List<? extends String>, Integer>>() {}))
168168
.isEqualTo(
169-
"java.util.Map<@JvmWildcards java.util.List<out java.lang.String>,"
169+
"java.util.Map<@JvmWildcard java.util.List<out java.lang.String>,"
170170
+ " @JvmSuppressWildcards java.lang.Integer>");
171171
}
172172
}

0 commit comments

Comments
 (0)