Issue Details (XML | Word | Printable)

Key: VALIDATOR-89
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Takayuki Kaneko
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Validator

[validator] ValidatorAction needs thread-safe

Created: 24/Apr/06 08:49 PM   Updated: 12/Nov/07 07:25 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.3.1 Release

Time Tracking:
Not Specified

Environment:
Operating System: All
Platform: All

Bugzilla Id: 39393
Resolution Date: 19/Jul/06 02:07 PM


 Description  « Hide
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) { ! ClassLoader loader = this.getClassLoader(params); ! this.loadValidationClass(loader); ! this.loadParameterClasses(loader); ! this.loadValidationMethod(); ! }
! }

Object[] paramValues = this.getParameterValues(params);



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.