🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Converting legacy code to use generics

#115
From: John Steel
Date: Fri, 29 Jun 2007 10:42
32 lines
1731 bytes
Hi, I'm trying to get rid of the warning ""GameListRenderer.java": 
[unchecked] unchecked conversion; found   : java.util.Collection, required: 
java.util.Collection<? extends java.util.Collection> at line 95, column 83 
in the following line:

   ArrayList<Collection> gameList = new ArrayList <Collection> 
(games.getValues());

games is an instance of this:

public class GameListManager {
    TreeMap<String, GameRec> gameListTreeMap;

    public GameListManager() {
        gameListTreeMap = new TreeMap<String, GameRec>();
    }

    public Collection getValues() {
        return gameListTreeMap.values();
    }
...
}

As you can see getValues() returns a Collection, so I can't see what the 
warning is trying to tell me.

Thanks very much

JB2006/jdk6.01

-- 
www.phonewebcam.com 
Technical Details
Message-ID: <4684e22c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,49d96784a5821e34,start
X-Google-Attributes: gidf74b3,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "John Steel" <john.steel@phonewebcam.com>
From: "John Steel" <john.steel@phonewebcam.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Converting legacy code to use generics
Date: Fri, 29 Jun 2007 11:42:39 +0100
Lines: 34
Organization: www.phonewebcam.com
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 80.192.241.252
Message-ID: <4684e22c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1183113772 80.192.241.252 (29 Jun 2007 03:42:52 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail