-
Bug
-
Resolution: Fixed
-
P4
-
5.0
-
b07
-
x86
-
windows_xp
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2143730 | 6u2 | Scott Violet | P3 | Resolved | Fixed | b01 |
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.
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.
- backported by
-
JDK-2143730 InputVerifier behavior change in 1.5+
- Resolved
- relates to
-
JDK-4532517 shouldYieldFocus does not allow side effects in 1.4
- Resolved