You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2018/04/10 18:23:55 UTC
[camel] branch master updated: CAMEL-12274: Bindy - Unescape double
quotes inside CSV field
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 99acd8a CAMEL-12274: Bindy - Unescape double quotes inside CSV field
99acd8a is described below
commit 99acd8a5d5ee62449f9f1a8450145bf7ed964ee9
Author: Dmitry Volodin <dm...@gmail.com>
AuthorDate: Tue Apr 10 16:49:06 2018 +0300
CAMEL-12274: Bindy - Unescape double quotes inside CSV field
---
.../camel/dataformat/bindy/BindyCsvFactory.java | 14 +-
.../BindyDoubleQuotesInFieldCsvUnmarshallTest.java | 205 +++++++++++++++++++++
...CsvContainingMultiQuoteCharEscapeFalseTest.java | 8 +-
...eCsvContainingMultiQuoteCharEscapeTrueTest.java | 4 +-
.../BindySimpleCsvFunctionWithClassMethodTest.java | 5 +-
...ndySimpleCsvFunctionWithExternalMethodTest.java | 5 +-
...esWithDoubleQuotesInFieldCsvUnmarshallTest.java | 69 +++++++
...oubleQuotesInFieldCsvUnmarshallTest-context.xml | 27 +++
...oubleQuotesInFieldCsvUnmarshallTest-context.xml | 27 +++
9 files changed, 352 insertions(+), 12 deletions(-)
diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
index 00e6af0..8bd5b19 100644
--- a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
+++ b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/BindyCsvFactory.java
@@ -51,6 +51,7 @@ import org.slf4j.LoggerFactory;
public class BindyCsvFactory extends BindyAbstractFactory implements BindyFactory {
private static final Logger LOG = LoggerFactory.getLogger(BindyCsvFactory.class);
+ private static final String DOUBLE_QUOTES_SYMBOL = "\"";
boolean isOneToMany;
@@ -95,7 +96,7 @@ public class BindyCsvFactory extends BindyAbstractFactory implements BindyFactor
// Find annotated Datafields declared in the Model classes
initAnnotatedFields();
- // initialize Csv parameter(s)
+ // initialize CSV parameter(s)
// separator and skip first line from @CSVrecord annotation
initCsvRecordParameters();
}
@@ -242,6 +243,10 @@ public class BindyCsvFactory extends BindyAbstractFactory implements BindyFactor
try {
if (quoting && quote != null && (data.contains("\\" + quote) || data.contains(quote)) && quotingEscaped) {
value = format.parse(data.replaceAll("\\\\" + quote, "\\" + quote));
+ } else if (quote != null && quote.equals(DOUBLE_QUOTES_SYMBOL) && data.contains(DOUBLE_QUOTES_SYMBOL + DOUBLE_QUOTES_SYMBOL) && !quotingEscaped) {
+ // If double-quotes are used to enclose fields, the two double
+ // quotes character must be replaced with one according to RFC 4180 section 2.7
+ value = format.parse(data.replaceAll(DOUBLE_QUOTES_SYMBOL + DOUBLE_QUOTES_SYMBOL, DOUBLE_QUOTES_SYMBOL));
} else {
value = format.parse(data);
}
@@ -359,9 +364,14 @@ public class BindyCsvFactory extends BindyAbstractFactory implements BindyFactor
if (quoting && quote != null) {
buffer.append(quote);
}
- // CAMEL-7519 - improvoment escape the token itself by prepending escape char
+ // CAMEL-7519 - improvement escape the token itself by prepending escape char
if (quoting && quote != null && (res.contains("\\" + quote) || res.contains(quote)) && quotingEscaped) {
buffer.append(res.replaceAll("\\" + quote, "\\\\" + quote));
+ } else if (quoting && quote != null && quote.equals(DOUBLE_QUOTES_SYMBOL) && res.contains(quote) && !quotingEscaped) {
+ // If double-quotes are used to enclose fields, then a double-quote
+ // appearing inside a field must be escaped by preceding it with another
+ // double quote according to RFC 4180 section 2.7
+ buffer.append(res.replaceAll(DOUBLE_QUOTES_SYMBOL, DOUBLE_QUOTES_SYMBOL + DOUBLE_QUOTES_SYMBOL));
} else {
buffer.append(res);
}
diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesInFieldCsvUnmarshallTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesInFieldCsvUnmarshallTest.java
new file mode 100644
index 0000000..deb5fbe
--- /dev/null
+++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesInFieldCsvUnmarshallTest.java
@@ -0,0 +1,205 @@
+/**
+ * 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.camel.dataformat.bindy.csv;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
+import org.apache.camel.dataformat.bindy.annotation.DataField;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+@ContextConfiguration
+public class BindyDoubleQuotesInFieldCsvUnmarshallTest extends AbstractJUnit4SpringContextTests {
+
+ private static final String URI_MOCK_RESULT = "mock:result";
+ private static final String URI_DIRECT_START = "direct:start";
+
+ @Produce(uri = URI_DIRECT_START)
+ private ProducerTemplate template;
+
+ @EndpointInject(uri = URI_MOCK_RESULT)
+ private MockEndpoint result;
+
+ private String expected;
+
+ @Test
+ @DirtiesContext
+ public void testUnMarshallMessage() throws Exception {
+
+ expected = "\"10\",\"A9\",\"Pauline de \"\"Quotes\"\"\",\"M\",\"ISIN\",\"XD12345678\",\"BUY\",\"Share\",\"2500.45\",\"USD\",\"08-01-2009\"";
+
+ template.sendBody(expected);
+
+ result.expectedMessageCount(1);
+ result.assertIsSatisfied();
+
+ Order order = result.getReceivedExchanges().get(0).getIn().getBody(Order.class);
+ Assert.assertEquals("Pauline de \"Quotes\"", order.getFirstName());
+ }
+
+ public static class ContextConfig extends RouteBuilder {
+ BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat(Order.class);
+
+ public void configure() {
+ from(URI_DIRECT_START).unmarshal(camelDataFormat).to(URI_MOCK_RESULT);
+ }
+
+ }
+
+ @CsvRecord(separator = ",")
+ public static class Order {
+
+ @DataField(pos = 1)
+ private int orderNr;
+
+ @DataField(pos = 2)
+ private String clientNr;
+
+ @DataField(pos = 3)
+ private String firstName;
+
+ @DataField(pos = 4)
+ private String lastName;
+
+ @DataField(pos = 5)
+ private String instrumentCode;
+
+ @DataField(pos = 6)
+ private String instrumentNumber;
+
+ @DataField(pos = 7)
+ private String orderType;
+
+ @DataField(name = "Name", pos = 8)
+ private String instrumentType;
+
+ @DataField(pos = 9, precision = 2)
+ private BigDecimal amount;
+
+ @DataField(pos = 10)
+ private String currency;
+
+ @DataField(pos = 11, pattern = "dd-MM-yyyy")
+ private Date orderDate;
+
+ public int getOrderNr() {
+ return orderNr;
+ }
+
+ public void setOrderNr(int orderNr) {
+ this.orderNr = orderNr;
+ }
+
+ public String getClientNr() {
+ return clientNr;
+ }
+
+ public void setClientNr(String clientNr) {
+ this.clientNr = clientNr;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getInstrumentCode() {
+ return instrumentCode;
+ }
+
+ public void setInstrumentCode(String instrumentCode) {
+ this.instrumentCode = instrumentCode;
+ }
+
+ public String getInstrumentNumber() {
+ return instrumentNumber;
+ }
+
+ public void setInstrumentNumber(String instrumentNumber) {
+ this.instrumentNumber = instrumentNumber;
+ }
+
+ public String getOrderType() {
+ return orderType;
+ }
+
+ public void setOrderType(String orderType) {
+ this.orderType = orderType;
+ }
+
+ public String getInstrumentType() {
+ return instrumentType;
+ }
+
+ public void setInstrumentType(String instrumentType) {
+ this.instrumentType = instrumentType;
+ }
+
+ public BigDecimal getAmount() {
+ return amount;
+ }
+
+ public void setAmount(BigDecimal amount) {
+ this.amount = amount;
+ }
+
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public Date getOrderDate() {
+ return orderDate;
+ }
+
+ public void setOrderDate(Date orderDate) {
+ this.orderDate = orderDate;
+ }
+
+ @Override
+ public String toString() {
+ return "Model : " + Order.class.getName() + " : " + this.orderNr + ", " + this.orderType + ", " + String.valueOf(this.amount) + ", " + this.instrumentCode + ", "
+ + this.instrumentNumber + ", " + this.instrumentType + ", " + this.currency + ", " + this.clientNr + ", " + this.firstName + ", " + this.lastName + ", "
+ + String.valueOf(this.orderDate);
+ }
+ }
+
+}
diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest.java
index 1e7f991..0e9b4a3 100644
--- a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest.java
+++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest.java
@@ -51,7 +51,7 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest extends Camel
BindyCsvRowFormat75191 body = new BindyCsvRowFormat75191();
body.setFirstField("123");
- body.setSecondField("\"\"foo\"\"");
+ body.setSecondField("\"foo\"");
body.setNumber(new BigDecimal(10));
template.sendBody("direct:startMarshal1", body);
@@ -60,7 +60,7 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest extends Camel
BindyCsvRowFormat75191 model = mockEndPointUnMarshal1.getReceivedExchanges().get(0).getIn().getBody(BindyCsvRowFormat75191.class);
assertEquals("123", model.getFirstField());
- assertEquals("\"\"foo\"\"", model.getSecondField());
+ assertEquals("\"foo\"", model.getSecondField());
assertEquals(new BigDecimal(10), model.getNumber());
}
@@ -120,6 +120,7 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest extends Camel
//from https://issues.apache.org/jira/browse/CAMEL-7519
@CsvRecord(separator = ",", quote = "\"", quoting = true, quotingEscaped = false)
public static class BindyCsvRowFormat75191 implements Serializable {
+ private static final long serialVersionUID = 1L;
@DataField(pos = 1)
private String firstField;
@@ -157,6 +158,7 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest extends Camel
@CsvRecord(separator = ",", quote = "'", quoting = true, quotingEscaped = false)
public static class BindyCsvRowFormat75192 implements Serializable {
+ private static final long serialVersionUID = 1L;
@DataField(pos = 1)
private String firstField;
@@ -191,6 +193,4 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeFalseTest extends Camel
this.number = number;
}
}
-
-
}
diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest.java
index f2f99fa..53c5cd8 100644
--- a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest.java
+++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest.java
@@ -120,6 +120,7 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest extends CamelT
//from https://issues.apache.org/jira/browse/CAMEL-7519
@CsvRecord(separator = ",", quote = "\"", quoting = true, quotingEscaped = true)
public static class BindyCsvRowFormat75191 implements Serializable {
+ private static final long serialVersionUID = 1L;
@DataField(pos = 1)
private String firstField;
@@ -157,6 +158,7 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest extends CamelT
@CsvRecord(separator = ",", quote = "'", quoting = true, quotingEscaped = true)
public static class BindyCsvRowFormat75192 implements Serializable {
+ private static final long serialVersionUID = 1L;
@DataField(pos = 1)
private String firstField;
@@ -191,6 +193,4 @@ public class BindySimpleCsvContainingMultiQuoteCharEscapeTrueTest extends CamelT
this.number = number;
}
}
-
-
}
diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithClassMethodTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithClassMethodTest.java
index 4f5b811..3f19055 100644
--- a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithClassMethodTest.java
+++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithClassMethodTest.java
@@ -51,7 +51,7 @@ public class BindySimpleCsvFunctionWithClassMethodTest extends CamelTestSupport
BindyCsvRowFormat7621 body = new BindyCsvRowFormat7621();
body.setFirstField("123");
- body.setSecondField("\"\"foo\"\"");
+ body.setSecondField("\"foo\"");
body.setNumber(new BigDecimal(10));
template.sendBody("direct:startMarshal1", body);
@@ -60,7 +60,7 @@ public class BindySimpleCsvFunctionWithClassMethodTest extends CamelTestSupport
BindyCsvRowFormat7621 model = mockEndPointUnMarshal1.getReceivedExchanges().get(0).getIn().getBody(BindyCsvRowFormat7621.class);
assertEquals("123", model.getFirstField());
- assertEquals("\"\"FOO\"\"", model.getSecondField());
+ assertEquals("\"FOO\"", model.getSecondField());
assertEquals(new BigDecimal(10), model.getNumber());
}
@@ -86,6 +86,7 @@ public class BindySimpleCsvFunctionWithClassMethodTest extends CamelTestSupport
@CsvRecord(separator = ",", quote = "\"", quoting = true, quotingEscaped = false)
public static class BindyCsvRowFormat7621 implements Serializable {
+ private static final long serialVersionUID = 1L;
@DataField(pos = 1)
private String firstField;
diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithExternalMethodTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithExternalMethodTest.java
index ebc03a7..3c0f61f 100644
--- a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithExternalMethodTest.java
+++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvFunctionWithExternalMethodTest.java
@@ -55,7 +55,7 @@ public class BindySimpleCsvFunctionWithExternalMethodTest extends CamelTestSuppo
BindyCsvRowFormat7621 body = new BindyCsvRowFormat7621();
body.setFirstField("123");
- body.setSecondField("\"\"foo\"\"");
+ body.setSecondField("\"foo\"");
body.setNumber(new BigDecimal(10));
template.sendBody("direct:startMarshal1", body);
@@ -64,7 +64,7 @@ public class BindySimpleCsvFunctionWithExternalMethodTest extends CamelTestSuppo
BindyCsvRowFormat7621 model = mockEndPointUnMarshal1.getReceivedExchanges().get(0).getIn().getBody(BindyCsvRowFormat7621.class);
assertEquals("123", model.getFirstField());
- assertEquals("\"\"bar\"\"", model.getSecondField());
+ assertEquals("\"bar\"", model.getSecondField());
assertEquals(new BigDecimal(10), model.getNumber());
}
@@ -90,6 +90,7 @@ public class BindySimpleCsvFunctionWithExternalMethodTest extends CamelTestSuppo
@CsvRecord(separator = ",", quote = "\"", quoting = true, quotingEscaped = false)
public static class BindyCsvRowFormat7621 implements Serializable {
+ private static final long serialVersionUID = 1L;
@DataField(pos = 1)
private String firstField;
diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest.java
new file mode 100644
index 0000000..9728882
--- /dev/null
+++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest.java
@@ -0,0 +1,69 @@
+/**
+ * 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.camel.dataformat.bindy.csv;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.dataformat.bindy.model.simple.oneclasssinglequote.Order;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.test.annotation.DirtiesContext;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
+
+@ContextConfiguration
+public class BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest extends AbstractJUnit4SpringContextTests {
+
+ private static final String URI_MOCK_RESULT = "mock:result";
+ private static final String URI_DIRECT_START = "direct:start";
+
+ @Produce(uri = URI_DIRECT_START)
+ private ProducerTemplate template;
+
+ @EndpointInject(uri = URI_MOCK_RESULT)
+ private MockEndpoint result;
+
+ private String expected;
+
+ @Test
+ @DirtiesContext
+ public void testUnMarshallMessage() throws Exception {
+
+ expected = "10,A9,'Pauline de \"\"Quotes\"\"','O'Donald',ISIN,XD12345678,BUY,Share,2500.45,USD,08-01-2009";
+
+ template.sendBody(expected);
+
+ result.expectedMessageCount(1);
+ result.assertIsSatisfied();
+
+ Order order = result.getReceivedExchanges().get(0).getIn().getBody(Order.class);
+ Assert.assertEquals(10, order.getOrderNr());
+ Assert.assertEquals("Pauline de \"\"Quotes\"\"", order.getFirstName());
+ Assert.assertEquals("O'Donald", order.getLastName());
+ }
+
+ public static class ContextConfig extends RouteBuilder {
+ BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat(org.apache.camel.dataformat.bindy.model.simple.oneclasssinglequote.Order.class);
+
+ public void configure() {
+ from(URI_DIRECT_START).unmarshal(camelDataFormat).to(URI_MOCK_RESULT);
+ }
+ }
+}
\ No newline at end of file
diff --git a/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesInFieldCsvUnmarshallTest-context.xml b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesInFieldCsvUnmarshallTest-context.xml
new file mode 100644
index 0000000..30c670d
--- /dev/null
+++ b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesInFieldCsvUnmarshallTest-context.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+ <camelContext id="camelContext-c82c721b-cdcb-4454-9994-26a6cded0e15" xmlns="http://camel.apache.org/schema/spring">
+ <routeBuilder ref="myBuilder"/>
+ </camelContext>
+ <bean
+ class="org.apache.camel.dataformat.bindy.csv.BindyDoubleQuotesInFieldCsvUnmarshallTest$ContextConfig" id="myBuilder"/>
+</beans>
diff --git a/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest-context.xml b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest-context.xml
new file mode 100644
index 0000000..b4c6577
--- /dev/null
+++ b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest-context.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
+ <camelContext id="camelContext-8b6febc1-7092-4b97-8847-38f4482d2ca2" xmlns="http://camel.apache.org/schema/spring">
+ <routeBuilder ref="myBuilder"/>
+ </camelContext>
+ <bean
+ class="org.apache.camel.dataformat.bindy.csv.BindySingleQuotesWithDoubleQuotesInFieldCsvUnmarshallTest$ContextConfig" id="myBuilder"/>
+</beans>
--
To stop receiving notification emails like this one, please contact
davsclaus@apache.org.