compiler allows 'import <TypeName>.*;'

XMLWordPrintable

    • sparc
    • solaris_2.5



      Name: mgC56079 Date: 10/06/97



      The JLS1.0 (item 7.5) states that only 'import <TypeName>;' and
      'import <PackageName>.*;' are allowed.
      However, compiler permits 'import <TypeName>.*;'
      Should be compile error (as package java.io.RandomAccessFile is
      not accessible: see JLS 7.5.2)

      --- here is the test (Import.java) ----
      import java.io.RandomAccessFile.*;

      public class Import {
        void someMeth() {
        }

      }
      ---

      ======================================================================

            Assignee:
            Todd Turnidge (Inactive)
            Reporter:
            Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: