Issue 15 in project google-guice

8 views
Skip to first unread message

codesite...@google.com

unread,
Apr 7, 2007, 10:43:50 PM4/7/07
to google...@googlegroups.com
Issue 15: Make circular dependencies involving constructors more robust
http://code.google.com/p/google-guice/issues/detail?id=15

Comment #1 by bslesinsky:
I wonder if that has anything to do with this error?

java.lang.RuntimeException: java.lang.IllegalAccessException: Class
com.google.inject.ConstructionContext$DelegatingInvocationHandler can not access a
member of class CyclesGuiceTest$Writable with modifiers "public abstract"
at
com.google.inject.ConstructionContext$DelegatingInvocationHandler.invoke(ConstructionContext.java:114)
at $Proxy5.write(Unknown Source)
at CyclesGuiceTest$Node.write(CyclesGuiceTest.java:97)
at CyclesGuiceTest$Node.write(CyclesGuiceTest.java:97)
at CyclesGuiceTest.testWithGuice(CyclesGuiceTest.java:18)

I was checking to see what happened when I put in a cycle using only constructors. I
assumed that at some point there would be an error saying "you can't do that" and I
would make backlinks into setters, and ran into this undocumented (?) proxy thing.
Maybe the real error is that this is not a Helpful Error Message.


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Apr 7, 2007, 11:56:07 PM4/7/07
to google...@googlegroups.com
Issue 15: Make circular dependencies involving constructors more robust
http://code.google.com/p/google-guice/issues/detail?id=15

Comment #2 by crazyboblee:
This appears to be a Sun bug related to inner classes:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4071957

codesite...@google.com

unread,
Apr 7, 2007, 11:59:34 PM4/7/07
to google...@googlegroups.com
Issue 15: Make circular dependencies involving constructors more robust
http://code.google.com/p/google-guice/issues/detail?id=15

Comment #3 by crazyboblee:
We do need better error handling here though. There's actually a TODO in the code:
http://fisheye3.cenqua.com/browse/google-guice/trunk/src/com/google/inject/ConstructionContext.java?r=253

codesite...@google.com

unread,
Apr 8, 2007, 12:16:29 AM4/8/07
to google...@googlegroups.com
Issue 15: Make circular dependencies involving constructors more robust
http://code.google.com/p/google-guice/issues/detail?id=15

Comment #4 by bslesinsky:
While cleaning up the test case, I found that adding "public" in a few places fixed
the problem.

So, it's nothing really to do with cycles. But I was surprised that when I moved
some dependencies from constructors to setters to break cycles, so that no proxy is
really necessary, they are still there.

Reply all
Reply to author
Forward
0 new messages