| Issue 184: | jmesa has a lot of compiler warnings | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Just a quick peek at the problems view in Eclipse shows a number of compiler warnings, mostly related to generics, unused imports, and a few classes missing serialization UIDs. This patch eliminates these warnings. There are no major changes except that I added wildcard parameters for raw types (except on the tags, I used a @SuppressWarnings annotation because I think there was some problem in weblogic with that before), and I added @SupressWarnings in places where unchecked operations were necessary. After rebuilding the project all tests still pass, and I will do a little more testing later today.
Mar 13, 2009
Project Member
#1
jeff.johnston.mn@gmail.com
Status:
Accepted
Mar 15, 2009
I started applying the patch tonight. The changes look good! I did want to get more of your opinion about the serialVersionUID. My understanding is that you only need to declare this if you have something like a client server application and you want a way to say that these two objects are identical at a byte code level. The reason is the two applications exist in different JVM's with two different jar files. At least that's my understanding of it. If the serialVersionUID is not declared then one will be associated by the JVM. With that I typically do not declare the serialVersionUID and opted to turn off that warning...
Mar 16, 2009
You're absolutely right... actually using a serialVersionUID is probably not even a good idea unless you use it semantically correctly. Just to clarify, as I understand it is not really necessary to have two versions of the serializable class be the same at the byte code level, but if two versions of the class have the same UID it is meant to signify that they will serialize/deserialize correctly even though they are different (for example, you would change the serialVersionUID if you added a field to a class that has no logical default that would make it compatible with an older version of the same class). To make a long story short, I am fine with just disabling that warning in the IDE. I just didn't really want to disable the ones that had to do with generics and such.
Mar 16, 2009
Yep, that sounds right to me as well...I have those changes checked in. I'll just let the changes sit for a few days and then do a release.
Apr 5, 2009
Part of the 2.4.2 release.
Status:
Done
|