]> source.dussan.org Git - jackcess.git/commitdiff
Fix parsing of escaped double quotes in expressions
authorJames Ahlborn <jtahlborn@yahoo.com>
Tue, 29 Jan 2019 02:00:59 +0000 (02:00 +0000)
committerJames Ahlborn <jtahlborn@yahoo.com>
Tue, 29 Jan 2019 02:00:59 +0000 (02:00 +0000)
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1267 f203690c-595d-4dc9-a70b-905162fa7fd2

src/changes/changes.xml
src/main/java/com/healthmarketscience/jackcess/impl/expr/ExpressionTokenizer.java
src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java

index a01a4e88c7e1e3252f14bdb10cc739457ef6e444..caa92880e9d00a1240bf677838ffdec80998ab4e 100644 (file)
@@ -4,6 +4,11 @@
     <author email="javajedi@users.sf.net">Tim McCune</author>
   </properties>
   <body>
+    <release version="2.2.3" date="TBD">
+      <action dev="jahlborn" type="fix">
+        Fix parsing of escaped double quotes in expressions.
+      </action>
+    </release>
     <release version="2.2.2" date="2019-01-05">
       <action dev="jahlborn" type="fix" system="SourceForge2" issue="151">
         Fix length in units calculation for Access 97 text fields.
index cc0fca4586173f1d924dc721fa1c7208039e62d0..8705490092387699eb5777ddda64d9e3555cf5de 100644 (file)
@@ -269,7 +269,6 @@ class ExpressionTokenizer
       char c = buf.next();
       if(c == endChar) {
         if(allowDoubledEscape && (buf.peekNext() == endChar)) {
-          sb.append(endChar);
           buf.next();
         } else {
           complete = true;
index 132b788861193fc29f80b728af2ea7deadb31496..84cab7c1c42d7187f8ec89b682bdabdf5f0f3380 100644 (file)
@@ -144,6 +144,7 @@ public class DefaultFunctionsTest extends TestCase
 
     assertEval("FOOO", "=UCase(\"fOoO\")");
     assertEval("fooo", "=LCase(\"fOoO\")");
+    assertEval(" FOO \" BAR ", "=UCase(\" foo \"\" bar \")");
 
     assertEval("bl", "=Left(\"blah\", 2)");
     assertEval("", "=Left(\"blah\", 0)");