Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8042742

possible error in Tokens.Token.checkKind() for javac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 15
    • 7u51, 9
    • tools
    • b08
    • x86
    • generic

    Description

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      MAC OS Mavricks

      A DESCRIPTION OF THE PROBLEM :
      the checkKind() method of the Token class in Parser\Tokens.java in the javac source code is this:

      protected void checkKind() {
                  if (kind.tag != Tag.DEFAULT) {
                      throw new AssertionError("Bad token kind - expected " + Tag.STRING);
                  }
              }

      shouldn't this be throw new AssertionError("Bad token kind - expected " + Tag.DEFAULT); instead for the base class?


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Since this is an internal check, I don't know if would be an issue for the average Java user, unless it is triggered by other internal error somewhere. If you all have fixed this in the latest release, please disregard, thanks!

      REPRODUCIBILITY :
      This bug can be reproduced always.

      Attachments

        Activity

          People

            jlahoda Jan Lahoda
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: