Comment #9 on issue 757 by [email protected]: Java 8 lambda definitions can
break Guice's internal exception handling
http://code.google.com/p/google-guice/issues/detail?id=757
FYI using ASM 5.0_BETA with a patched version of cglib (see Issue 759)
produces the expected stack trace:
Exception in thread "main" com.google.inject.ProvisionException: Guice
provision errors:
1) Error in custom provider, java.lang.IllegalStateException: Something
went wrong
at
Java8LambdaIssue$LambdaIssueModule.createExecutor(Java8LambdaIssue.java:23)
while locating java.util.concurrent.Executor
1 error
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1009)
at
com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1035)
at Java8LambdaIssue.main(Java8LambdaIssue.java:14)
Caused by: java.lang.IllegalStateException: Something went wrong
at
Java8LambdaIssue$LambdaIssueModule.createExecutor(Java8LambdaIssue.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:491)
at
com.google.inject.internal.ProviderMethod.get(ProviderMethod.java:105)
at
com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
at
com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
at
com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:66)
at
com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:47)
at
com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1000)
at
com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1050)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:996)
... 2 more
If you want to experiment with this solution, it's available on central as
sisu-guice 3.1.8:
https://github.com/sonatype/sisu-guice # README explains differences
wrt. google-guice
http://search.maven.org/#artifactdetails%7Corg.sonatype.sisu%7Csisu-guice%7C3.1.8%7Cjar
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice-dev.
For more options, visit https://groups.google.com/groups/opt_out.