🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #413

dealing with compiler warning

#413
From: Alan Shiers
Date: Thu, 04 Aug 2005 20:22
43 lines
2322 bytes
Hi there,

I'm using JDK 1.5 and created an instance of an ArrayList, then after
loading the ArrayList I passed it as an arguement to the
Collections.sort(...) method.  When I compile using:

javac -Xlint:unchecked -classpath "C:\Program Files\Apache Softwa
re Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\Program Files\Apache
Soft
ware Foundation\Tomcat 5.5\common\lib\jsp-api.jar;C:\Program Files\Apache
Softwa
re Foundation\Tomcat 5.5\webapps\scholastic\WEB-INF\classes;C:\Program
Files\Apa
che Software Foundation\Tomcat
5.5\webapps\scholastic\WEB-INF\classes\mvcs;C:\Pr
ogram Files\Apache Software Foundation\Tomcat
5.5\webapps\scholastic\WEB-INF\cla
sses\com\components;C:\Program Files\Apache Software Foundation\Tomcat
5.5\webap
ps\scholastic\WEB-INF\classes\com\ezjavabeans\ezsmtp;C:\Program Files\Apache
Sof
tware Foundation\Tomcat
5.5\webapps\scholastic\WEB-INF\lib\jasperreports-0.6.7.j
ar" *.java

I got the following warning message:

TestProcessor.java:153: warning: [unchecked] unchecked method invocation:
<T>sor
t(java.util.List<T>) in java.util.Collections is applied to
(java.util.ArrayList
<mvcs.TestProcessor.Answer>)
         Collections.sort(list);
                         ^
1 warning

What is it I need to do further to prevent this warning message from popping
up all the time? Am I supposed to ignore it or is there something I'm
expected to do to prevent this warning message?

Please advise,

Alan
Technical Details
Message-ID: <42f27c48$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,c7b486fd2f985b01,start
X-Google-Attributes: gidf74b3,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Alan Shiers" <ashiers@hfx.eastlink.ca>
Newsgroups: borland.public.jbuilder.java.language
Subject: dealing with compiler warning
Date: Thu, 4 Aug 2005 17:22:45 -0300
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 24.224.201.229
Message-ID: <42f27c48$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1123187784 24.224.201.229 (4 Aug 2005 13:36:24 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail