Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guice error message can be misleading: #85

Closed
gissuebot opened this issue Jul 7, 2014 · 2 comments
Closed

Guice error message can be misleading: #85

gissuebot opened this issue Jul 7, 2014 · 2 comments

Comments

@gissuebot
Copy link

From limpbizkit on April 04, 2007 19:43:11

I got this error while preparing my mailing list post:

  1. Error at RealBookService$RealBookShelf.<init>(RealBookService.java:48):
    Could not find a suitable constructor in RealBookService$RealBookShelf.
    Classes must have either one (and only one) constructor annotated with
    @Inject or a zero-argument constructor.

This error doesn't mention the fact that if the offending class is an inner
class, it must be a static inner class. This is nitpicky, but Guice has
very high standards for error messages.

Offtopic - how does one instantaite a non-static inner class reflectively?

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

@gissuebot
Copy link
Author

From crazyboblee on April 04, 2007 16:50:11

We'll definitely fix this.

I typically wouldn't recommend instantiating an inner class reflectively, but if you
really want to, inner classes just take an instance of their outer class in the
constructor (in addition to the other parameters).

@gissuebot
Copy link
Author

From kevinb9n on April 20, 2007 08:30:23

I believe this fixed by r318 , pls verify

Status: Fixed
Owner: kevinb9n
Labels: 1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant