Static import from default package ?

Ulf Zibis Ulf.Zibis at gmx.de
Wed Mar 28 08:59:08 PDT 2012


Hi all,

is there any reason, why we can't import static from class in default package?

Example:
class A {
     static final type CONSTANT = 123;
     static final type method() {...};
}

import static A.*;
class B {
     static final type HERE = CONSTANT;
     static final type now() { return method(); };
}

Use case:
JDK's jtreg tests (based on default package).

Regards,

Ulf





More information about the compiler-dev mailing list