warn « iterator « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » iterator » warn 

2. "unchecked" warning with Iterator    forums.oracle.com

3. Warning on Iterator    forums.oracle.com

4. Iterator gives "warning: [unchecked] unchecked conversion"    forums.oracle.com

Assuming you can't change the source of EntityRoleName you're kind of stuck. There are circumstances where there's no avoiding unchecked warnings. You can put a cast like (Iterator) but you'll just get a slightly different warning. The compiler is telling you it can't guarantee that the Iterator returned by the openByQuery method actually produces EntityRoleName objects. Given that assigning to an ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.