Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Operating System: All
Platform: All
-
39393
Description
ValidatorAction needs thread-safe because it is cached by other programs, like
Struts.
But ValidatorAction has an unthread-safe block.
Here is a patch below.
-
-
- ValidatorAction.java Mon Apr 24 22:41:55 2006
- ValidatorAction.java.new Mon Apr 24 22:44:54 2006
***************
- 527,536 ****
params.put(Validator.VALIDATOR_ACTION_PARAM, this);
-
try {
! ClassLoader loader = this.getClassLoader(params);
! this.loadValidationClass(loader);
! this.loadParameterClasses(loader);
! this.loadValidationMethod();
Object[] paramValues = this.getParameterValues(params);
— 527,540 ----
params.put(Validator.VALIDATOR_ACTION_PARAM, this);
try {
! if (this.validationMethod == null) {
! synchronized(this)
! }
Object[] paramValues = this.getParameterValues(params);