Comment #10 on issue 72 by nimbus4321: Injector does not respect  
constructor's private visibility
http://code.google.com/p/google-guice/issues/detail?id=72

In order to ensure backwards compatibility with code developed using Guice  
1, would
it be possible to have a means of switching off this check ? i.e. So that  
the new
behaviour would be the default in Guice 2, but could be disabled for maximum
compatibility with code bases developed against Guice 1.

Background to this request:
I came across the new check when testing the codebase for the product I'm  
working on
against guice-snapshot20081123. There are several public classes with  
private
constructors in the codebase that are instantiated using Guice. So, this  
new check
means that Guice 2 is not a "drop-in" replacement for Guice 1 in the  
codebase  - i.e.
to use Guice 2, the codebase would have to be changed so that the  
constructors are
annotated with @Inject.

While this change to the product codebase could be made, there is another  
issue for
us. Guice is also used as part of an extension mechanism for the product,  
so that
customers can extend and customize it to meet their own requirements. So,  
some
customers also have public classes with private constructors that are  
instantiated
via Guice 1. We would like to move the product on to Guice 2 in a  
forthcoming release
in order to take advantage of some of the great new Guice 2 features.  
However, it
will greatly complicate the product upgrade process if we have to ask
our customers to make changes to their codebase (i.e. add the @Inject  
annotation to
private constructors) in order to take the upgrade.




--
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

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice-dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to