Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
Veryant Knowledge Base
Home > All Categories
> isCOBOL General > Do I need to worry about the compile warning "Note: MYPROG.java uses unchecked or unsafe operations?"
Do I need to worry about the compile warning "Note: MYPROG.java uses unchecked or unsafe operations?"
In isCOBOL you may get a Java warning when you use a deprecated API or a Generic class in Java 1.5+.
In this case, IsControlSet.cbl uses the Vector
generic class.
You can recompile the source code with -jo="-Xlint:unchecked" option to see the warning message:
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");
You can:
Ignore this warning.
Compile the source with the -jo="-source 1.4 -target 1.4" option
java com.iscobol.compiler.Pcc -jo="-source 1.4 -target 1.4" *.cbl
I --> IsControlSet.cbl
Compiling result
Informational(s) - 0
Warning(s) - 0
Error(s) - 0
Severe error(s) - 0
II--> ISCONTROLSET.java