Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io (original) (raw)
Doug Lea dl at cs.oswego.edu
Fri Aug 24 10:45:13 UTC 2012
- Previous message: Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io
- Next message: Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Rémi Forax wrote:
Hi Dan, I'm not sure to like the fact that you introduce some local variables just to get ride of some warnings given that Hotspot compilers are sometimes sensitive to that. I think this practice should be discussed on this list before committing this changeset.
Yes. We discussed this during the last warnings cleanup. If javac cannot provide a means of shutting up these kinds of warnings without changing the emitted bytecode, then warning-free-compiles should not be required within JDK. (We hit a lot of warnings in j.u.c anyway because of uses of Unsafe that have no pure-java equivalents.)
so is it a good idea to add a temporary local variable to fix a generics warning or should @SuppressWarnings should be set on the whole method ?
We end up doing this this too often as a workaround.
-Doug
- Previous message: Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io
- Next message: Review Request: 7193406 - Clean-up JDK Build Warnings in java.util, java.io
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]