Skip to content

Instantly share code, notes, and snippets.

@gissuebot
Created July 7, 2014 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gissuebot/485881a340c85503e985 to your computer and use it in GitHub Desktop.
Save gissuebot/485881a340c85503e985 to your computer and use it in GitHub Desktop.
Migrated attachment for Guice issue 143, comment 1
--- src/com/google/inject/CreationException.java (revision 345)
+++ src/com/google/inject/CreationException.java Thu Aug 23 10:35:19 CEST 2007
@@ -38,7 +38,7 @@
/**
* Constructs a new exception for the given errors.
*/
- public CreationException(Collection<Message> errorMessages) {
+ public CreationException(Collection<? extends Message> errorMessages) {
super();
// Sort the messages by source.
@@ -67,7 +67,7 @@
/**
* Gets the error messages which resulted in this exception.
*/
- public Collection<Message> getErrorMessages() {
+ public Collection<? extends Message> getErrorMessages() {
return Collections.unmodifiableCollection(errorMessages);
}
}
--- src/com/google/inject/InjectorImpl.java (revision 345)
+++ src/com/google/inject/InjectorImpl.java Thu Aug 23 10:35:19 CEST 2007
@@ -113,7 +113,7 @@
}
// not test-covered
- public <T> List<Binding<T>> findBindingsByType(TypeLiteral<T> type) {
+ public <T> List<? extends Binding<T>> findBindingsByType(TypeLiteral<T> type) {
return Collections.<Binding<T>>unmodifiableList(
bindingsMultimap.getAll(type));
}
@@ -430,7 +430,7 @@
bindingsForThisType.add(binding);
}
- public <T> List<BindingImpl<T>> getAll(TypeLiteral<T> type) {
+ public <T> List<? extends BindingImpl<T>> getAll(TypeLiteral<T> type) {
List<BindingImpl<T>> list = getFromMap(type);
return list == null ? Collections.<BindingImpl<T>>emptyList() : list;
}
--- src/com/google/inject/Guice.java (revision 345)
+++ src/com/google/inject/Guice.java Thu Aug 23 10:31:38 CEST 2007
@@ -65,7 +65,7 @@
* @throws CreationException if one or more errors occur during Injector
* construction
*/
- public static Injector createInjector(Iterable<Module> modules) {
+ public static Injector createInjector(Iterable<? extends Module> modules) {
return createInjector(Stage.DEVELOPMENT, modules);
}
@@ -87,7 +87,7 @@
* @throws CreationException if one or more errors occur during Injector
* construction
*/
- public static Injector createInjector(Stage stage, Iterable<Module> modules) {
+ public static Injector createInjector(Stage stage, Iterable<? extends Module> modules) {
BinderImpl binder = new BinderImpl(stage);
for (Module module : modules) {
binder.install(module);
--- src/com/google/inject/Injector.java (revision 345)
+++ src/com/google/inject/Injector.java Thu Aug 23 10:32:07 CEST 2007
@@ -77,7 +77,7 @@
* Finds all bindings to the given type. This method is part of the Injector
* Introspection API and is primarily intended for use by tools.
*/
- <T> List<Binding<T>> findBindingsByType(TypeLiteral<T> type);
+ <T> List<? extends Binding<T>> findBindingsByType(TypeLiteral<T> type);
/**
* Returns the provider used to obtain instances for the given injection key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment