Compiler does not do null check on qualified new

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.3.0
    • Component/s: tools
    • merlin
    • generic
    • generic
    • Verified

      Qualified class instance creation expressions must not be qualified by a
      null reference. It appears that the current release (1.3) is not performing the
      necessary check. This check is performed by the 1.2 compiler.

      Compile and run the following program:

      class nullQualifiedNew {

        class Nested {

          int j;
          Nested(int i){ j = i;}
        }

        public static void main(String[] args) {

          nullQualifiedNew e = null;
          e.new Nested(6);
        }
      }

      gilad.bracha@eng 2000-02-01

            Assignee:
            Btplusnull User (Inactive)
            Reporter:
            Gilad Bracha (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: