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

[lqagain] Javac tests should not needlessly hardcode toString() output

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      JDK-8268358 modifies the present behavior of toString() methods for primitive class types. Javac tests in Valhalla should be tweaked to not needlessly rely on the output.

      A quick glance through the tests that do use toString() show that Javac is using the string output to compare the state of the value instances with what it is expected to be - to verify that right code got generated and execution preserved the semantics of the generated code.

      But this should be done directly by comparing state as opposed to getting a textual representation of the value instance and performing string comparison - which is flaky as well convoluted.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sadayapalam Srikanth Adayapalam
              Reporter:
              sadayapalam Srikanth Adayapalam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: