Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: array of HashSet<> Date: Sun, 28 Feb 2016 08:56:10 -0500 Organization: A noiseless patient Spider Lines: 27 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 28 Feb 2016 13:53:09 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="2d081e2f7155c28005d4472f67c2f43d"; logging-data="15726"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XULWCwdYQLPSNnnPzQRHb" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 In-Reply-To: Cancel-Lock: sha1:EkdqjWMIApaBQgw3Bt5oTCX8b1g= Xref: csiph.com comp.lang.java.programmer:33896 On 2/28/2016 8:38 AM, Arne Vajhøj wrote: > On 2/28/2016 2:44 AM, Roedy Green wrote: >> I am not trying to arrange the HashSet fields in order in an array. I >> am just trying to do something like this: >> >> private final HashSet[] hashSets; > >> hashSets = new HashSet[ filesToProcess.length ]; > >> I get this error message: >> >> Warning:(104, 20) java: unchecked conversion >> required: java.util.HashSet[] >> found: java.util.HashSet[] > > hashSets = new HashSet[ filesToProcess.length ] > > should fix that. ... for suitable values of "fix." JLS 15.10.1, Array Creation Expressions: "It is a compile-time error if the ClassOrInterfaceType does not denote a reifiable type." -- esosman@comcast-dot-net.invalid "Don't be afraid of work. Make work afraid of you." -- TLM