-
Bug
-
Resolution: Unresolved
-
P3
-
9
-
None
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.
“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.
- relates to
-
JDK-8154431 Allow source and target based validation for the focus transfer between two JComponents
-
- Resolved
-
- links to