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

InputVerifier behavior change in 1.5+

XMLWordPrintable

    • 5.0
    • b07
    • x86
    • windows_xp
    • Verified

        FULL PRODUCT VERSION :
        java version "1.5.0_09"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01)
        Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows XP [Version 5.1.2600]

        A DESCRIPTION OF THE PROBLEM :
        The behavior of the InputVerifier has dramatically chagned in version 1.5+ which precludes two (or more) JComponents from having active InputVerifiers in the same JVM.

        We have JComponets which use an InputVerifier to invoke a JDialog to assist the user in further qualifying bad entries. These JDialogs in turn have JComponents which also use different InputVerifiers. Since 1.5 the subsequent (nested) InputVerifiers have stopped working.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        Found the following code in JComponent 1.5:
            private boolean runInputVerifier() {
                if (inInputVerifier) {
                    // We're already running the InputVerifier, assume the
                    // developer knows what they're doing.
                    return true;
                }

        By commenting out the conditional test of "inInputVerifier", the original behavior returns.
        Because "inInputVerifier" is a private variable, it cannot be over-ridden by an descendant class. Also because it is static, all JComponents across the JVM are limited.
        Because method "runInputVerifer()" is private, it cannot be over-ridden by an ancestor class.

              svioletsunw Scott Violet (Inactive)
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: