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

Some nsk/jdi tests can fetch ThreadReference from static field in the debuggee: part 4

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 25
    • core-svc

      This batch of changes mostly concerns the remaining uses of threadByName() and converting them to use threadByFieldNameOrThrow() or the new threadByFieldName(). The latter is used if the caller has code to handle a null result. The former is when an exception is needed to get the test to terminate properly. I did fix a few long standing cases where threadyByName() was being called and not checking the result. These call sites now use threadByFieldNameOrThrow() instead of threadByFieldName().

      Note there is a minor semantic change in doing this. threadByName() has some extra code to check that the named thread is only found once, and will throw an exception if it is. I think this was just some extra checking that was being done during test development, and is not needed for proper test execution. I've run all the tests without this check and they still pass. I plan on removing this check at some point.

            Unassigned Unassigned
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: