cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1242443 - in /cayenne/main/trunk: docs/doc/src/main/resources/RELEASE-NOTES.txt framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/ValidationExceptionTest.java
Date Thu, 09 Feb 2012 18:29:12 GMT
Author: aadamchik
Date: Thu Feb  9 18:29:11 2012
New Revision: 1242443

URL: http://svn.apache.org/viewvc?rev=1242443&view=rev
Log:
CAY-1648 [PATCH] ValidationException throws format exception if error message contains percent
sign

Added:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/ValidationExceptionTest.java
Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1242443&r1=1242442&r2=1242443&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Thu Feb  9 18:29:11 2012
@@ -46,6 +46,7 @@ CAY-1627 CayenneModeler: collection type
 CAY-1628 ClassCastException when using java.util.Set or java.util.Map as collection type
for to-many relationship
 CAY-1631 Oracle - passing blobs as stored procedure parameters
 CAY-1632 CayenneModeler: flattened relationship paths are not fully displayed
+CAY-1648 [PATCH] ValidationException throws format exception if error message contains percent
sign
 
 ----------------------------------
 Release: 3.1 M3

Added: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/ValidationExceptionTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/ValidationExceptionTest.java?rev=1242443&view=auto
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/ValidationExceptionTest.java
(added)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/validation/ValidationExceptionTest.java
Thu Feb  9 18:29:11 2012
@@ -0,0 +1,34 @@
+/*****************************************************************
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ ****************************************************************/
+package org.apache.cayenne.validation;
+
+import junit.framework.TestCase;
+
+
+public class ValidationExceptionTest extends TestCase {
+
+    public void testValidationExceptionValidationResult() {
+        ValidationResult valResult = new ValidationResult();
+        String message = "Error message with a % literal (should be escaped)";
+        valResult.addFailure(new SimpleValidationFailure("source", message));
+        ValidationException e = new ValidationException(valResult);
+        assertTrue(e.getMessage().contains(message));
+    }
+
+}



Mime
View raw message