Do I need to worry about the compile warning "Note: MYPROG.java uses unchecked or unsafe operations?"
Estimated Reading Time: 1 Minutes
In isCOBOL you may get a Java note saying something similar to
"... uses unchecked or unsafe operations."
This warning is displayed when you execute code which the Java compiler considers to be lacking in error-checking, or potentially unsafe in some way.
This is just a warning though, and won't stop your code from compiling and running.
You can recompile the source code with -jo="-Xlint:unchecked" option to see a more specific message. For instance:
java com.iscobol.compiler.Pcc -jo="-Xlint:unchecked" *.cbl I --> IsControlSet.cbl Compiling result Informational(s) - 0 Warning(s) - 0 Error(s) - 0 Severe error(s) - 0 II--> ISCONTROLSET.java ISCONTROLSET.java:2852: warning: [unchecked] unchecked call to addElement(E)as a member of the raw type java.util.Vector VECT.addElement("Year 2001");Though this note will not affect your application run, the code causing the error could have been remoted in a newer version of isCOBOL, as we continually strive to improve our product.
Therefore, you have two options. You can:
- Ignore this warning.
- Upgrade to a newer isCOBOL version, and report the error to support if it still occurs.