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

InputVerifier.shouldYieldFocus should call verify directly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3
    • tbd
    • 9
    • client-libs
    • None

    Description

      InputVerifier.shouldYieldFocus(JComponent source, JComponent target) specifies:

      “The basic implementation of this method returns the conjunction of results obtained from verify(input) and verifyTarget(input) to ensure that both the source and the target components are in valid state.”

      Yet the implementation of the method:

      return shouldYieldFocus(source) && verifyTarget(target);

      Yes, shouldYieldFocus(source) calls verify(source). But the result depends on what shouldYieldFocus(source) returns rather than verify(source): shouldYieldFocus(JComponent) could be overridden not to call verify.

      Attachments

        Issue Links

          Activity

            People

              aivanov Alexey Ivanov
              aivanov Alexey Ivanov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: