Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: canonicalize JLS ref in bibliography section; link a JLS ref in main text

...

Wiki Markup
Well-defined import statements resolve these issues. However, when the definitions of the reused name are imported from other packages, use of the _type-import-on-demand declaration_ (see Java Language Specification \[[JLS 2005|AA. Bibliography#JLS 05]\], [Section 7.5.2|http://java.sun.com/docs/books/jls/third_edition/html/packages.html#7.5.2], "Type-Import-on-Demand Declaration") can lead to unexpected import of a class that was not intended. Moreover, a common—and potentially misleading—tendency is to produce the import statements _after_ writing the code, often via automatic inclusion of import statements by an IDE. This creates further ambiguity with respect to the names; when a custom type is found earlier in the Java include path than the intended type, no further searches are conducted. 

...

Wiki Markup
\[[JLS 2005|AA. Bibliography#JLS 05]\] [Section 6.3.2|http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.3.2] "Obscured Declarations", [Section 6.3.1|http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.3.1] "Shadowing Declarations", [Section 7.5.2|http://java.sun.com/docs/books/jls/third_edition/html/packages.html#7.5.2] "Type-Import-On_Demand Declaration", [Section 14.4.3|http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.4.3] "Shadowing of Names by Local Variables"
\[[Bloch 2005|AA. Bibliography#Bloch 05]\] Puzzle 67: All Strung Out
\[[Bloch 2008|AA. Bibliography#Bloch 08]\] Item 16: Prefer interfaces to abstract classes
\[[Kabanov 2009|AA. Bibliography#Kabanov 09]\]
\[[Conventions 2009|AA. Bibliography#Conventions 09]\] 6.3 Placement
\[[FindBugs 2008|AA. Bibliography#FindBugs 08]\]:

...