Hi Jesse,

Thanks for the update. Didn't realise that there was a precedent for
using a Java system property to configure the behaviour of Guice.
If it's not possible to include this in the public GA release, would
very much like to take up your kind offer of a patch providing the
ability to disable this check via a System property (or similar).
We can then use this as an interim solution until all of our customers
have been able to change their code to add the @Inject annotation to
private constructors.

Incidentally, worth noting that this issue has come up in the Spring
community too, as Spring does support construction of objects with
private constructors - see, for example
http://forum.springframework.org/showpost.php?p=92418&postcount=7 .

Many thanks,

Eoin.


On Jan 28, 4:26 am, "[email protected]" <[email protected]> wrote:
> On Jan 27, 9:00 am, nimbus <[email protected]> wrote:
>
> > Understand that adding the option may not be the most desirable course
> > of action at this stage. Also, saw the recent message from Jesse (in
> > the thread on the Guice 2 release schedule) that the API should now be
> > considered as frozen,.
>
> > Obviously,  my preference would be to remove the change in order to
> > preserve contract compatibility with Guice 1. Also note that the
> > request was originally closed with status "WontFix" for this reason,
> > and was only later re-opened and implemented.
>
> > So, is there any possibility of removing the change now ?
>
> If we were to permit this, it would probably take the form of a Java
> system property, like we did to allow 'null' before we had the
> @Nullable annotation.
>
> That approach is quite clumsy because it means we have to test
> everything twice, once with the flag and once without it. Sometimes
> you forget to set the property, or don't set it soon enough in the
> execution of the program, and things don't work the way they should.
>
> So I prefer to avoid system properties when I can. It seems like using
> a patched .jar would probably be easier. You eliminate the runtime
> configuration hassle of setting the property, and it's much more
> obvious from the classpath that you're not using the standard Guice
> behaviour.
>
> If you'd like, I provide the patch and instructions for using it to
> build a .jar.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"google-guice" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to