Myrna van Lunteren write:
Hi,

I see a new 'unchecked or unsafe operations' warning in the build, for
ProtocolTest.
Is this something I should log a bug for, or accept as ok?

Hi Myrna,

I don't think it is worth logging a bug for, but I guess we shouldn't accept the warnings either... In my sandbox I have made the warnings go away. I had to rewrite some pre-Java 5.0 code from TestProto to use generics.
These changes will go in with other changes to ProtocolTest soon.

When we start compiling the Derby sources with source level 1.5, I think we'll get lots of these warnings! As examples, uses of Hashtable, ArrayList, Vector, Map and PrivilegedExceptionAction. There's nothing functionally wrong with the code (hopefully ;) ), but the compiler is unable to verify that all the casts are safe. I don't know what the best way to handle the general issue is; rewrite the old code to use generics, ignore warnings or suppress the warnings?


thanks,
--
Kristian

Regards,
Myrna

-------------------------
....
pptesting:

compile:
    [mkdir] Created dir: C:\derbyt\svn2\trunk\classes.pptesting
    [javac] Compiling 10 source files to C:\derbyt\svn2\trunk\classes.pptesting
    [javac] Note:
C:\derbyt\svn2\trunk\java\testing\org\apache\derby\impl\drda\ProtocolTest.java
uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
-------------------------

Reply via email to