Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 86867 invoked from network); 19 Jul 2006 13:34:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jul 2006 13:34:08 -0000 Received: (qmail 239 invoked by uid 500); 19 Jul 2006 13:33:51 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 99811 invoked by uid 500); 19 Jul 2006 13:33:49 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 99754 invoked by uid 99); 19 Jul 2006 13:33:49 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 06:33:49 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Jul 2006 06:33:49 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 49D487142D4 for ; Wed, 19 Jul 2006 13:31:26 +0000 (GMT) Message-ID: <30559299.1153315886300.JavaMail.jira@brutus> Date: Wed, 19 Jul 2006 06:31:26 -0700 (PDT) From: "Niall Pemberton (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Reopened: (VALIDATOR-89) [validator] ValidatorAction needs thread-safe MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/VALIDATOR-89?page=all ] Niall Pemberton reopened VALIDATOR-89: -------------------------------------- > [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 > > 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