mrszj / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Improve the toString() of bundled scopes #82

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The Scope javadocs strongly encourage returning a Provider<T> whose
toString() method has been overridden to return something involving the
original Provider's toString() value, but the request and session scopes in
ServletScopes don't do this.

Original issue reported on code.google.com by tpeie...@gmail.com on 22 Mar 2007 at 2:42

GoogleCodeExporter commented 9 years ago
bloody hypocrites we are!

Original comment by kevin...@gmail.com on 22 Mar 2007 at 6:46

GoogleCodeExporter commented 9 years ago
fixed r310.  Thanks Tim.

Original comment by kevin...@gmail.com on 22 Mar 2007 at 4:16

GoogleCodeExporter commented 9 years ago
You're welcome, but wouldn't it be even better to add some additional 
information
about the scoping, e.g.,

    public String toString() { 
        return creator.toString() + "[" + REQUEST.toString() + "]"; 
    }

?

Original comment by tpeie...@gmail.com on 23 Mar 2007 at 5:23

GoogleCodeExporter commented 9 years ago
Just to fix the immediate problem I made it consistent with Scopes.SINGLETON, 
but
yeah, you're certainly correct.

Original comment by kevin...@gmail.com on 23 Mar 2007 at 6:15

GoogleCodeExporter commented 9 years ago
fixed r319.

Original comment by kevin...@gmail.com on 20 Apr 2007 at 3:58