Skip to content

Java 8 lambda definitions can break Guice's internal exception handling #757

@gissuebot

Description

@gissuebot

From abwallis on July 26, 2013 09:10:49

If a @Provides method contains a lambda definition, and an uncaught exception is thrown by the @Provides method, Guice's internal exception handling (UncaughtExceptionHandler) fails with com.google.inject.internal.util.$ComputationException, hiding the underlying cause of the failure and preventing the display of Guice's informative stack trace.
Note that the lambda does not even have to be executed, a user exception can be thrown before the definition of the lambda and will still trigger the failure. Steps to reproduce: 1. Compile and run the attached file.

Guice version: 3.0
JDK version: 1.8.0-ea-b98

Attachment: gist
   Java8LambdaIssue.java

Original issue: http://code.google.com/p/google-guice/issues/detail?id=757

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions