Comment #1 on issue 757 by mccu...@gmail.com: Java 8 lambda definitions can break Guice's internal exception handling
http://code.google.com/p/google-guice/issues/detail?id=757

Note that UncaughtExceptionHandler is actually the JVM's default handler for exceptions not caught in the application, adding a try...catch block around the main method code and printing out the exception reveals:

Exception in thread "main" com.google.inject.internal.util.$ComputationException: java.lang.ArrayIndexOutOfBoundsException: 17665 at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:553) at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:419) at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041) at com.google.inject.internal.util.$StackTraceElements.forMember(StackTraceElements.java:53)
        at com.google.inject.internal.Errors.formatSource(Errors.java:690)
        at com.google.inject.internal.Errors.format(Errors.java:555)
at com.google.inject.ProvisionException.getMessage(ProvisionException.java:59)
        at java.lang.Throwable.getLocalizedMessage(Throwable.java:391)
        at java.lang.Throwable.toString(Throwable.java:480)
        at java.lang.String.valueOf(String.java:2985)
        at java.io.PrintStream.println(PrintStream.java:821)
        at java.lang.Throwable$WrappedPrintStream.println(Throwable.java:748)
        at java.lang.Throwable.printStackTrace(Throwable.java:655)
        at java.lang.Throwable.printStackTrace(Throwable.java:643)
        at java.lang.Throwable.printStackTrace(Throwable.java:634)
        at Java8LambdaIssue.main(Java8LambdaIssue.java:16)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 17665
        at com.google.inject.internal.asm.$ClassReader.readClass(Unknown Source)
        at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
        at com.google.inject.internal.asm.$ClassReader.accept(Unknown Source)
        at 
com.google.inject.internal.util.$LineNumbers.<init>(LineNumbers.java:62)
at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:36) at com.google.inject.internal.util.$StackTraceElements$1.apply(StackTraceElements.java:33) at com.google.inject.internal.util.$MapMaker$StrategyImpl.compute(MapMaker.java:549)
        ... 15 more

Can you try with the "no-aop" flavour of Guice 3? This should avoid the problem as it doesn't use ASM

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-guice-dev+unsubscr...@googlegroups.com.
To post to this group, send email to google-guice-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to