Issue 184 in google-gin: Unexpected error while using a private inner module: "Unable to inject an instance of XXX because it is a private class."

58 views
Skip to first unread message

googl...@googlecode.com

unread,
Feb 1, 2013, 6:48:06 PM2/1/13
to googl...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 184 by gok...@google.com: Unexpected error while using a private
inner module: "Unable to inject an instance of XXX because it is a private
class."
http://code.google.com/p/google-gin/issues/detail?id=184

What steps will reproduce the problem?
Change visibility of GinMapBinder.MultimapModule to private.


What is the expected output? What do you see instead?
It is a compilation error where it shouldn't be.


What version of the product are you using? On what operating system?
HEAD


Please provide any additional information below.

Following is the stack trace, it looks like it is using a common utility
where it shouldn't.

> E.Rebinding
> com.google.gwt.inject.client.multibindings.GinMultibinderTest.GinjectorWithRegularBind
> Invoking generator com.google.gwt.inject.rebind.GinjectorGenerator
> [ERROR] Generator 'com.google.gwt.inject.rebind.GinjectorGenerator'
> threw an exception while
> rebinding 'com.google.gwt.inject.client.multibindings.GinMultibinderTest.GinjectorWithRegularBind'
> java.lang.IllegalArgumentException: Unable to inject an instance of
> com.google.gwt.inject.client.multibindings.GinMultibinder$SetModule
> because it is a private class.
> at
> com.google.gwt.inject.rebind.reflect.ReflectUtil.getClassPackageNames(ReflectUtil.java:237)
> at
> com.google.gwt.inject.rebind.reflect.ReflectUtil.getTypePackageNames(ReflectUtil.java:218)
> at
> com.google.gwt.inject.rebind.reflect.ReflectUtil.getUserPackageName(ReflectUtil.java:152)
> at
> com.google.gwt.inject.rebind.output.GinjectorBindingsOutputter.write(GinjectorBindingsOutputter.java:105)
> at
> com.google.gwt.inject.rebind.output.GinjectorImplOutputter.writeInjectorHierarchy(GinjectorImplOutputter.java:128)
> at
> com.google.gwt.inject.rebind.output.GinjectorImplOutputter.writeInjectorHierarchy(GinjectorImplOutputter.java:125)
> at
> com.google.gwt.inject.rebind.output.GinjectorImplOutputter.write(GinjectorImplOutputter.java:115)
> at
> com.google.gwt.inject.rebind.GinjectorGeneratorImpl.generate(GinjectorGeneratorImpl.java:80)
> at
> com.google.gwt.inject.rebind.GinjectorGenerator.generate(GinjectorGenerator.java:74)
> at
> com.google.gwt.core.ext.IncrementalGenerator.generateNonIncrementally(IncrementalGenerator.java:40)
> at
> com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:657)
> at
> com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:41)
> at
> com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:79)
> at
> com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:276)
> at
> com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:141)
> at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595)
> at
> com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:465)
> at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49)
> at com.google.gwt.core.shared.GWT.create(GWT.java:57)
> at com.google.gwt.core.client.GWT.create(GWT.java:85)
> at
> com.google.gwt.inject.client.multibindings.GinMultibinderTest.testInject_sameInterfaceBoundWithBothRegularAndMultiBind(GinMultibinderTest.java:161)
> at
> com.google.gwt.inject.client.multibindings.__GinMultibinderTest_unitTestImpl.doRunTest(__GinMultibinderTest_unitTestImpl.java:22)
> at junit.framework.TestCase.runTest(TestCase.java:62)
> at com.google.gwt.junit.client.GWTTestCase.runBare(GWTTestCase.java:188)
> at
> com.google.gwt.junit.client.GWTTestCase.__doRunTest(GWTTestCase.java:129)
> at com.google.gwt.junit.client.impl.GWTRunner.runTest(GWTRunner.java:390)
> at
> com.google.gwt.junit.client.impl.GWTRunner.doRunTest(GWTRunner.java:318)
> at
> com.google.gwt.junit.client.impl.GWTRunner.access$9(GWTRunner.java:312)
> at
> com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:107)
> at
> com.google.gwt.junit.client.impl.GWTRunner$TestBlockListener.onSuccess(GWTRunner.java:1)
> at
> com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:232)
> at
> com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
> at
> com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
> at sun.reflect.GeneratedMethodAccessor46.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
> at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
> at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
> at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
> at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
> at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
> at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
> at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
> at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:249)
> at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
> at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
> at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)
> at java.lang.Thread.run(Thread.java:722)
> [ERROR] Deferred binding failed for
> 'com.google.gwt.inject.client.multibindings.GinMultibinderTest.GinjectorWithRegularBind';
> expect
> subsequent failures


Reply all
Reply to author
Forward
0 new messages