Nothing is wrong with that code, although it is a bit verbose for JDK1.5. The "Unnecessary unboxing" inspection lets you know that some code you've written could be simplified (by removing unboxing) if you are compiling under JDK1.5. It will also automatically simplify the code, if you ask it to (either via an intention or the quick-fix in the inspection panel). If you're not compiling under JDK1.5, you shouldn't be using this inspection (it says this in the inspection description).
"Unnecessary unboxing" works the same way, as will the upcoming "for-loop replaceable by for-each". Nothing is wrong with the code they report, just a bit archaic if you're using 1.5.
Johannes Schneider wrote:
The missing check for null or whether getAttribute(String) really
returns a Boolean object?
Tom
Nothing is wrong with that code, although it is a bit verbose for JDK1.5. The "Unnecessary unboxing" inspection lets you know that some code you've written could be simplified (by removing unboxing) if you are compiling under JDK1.5. It will also automatically simplify the code, if you ask it to (either via an intention or the quick-fix in the inspection panel). If you're not compiling under JDK1.5, you shouldn't be using this inspection (it says this in the inspection description).
"Unnecessary unboxing" works the same way, as will the upcoming "for-loop replaceable by for-each". Nothing is wrong with the code they report, just a bit archaic if you're using 1.5.
--Dave Griffith
Thanks for your answer...
I use the latest build and the lates plugins from repository - but all the inspection descriptions are emtpty...
This is a known bug on JetBrains part, and is marked as being fixed in the next EAP build.
--Dave Griffith