Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 42960 invoked from network); 24 Oct 2009 00:16:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Oct 2009 00:16:56 -0000 Received: (qmail 5870 invoked by uid 500); 24 Oct 2009 00:16:56 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 5785 invoked by uid 500); 24 Oct 2009 00:16:55 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 5768 invoked by uid 99); 24 Oct 2009 00:16:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 00:16:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Oct 2009 00:16:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8D5652388906; Sat, 24 Oct 2009 00:16:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r829287 - /commons/sandbox/validator2/branches/alternative/validation-api/src/main/java/javax/validation/ConstraintViolationException.java Date: Sat, 24 Oct 2009 00:16:32 -0000 To: commits@commons.apache.org From: niallp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091024001632.8D5652388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: niallp Date: Sat Oct 24 00:16:32 2009 New Revision: 829287 URL: http://svn.apache.org/viewvc?rev=829287&view=rev Log: Fix ConstraintViolationException API Modified: commons/sandbox/validator2/branches/alternative/validation-api/src/main/java/javax/validation/ConstraintViolationException.java Modified: commons/sandbox/validator2/branches/alternative/validation-api/src/main/java/javax/validation/ConstraintViolationException.java URL: http://svn.apache.org/viewvc/commons/sandbox/validator2/branches/alternative/validation-api/src/main/java/javax/validation/ConstraintViolationException.java?rev=829287&r1=829286&r2=829287&view=diff ============================================================================== --- commons/sandbox/validator2/branches/alternative/validation-api/src/main/java/javax/validation/ConstraintViolationException.java (original) +++ commons/sandbox/validator2/branches/alternative/validation-api/src/main/java/javax/validation/ConstraintViolationException.java Sat Oct 24 00:16:32 2009 @@ -16,6 +16,8 @@ */ package javax.validation; +import java.util.Set; + /** * Constraint Violation Exception. * @@ -26,37 +28,35 @@ private static final long serialVersionUID = 1L; - /** - * Construct an exception with no message or cause. - */ - public ConstraintViolationException() { - } + private final Set> violations; /** - * Construct an exception with a message but no cause. + * Construct an exception with the constraint violations. * - * @param message The error message + * @param violations The constraint violations */ - public ConstraintViolationException(String message) { - super(message); + public ConstraintViolationException(Set> violations) { + super(); + this.violations = violations; } /** - * Construct an exception with a message and cause. + * Construct an exception with a message and the constraint violations. * * @param message The error message - * @param cause The root cause of the exception + * @param violations The constraint violations */ - public ConstraintViolationException(String message, Throwable cause) { - super(message, cause); + public ConstraintViolationException(String message, Set> violations) { + super(message); + this.violations = violations; } /** - * Construct an exception with a cause but no message. + * Return the constraint violations. * - * @param cause The root cause of the exception + * @return the constraint violations */ - public ConstraintViolationException(Throwable cause) { - super(cause); + public Set> getConstraintViolations() { + return violations; } }