Name: mt13159 Date: 09/06/2001
The JLS, 2ed, section 7.5.1 states:
"If two single-type-import declarations in the same compilation unit attempt to import types with the same simple name, then a compile-time error occurs, unless the two types are the same type, in which case the duplicate declaration is ignored. If another top level type with the same simple name is otherwise declared in the current compilation unit except by a type-import-on-demand declaration (ยง7.5.2), then a compile-time error occurs."
However, the following code (assuming org.w3c.dom.Element and oracle.ide.model.Element are both in the classpath) does not produce a compile time error unless code is added to explicitly reference Element:
import org.w3c.dom.Element;
import oracle.ide.model.Element;
public class TestClass
{}
(Review ID: 130887)
======================================================================