diff options
author | Christian Edward Gruber <cgruber@google.com> | 2013-10-05 14:05:39 -0700 |
---|---|---|
committer | Christian Edward Gruber <cgruber@google.com> | 2013-10-05 14:12:59 -0700 |
commit | ba5acdf7cf1eef418cfdb463991ff76e7f3ded28 (patch) | |
tree | 158aa7c7dc2a0be8899bd6e021442b67ca9f05f8 /pom.xml | |
parent | 2e39ef748a1c4e4dcab506ccfcdb14ca6e01c9c6 (diff) | |
download | guice-ba5acdf7cf1eef418cfdb463991ff76e7f3ded28.tar.gz |
Allow turning off stack trace collection in Guice.
By setting guice_include_stack_traces flag OFF, Guice does not collect stack traces for identifying the declaring source of a binding. Instead it uses the first non-skipped module class name from the modules stack. As a result, in some cases, error messages can be slightly different with this flag. For example, the file name and line number are not always available.
A sample error message with this flag :
Guice creation errors:
1) Received null converting foo (bound at com.google.inject.TypeConversionTest.configure(Unknown Source) (via modules: com.google.inject.TypeConversionTest -> com.google.inject.TypeConversionTest)) to java.util.Date
using CustomConverter which matches only(java.util.Date) (bound at com.google.inject.TypeConversionTest.configure(Unknown Source) (via modules: com.google.inject.TypeConversionTest -> com.google.inject.TypeConversionTest -> com.google.inject.TypeConversionTest)).
while locating java.util.Date annotated with @com.google.inject.TypeConversionTest()
for field at com.google.inject.TypeConversionTest.date(TypeConversionTest.java:478)
at com.google.inject.TypeConversionTest.configure(Unknown Source) (via modules: com.google.inject.TypeConversionTest -> com.google.inject.TypeConversionTest)
This also changes the DEFAULT flag name to ONLY_FOR_DECLARTION_SOURCE.
Adds InternalFlags.getIncludeStackTraceOption() to wrap system property access.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=53610378
Diffstat (limited to 'pom.xml')
-rw-r--r-- | pom.xml | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -273,6 +273,7 @@ See the Apache License Version 2.0 for the specific language governing permissio <version>2.5</version> <configuration> <redirectTestOutputToFile>true</redirectTestOutputToFile> + <!--<argLine>-Dguice_include_stack_traces=OFF</argLine>--> </configuration> </plugin> <!-- |