Author: limpbizkit
Date: Thu Feb 26 22:04:40 2009
New Revision: 870

Modified:
    trunk/src/com/google/inject/spi/Elements.java

Log:
Installing a null module currently gives a lame error message; this one's  
better

Modified: trunk/src/com/google/inject/spi/Elements.java
==============================================================================
--- trunk/src/com/google/inject/spi/Elements.java       (original)
+++ trunk/src/com/google/inject/spi/Elements.java       Thu Feb 26 22:04:40 2009
@@ -37,6 +37,7 @@
  import com.google.inject.internal.ImmutableList;
  import com.google.inject.internal.Lists;
  import static com.google.inject.internal.Preconditions.checkArgument;
+import static com.google.inject.internal.Preconditions.checkNotNull;
  import static com.google.inject.internal.Preconditions.checkState;
  import com.google.inject.internal.PrivateElementsImpl;
  import com.google.inject.internal.ProviderMethodsModule;
@@ -181,6 +182,8 @@
      }

      public void install(Module module) {
+      checkNotNull(module, "module");
+
        if (modules.add(module)) {
          Binder binder = this;
          if (module instanceof PrivateModule) {

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to