Bug 68583 - [1.5] Warning when generic type is returned from the function.
Summary: [1.5] Warning when generic type is returned from the function.
Status: CLOSED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2004-06-25 06:05 EDT by Pavel Krupets CLA
Modified: 2009-08-30 02:05 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Krupets CLA 2004-06-25 06:05:18 EDT
I've got next static function:
public static Collection<IAttribute> createCollection(Attributes atts) {}

I invoke it like this:
Collection<IAttribute> atts = Attribute.createCollection(...);

Warning message:
Unsafe type operation: should not assign expression of raw type Collection to 
type Collection<IAttribute>. References to generic type Collection<E> should be 
parameterized.

Sorry if it's my mistake. I couldn't find any generics references guides, etc.
Comment 1 Philipe Mulet CLA 2004-07-05 18:56:01 EDT
Cannot reproduce on following testcase with latest HEAD contents:

import java.util.Collection;
public class X {
  public static void main(String[] args) {
     Collection<IAttribute> atts = Attribute.createCollection(null);
  }
}
interface IAttribute {}

class Attribute implements IAttribute {
  public static Collection<IAttribute> createCollection(Attribute atts) {
    return null;
  }
}
Comment 2 Philipe Mulet CLA 2004-07-06 06:17:08 EDT
Cannot reproduce with Cheetah06 either.

Please reopen with steps to reproduce.
Comment 3 Frederic Fusier CLA 2005-02-17 10:07:38 EST
Closing as never reproduced in a long time
Comment 4 Denis Roy CLA 2009-08-30 02:05:17 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.