You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2006/07/19 16:08:17 UTC

[jira] Resolved: (VALIDATOR-89) [validator] ValidatorAction needs thread-safe

     [ http://issues.apache.org/jira/browse/VALIDATOR-89?page=all ]

Niall Pemberton resolved VALIDATOR-89.
--------------------------------------

    Fix Version/s: 1.3.1
       Resolution: Fixed

Re-openned and the set to "Resolved Fixed" again to correct "resolution" which was lost in Bugzilla --> JIRA conversion

> [validator] ValidatorAction needs thread-safe
> ---------------------------------------------
>
>                 Key: VALIDATOR-89
>                 URL: http://issues.apache.org/jira/browse/VALIDATOR-89
>             Project: Commons Validator
>          Issue Type: Bug
>         Environment: Operating System: All
> Platform: All
>            Reporter: Takayuki Kaneko
>             Fix For: 1.3.1
>
>
> 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);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org