Created
April 4, 2014 19:52
-
-
Save stevenschlansker/9981948 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException | |
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) | |
at com.google.common.cache.LocalCache.get(LocalCache.java:3934) | |
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) | |
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) | |
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) | |
at com.google.inject.internal.util.StackTraceElements.forMember(StackTraceElements.java:66) | |
at com.google.inject.internal.Errors.formatInjectionPoint(Errors.java:790) | |
at com.google.inject.internal.Errors.formatSource(Errors.java:752) | |
at com.google.inject.internal.Errors.formatSource(Errors.java:743) | |
at com.google.inject.internal.Errors.format(Errors.java:569) | |
at com.google.inject.CreationException.getMessage(CreationException.java:50) | |
at java.lang.Throwable.getLocalizedMessage(Throwable.java:391) | |
at java.lang.Throwable.toString(Throwable.java:480) | |
at java.lang.String.valueOf(String.java:2979) | |
at java.lang.StringBuilder.append(StringBuilder.java:131) | |
at java.lang.Throwable.printEnclosedStackTrace(Throwable.java:695) | |
at java.lang.Throwable.printStackTrace(Throwable.java:667) | |
at java.lang.Throwable.printStackTrace(Throwable.java:721) | |
at org.junit.runner.notification.Failure.getTrace(Failure.java:71) | |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestListener.testFailure(JUnit4TestListener.java:91) | |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestListener.testFailure(JUnit4TestListener.java:69) | |
at org.junit.runner.notification.RunNotifier$4.notifyListener(RunNotifier.java:139) | |
at org.junit.runner.notification.RunNotifier$SafeNotifier.run(RunNotifier.java:61) | |
at org.junit.runner.notification.RunNotifier.fireTestFailures(RunNotifier.java:134) | |
at org.junit.runner.notification.RunNotifier.fireTestFailure(RunNotifier.java:128) | |
at org.junit.internal.runners.model.EachTestNotifier.addFailure(EachTestNotifier.java:23) | |
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:275) | |
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) | |
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) | |
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) | |
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) | |
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) | |
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) | |
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) | |
at org.junit.runners.ParentRunner.run(ParentRunner.java:309) | |
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) | |
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) | |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) | |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) | |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) | |
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) | |
Caused by: java.lang.RuntimeException | |
at com.google.inject.internal.asm.$MethodVisitor.visitParameter(Unknown Source) | |
at com.google.inject.internal.asm.$ClassReader.b(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:65) | |
at com.google.inject.internal.util.StackTraceElements$1.load(StackTraceElements.java:46) | |
at com.google.inject.internal.util.StackTraceElements$1.load(StackTraceElements.java:43) | |
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) | |
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) | |
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) | |
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) | |
... 40 more |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Collections; | |
import java.util.UUID; | |
import com.google.inject.AbstractModule; | |
import com.google.inject.Guice; | |
import com.google.inject.Inject; | |
import com.google.inject.Provider; | |
import com.google.inject.ProvisionException; | |
import org.junit.Test; | |
public class TestGuice757 | |
{ | |
@Test(expected=ProvisionException.class) | |
public void testGuice757ExceptionTrace() | |
{ | |
Guice.createInjector(new AbstractModule() { | |
@Override | |
protected void configure() | |
{ | |
bind (String.class).toProvider(WatProvider.class); | |
} | |
}); | |
} | |
public static class WatProvider implements Provider<String> | |
{ | |
private final UUID wat; | |
@Inject | |
WatProvider(UUID wat) { | |
this.wat = wat; | |
} | |
@Override | |
public String get() | |
{ | |
Collections.singleton(wat).forEach(UUID::toString); | |
return wat.toString(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment