Since Java 5 introduced generics the java compiler issues some warnings for the use of Collection classes that are not restricted by a Type.
They look like:
The odd thing is that one cannot suppress these warnings with the -nowarn option on javac. For NetRexx, we have no way to specify types on a collection class. There is, however, a way to get rid of these messages, by using the @annotations feature we introduced some releases ago. class EssoNews properties static zipFile = 'BNA-DIG-ESSONEWS-1984_images.zip' /** * Default constructor */ method EssoNews() return @SuppressWarnings("unchecked") method main(args=String[]) static say Date() "EssoNews Started" issueMap = TreeMap() say Date() "EssoNews Reading" zipFile a = Zip().readZip(zipFile) i = a.iterator() loop while i.hasNext() filename_ = i.next() parse filename_ 'ESSONEWS-' issue '-‘ . (…) etc This ensures the messages will stay away. The suppression can be done with a method scope. I could generate this annotation for every method into the java source. What are the thoughts on this? best regards, René. _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
It's probably what I would have done ...
:-)
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
Free forum by Nabble | Edit this page |