Code generation: Single-type-imports with same simple name
Brought to you by:
joncrlsn
If my PersistentObject has 2 date fields
1. DateColumnSpec (java.util.Date)
2. SQLDateColumnSpec (java.sql.Date)
the generated code has the following import
statements
import java.util.Date;
import java.sql.Date;
When using JDK 1.3.1, the generated code
compiles. However it fails when compiled using
JDK 1.4.1.
According to the JLS 2nd edition -
"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."
Probably they got down to this only in 1.4.1 :)