Eclipse 3.1 M4 BUG about generics

xiaoxiao2021-03-06  40

I use Eclipse 3.1m4 to coding as follows:

Class Test Implements Iterator {

Public Boolean Hasnext () {Return False;

Public integer next () {return null;}

Public void remove () {}

}

The problem appears in the next () method, the compiler is displayed above:

Type Safety: The Return Type Integer of the Method Next () of Type Test Needs Unchecked Conversion To Conform To The Return Type E of Inherited Method

This is a bug of Eclipse

转载请注明原文地址:https://www.9cbs.com/read-58442.html

New Post(0)