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

Do some cleanup of nsk/share/jdi/EventHandler.java

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • core-svc
    • b13

      While working on JDK-8289765, I ended up doing a lot of cleanup of nsk/share/jdi/EventHandler.java, so much so that the changes distract from the actual bug fix, so I decided it would be best to first push them with a separate CR. Changes include:

      - The main change is Merging waitForRequestedEvent() and waitForRequestedEventSet(). The methods are quite big and almost identical. I had to add some more code to them for JDK-8289765, and decided it was best to merge them rather than making this code cloning situation even worse.
      - Remove EventFilter.filtered() call when dealing with an uncaught exception event. These are never filtered.
      - Add complain() method. We already have a display() method so you can just call display() instead of log.display(), and it also adds the "EventHandler> " prefix to the output, so I though it would be good to do the same for log.complain() uses, especially since some of the uses also were adding the same prefix.
      - Added a new EventListener that simply logs the event.

      The remaining changes are just minor local edits whose purpose should be obvious.

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

              Created:
              Updated:
              Resolved: