Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public abstract class AbstractBindingBuilder<T> {
public static final String SCOPE_ALREADY_SET = "Scope is set more than once.";
public static final String BINDING_TO_NULL =
"Binding to null instances is not allowed. "
+ "Use toProvider(Providers.of(null)) if this is your intended behaviour.";
+ "Use toProvider(() -> null) if this is your intended behaviour.";
public static final String CONSTANT_VALUE_ALREADY_SET = "Constant value is set more than once.";
public static final String ANNOTATION_ALREADY_SPECIFIED =
"More than one annotation is specified for this binding.";
Expand Down
4 changes: 2 additions & 2 deletions core/test/com/google/inject/BinderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ public void configure() {
} catch (CreationException expected) {
assertContains(
expected.getMessage(),
"1) Binding to null instances is not allowed. Use toProvider(Providers.of(null))",
"2) Binding to null instances is not allowed. Use toProvider(Providers.of(null))");
"1) Binding to null instances is not allowed. Use toProvider(() -> null)",
"2) Binding to null instances is not allowed. Use toProvider(() -> null)");
}
}

Expand Down
Loading