sberlin commented on revision r1324 in project google-guice.
Details are at http://code.google.com/p/google-guice/source/detail?r=1324

General Comment:
I'm more concerned with the resulting production code of extensions than with the unit tests. The problem here is that an extension can (and in this case, Persist does) mark an injected variable as @Nullable, and that gets shadowed to $Nullable, which then leads Guice to think it really isn't nullable... in real non-test code.

What do you think of alternate ways of reducing the runtime impact? For example:
 int len = annotationName.length();
 if(len == "Nullable".length) {
    return "Nullable".equals(annotationName);
 } else if len == "$Nullable".length) {
    return "$Nullable".equals(annotationName);
 } else {
   return false;
 |

or alternate ways (checking first char, etc..). To be fair, though, I think adding any hand-crafted optimization may actually slow it down.

Respond to these comments at http://code.google.com/p/google-guice/source/detail?r=1324

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