 Description: Wrap System.getProperty call in case security is enabled
 Author: Stuart McCulloch <mcculls@gmail.com>
 Bug-Google: http://code.google.com/p/google-guice/issues/detail?id=350
-Last-Update: 2013-10-06
+Last-Update: 2013-11-13
 
 diff --git a/core/src/com/google/inject/internal/BytecodeGen.java b/core/src/com/google/inject/internal/BytecodeGen.java
 index ad7764b..f0ebc0a 100644

   /**
    * The options for Guice stack trace collection.
    */
@@ -20,14 +32,6 @@ public class InternalFlags {
 
 
   public static IncludeStackTraceOption getIncludeStackTraceOption() {
-    String propertyValue = System.getProperty(
-        "guice_include_stack_traces");
-    if (IncludeStackTraceOption.OFF.name().equals(propertyValue)) {
-        return IncludeStackTraceOption.OFF;
-    }
-    if (IncludeStackTraceOption.COMPLETE.name().equals(propertyValue)) {
-        return IncludeStackTraceOption.COMPLETE;
-    }
-    return IncludeStackTraceOption.ONLY_FOR_DECLARING_SOURCE;
+    return INCLUDE_STACK_TRACES;
   }
 }

     CacheBuilder<Object, Object> builder = CacheBuilder.newBuilder().weakKeys().weakValues();
     if (!CUSTOM_LOADER_ENABLED) {
       builder.maximumSize(0);
diff --git a/core/src/com/google/inject/internal/InternalFlags.java b/core/src/com/google/inject/internal/InternalFlags.java
index 2c4ed75..31d412d 100644
--- a/core/src/com/google/inject/internal/InternalFlags.java
+++ b/core/src/com/google/inject/internal/InternalFlags.java
@@ -7,6 +7,18 @@ import java.util.logging.Logger;
  */
 public class InternalFlags {
   private final static Logger logger = Logger.getLogger(InternalFlags.class.getName());
+
+  private static final IncludeStackTraceOption INCLUDE_STACK_TRACES;
+  static {
+    IncludeStackTraceOption includeStackTraces;
+    try {
+      includeStackTraces = parseIncludeStackTraceOption();
+    } catch (Throwable e) {
+      includeStackTraces = IncludeStackTraceOption.ONLY_FOR_DECLARING_SOURCE;
+    }
