Author: limpbizkit
Date: Mon Oct 20 19:26:01 2008
New Revision: 646

Modified:
    tags/snapshot20081016/src/com/google/inject/internal/Errors.java

Log:
Snapshot tweaks for better backwards compatibility and error reporting...

Modified: tags/snapshot20081016/src/com/google/inject/internal/Errors.java
==============================================================================
--- tags/snapshot20081016/src/com/google/inject/internal/Errors.java     
(original)
+++ tags/snapshot20081016/src/com/google/inject/internal/Errors.java    Mon  
Oct 20 19:26:01 2008
@@ -50,8 +50,9 @@
  public final class Errors implements Serializable {

    // TODO(kevinb): gee, ya think we might want to remove this?
-  private static final boolean allowNullsBadBadBad
-      = "I'm a bad  
hack".equals(System.getProperty("guice.allow.nulls.bad.bad.bad"));
+  private static boolean allowNullsBadBadBad() {
+    return "I'm a bad  
hack".equals(System.getProperty("guice.allow.nulls.bad.bad.bad"));
+  }

    private List<Message> errors;
    private final List<Object> sources;
@@ -381,8 +382,9 @@
              } else {
                throw new AssertionError();
              }
+          } else {
+            fmt.format("  while locating %s%n",  
convert(dependency.getKey()));
            }
-          continue;
          }

          fmt.format("  at %s%n", sourceToString(source));
@@ -402,7 +404,7 @@
        throws ErrorsException {
      if (value != null
          || dependency.isNullable()
-        || allowNullsBadBadBad) {
+        || allowNullsBadBadBad()) {
        return value;
      }


--~--~---------~--~----~------------~-------~--~----~
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