[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=626166&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-626166
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 21/Jul/21 14:38
Start Date: 21/Jul/21 14:38
Worklog Time Spent: 10m 
  Work Description: garydgregory merged pull request #120:
URL: https://github.com/apache/commons-csv/pull/120


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 626166)
Time Spent: 3h  (was: 2h 50m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=62&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-62
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 20/Jul/21 12:25
Start Date: 20/Jul/21 12:25
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41488452/badge)](https://coveralls.io/builds/41488452)
   
   Coverage increased (+0.01%) to 98.323% when pulling 
**69d3de8e20e06553ec7df75732d8b483c0beba41 on king-tyler:CSV-265** into 
**27843d8dc0ec6e5af910674bfb4cba4e48b2475b on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 62)
Time Spent: 2h 50m  (was: 2h 40m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=624817&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-624817
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 20/Jul/21 09:29
Start Date: 20/Jul/21 09:29
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41488452/badge)](https://coveralls.io/builds/41488452)
   
   Coverage increased (+0.01%) to 98.323% when pulling 
**69d3de8e20e06553ec7df75732d8b483c0beba41 on king-tyler:CSV-265** into 
**27843d8dc0ec6e5af910674bfb4cba4e48b2475b on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 624817)
Time Spent: 2h 40m  (was: 2.5h)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=624704&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-624704
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 19/Jul/21 23:06
Start Date: 19/Jul/21 23:06
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41488452/badge)](https://coveralls.io/builds/41488452)
   
   Coverage increased (+0.01%) to 98.323% when pulling 
**69d3de8e20e06553ec7df75732d8b483c0beba41 on king-tyler:CSV-265** into 
**27843d8dc0ec6e5af910674bfb4cba4e48b2475b on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 624704)
Time Spent: 2.5h  (was: 2h 20m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=623843&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-623843
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 16/Jul/21 20:10
Start Date: 16/Jul/21 20:10
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41440811/badge)](https://coveralls.io/builds/41440811)
   
   Coverage increased (+0.01%) to 98.323% when pulling 
**fe7503e2a0a138a9821335f05eaa8551524862f4 on king-tyler:CSV-265** into 
**27843d8dc0ec6e5af910674bfb4cba4e48b2475b on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 623843)
Time Spent: 2h 20m  (was: 2h 10m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=623640&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-623640
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 16/Jul/21 14:40
Start Date: 16/Jul/21 14:40
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41432003/badge)](https://coveralls.io/builds/41432003)
   
   Coverage increased (+0.01%) to 98.323% when pulling 
**15e9361b61cc4e649731d21b127ef9fa12f10a54 on king-tyler:CSV-265** into 
**27843d8dc0ec6e5af910674bfb4cba4e48b2475b on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 623640)
Time Spent: 2h 10m  (was: 2h)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=623610&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-623610
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 16/Jul/21 14:08
Start Date: 16/Jul/21 14:08
Worklog Time Spent: 10m 
  Work Description: king-tyler commented on a change in pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#discussion_r671283703



##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv265Test.java
##
@@ -0,0 +1,60 @@
+/*
+ * 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.commons.csv.issues;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVParser;
+import org.apache.commons.csv.CSVRecord;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests [CSV-265] {@link CSVRecord#getCharacterPosition()} returns the 
correct position after encountering a comment.
+ */
+public class JiraCsv265Test {
+
+@Test
+public void testJiraCsv265Test() throws IOException {
+// @formatter:off
+final String csv = "# Comment1\n"
+ + "Header1,Header2\n"
+ + "# Comment2\n"
+ + "Value1,Value2\n"
+ + "# Comment3\n"
+ + "Value3,Value4\n"
+ + "# Comment4\n";
+final CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
+.setCommentMarker('#')
+.setHeader()
+.setSkipHeaderRecord(true)
+.build();
+// @formatter:on
+try (final CSVParser parser = csvFormat.parse(new StringReader(csv))) {
+final Iterator itr = parser.iterator();
+final CSVRecord record1 = itr.next();
+assertEquals(csv.indexOf("# Comment2"), 
record1.getCharacterPosition());
+final CSVRecord record2 = itr.next();
+assertEquals(csv.indexOf("# Comment3"), 
record2.getCharacterPosition());
+}

Review comment:
   Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 623610)
Time Spent: 2h  (was: 1h 50m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=623042&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-623042
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 15/Jul/21 13:17
Start Date: 15/Jul/21 13:17
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on a change in pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#discussion_r670451842



##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv265Test.java
##
@@ -0,0 +1,60 @@
+/*
+ * 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.commons.csv.issues;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVParser;
+import org.apache.commons.csv.CSVRecord;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests [CSV-265] {@link CSVRecord#getCharacterPosition()} returns the 
correct position after encountering a comment.
+ */
+public class JiraCsv265Test {
+
+@Test
+public void testJiraCsv265Test() throws IOException {
+// @formatter:off
+final String csv = "# Comment1\n"
+ + "Header1,Header2\n"
+ + "# Comment2\n"
+ + "Value1,Value2\n"
+ + "# Comment3\n"
+ + "Value3,Value4\n"
+ + "# Comment4\n";
+final CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
+.setCommentMarker('#')
+.setHeader()
+.setSkipHeaderRecord(true)
+.build();
+// @formatter:on
+try (final CSVParser parser = csvFormat.parse(new StringReader(csv))) {
+final Iterator itr = parser.iterator();
+final CSVRecord record1 = itr.next();
+assertEquals(csv.indexOf("# Comment2"), 
record1.getCharacterPosition());
+final CSVRecord record2 = itr.next();
+assertEquals(csv.indexOf("# Comment3"), 
record2.getCharacterPosition());
+}

Review comment:
   I'm trying to better understand what you are trying to do here... may 
you please add a test with comments that span multiple lines; for example, 
input like:
   ```
   # one
   # two
   data,data,data
   # three
   # four
   data,data,data
   ```
   
   TY.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 623042)
Time Spent: 1h 50m  (was: 1h 40m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=623041&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-623041
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 15/Jul/21 13:17
Start Date: 15/Jul/21 13:17
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on a change in pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#discussion_r670451842



##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv265Test.java
##
@@ -0,0 +1,60 @@
+/*
+ * 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.commons.csv.issues;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVParser;
+import org.apache.commons.csv.CSVRecord;
+import org.junit.jupiter.api.Test;
+
+/**
+ * Tests [CSV-265] {@link CSVRecord#getCharacterPosition()} returns the 
correct position after encountering a comment.
+ */
+public class JiraCsv265Test {
+
+@Test
+public void testJiraCsv265Test() throws IOException {
+// @formatter:off
+final String csv = "# Comment1\n"
+ + "Header1,Header2\n"
+ + "# Comment2\n"
+ + "Value1,Value2\n"
+ + "# Comment3\n"
+ + "Value3,Value4\n"
+ + "# Comment4\n";
+final CSVFormat csvFormat = CSVFormat.DEFAULT.builder()
+.setCommentMarker('#')
+.setHeader()
+.setSkipHeaderRecord(true)
+.build();
+// @formatter:on
+try (final CSVParser parser = csvFormat.parse(new StringReader(csv))) {
+final Iterator itr = parser.iterator();
+final CSVRecord record1 = itr.next();
+assertEquals(csv.indexOf("# Comment2"), 
record1.getCharacterPosition());
+final CSVRecord record2 = itr.next();
+assertEquals(csv.indexOf("# Comment3"), 
record2.getCharacterPosition());
+}

Review comment:
   I'm trying to better understand what you are trying to do here... may 
you please add a test with comments that span multiple lines; for example, 
input like:
   ```
   # one
   # two
   data,data,data
   # three
   # foor
   data,data,data
   ```
   
   TY.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 623041)
Time Spent: 1h 40m  (was: 1.5h)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=622790&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-622790
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 14/Jul/21 23:35
Start Date: 14/Jul/21 23:35
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41381674/badge)](https://coveralls.io/builds/41381674)
   
   Coverage increased (+0.01%) to 98.32% when pulling 
**0ee99c08e17d9974195159208ebc99d9a97bfcd5 on king-tyler:CSV-265** into 
**a2ba9b52886162d7f046ff7fe8019c1ba5334a9a on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 622790)
Time Spent: 1.5h  (was: 1h 20m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=622744&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-622744
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 14/Jul/21 21:39
Start Date: 14/Jul/21 21:39
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/41376277/badge)](https://coveralls.io/builds/41376277)
   
   Coverage increased (+0.01%) to 98.32% when pulling 
**87ac79fef0ba6cd33baad4bad83d05108efe222d on king-tyler:CSV-265** into 
**a2ba9b52886162d7f046ff7fe8019c1ba5334a9a on apache:master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 622744)
Time Spent: 1h 20m  (was: 1h 10m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=622727&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-622727
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 14/Jul/21 20:46
Start Date: 14/Jul/21 20:46
Worklog Time Spent: 10m 
  Work Description: king-tyler commented on a change in pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#discussion_r669941767



##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv265Test.java
##
@@ -0,0 +1,51 @@
+/*
+ * 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.commons.csv.issues;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVParser;
+import org.apache.commons.csv.CSVRecord;
+import org.junit.jupiter.api.Test;
+
+public class JiraCsv265Test {
+
+@Test
+public void testJiraCsv265Test() throws IOException {
+String csv = "# Comment1\n"
+   + "Header1,Header2\n"
+   + "# Comment2\n"
+   + "Value1,Value2\n"
+   + "# Comment3\n"
+   + "Value3,Value4\n"
+   + "# Comment4\n";
+CSVFormat csvFormat = 
CSVFormat.DEFAULT.withCommentMarker('#').withFirstRecordAsHeader();

Review comment:
   Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 622727)
Time Spent: 1h 10m  (was: 1h)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=622627&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-622627
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 14/Jul/21 17:56
Start Date: 14/Jul/21 17:56
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on a change in pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#discussion_r669833242



##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv265Test.java
##
@@ -0,0 +1,51 @@
+/*
+ * 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.commons.csv.issues;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.util.Iterator;
+
+import org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.CSVParser;
+import org.apache.commons.csv.CSVRecord;
+import org.junit.jupiter.api.Test;
+
+public class JiraCsv265Test {
+
+@Test
+public void testJiraCsv265Test() throws IOException {
+String csv = "# Comment1\n"
+   + "Header1,Header2\n"
+   + "# Comment2\n"
+   + "Value1,Value2\n"
+   + "# Comment3\n"
+   + "Value3,Value4\n"
+   + "# Comment4\n";
+CSVFormat csvFormat = 
CSVFormat.DEFAULT.withCommentMarker('#').withFirstRecordAsHeader();

Review comment:
   @king-tyler 
   May you please use the builder instead of the deprecated methods?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 622627)
Time Spent: 1h  (was: 50m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=622607&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-622607
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 14/Jul/21 17:14
Start Date: 14/Jul/21 17:14
Worklog Time Spent: 10m 
  Work Description: king-tyler commented on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-880066930


   @garydgregory 
   I rebased on master


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 622607)
Time Spent: 50m  (was: 40m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-06 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=619138&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-619138
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 06/Jul/21 11:22
Start Date: 06/Jul/21 11:22
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-874322360


   @king-tyler 
   May you please rebase on master?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 619138)
Time Spent: 40m  (was: 0.5h)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2021-07-05 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=618798&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-618798
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 05/Jul/21 20:48
Start Date: 05/Jul/21 20:48
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-874322360


   @king-tyler 
   May you please rebase on master?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 618798)
Time Spent: 0.5h  (was: 20m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2020-10-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=505840&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-505840
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 28/Oct/20 18:09
Start Date: 28/Oct/20 18:09
Worklog Time Spent: 10m 
  Work Description: coveralls commented on pull request #120:
URL: https://github.com/apache/commons-csv/pull/120#issuecomment-718114531


   
   [![Coverage 
Status](https://coveralls.io/builds/34535679/badge)](https://coveralls.io/builds/34535679)
   
   Coverage increased (+0.01%) to 98.516% when pulling 
**2d703d3b64f48ae7d0c89aec94994dd0150e4692 on king-tyler:CSV-265** into 
**6f78b6a339282187cdf4f432933027399fdf3898 on apache:master**.
   



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 505840)
Time Spent: 20m  (was: 10m)

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CSV-265) CSV comments break CSVRecord#getCharacterPosition

2020-10-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CSV-265?focusedWorklogId=505732&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-505732
 ]

ASF GitHub Bot logged work on CSV-265:
--

Author: ASF GitHub Bot
Created on: 28/Oct/20 14:24
Start Date: 28/Oct/20 14:24
Worklog Time Spent: 10m 
  Work Description: king-tyler opened a new pull request #120:
URL: https://github.com/apache/commons-csv/pull/120


   https://issues.apache.org/jira/browse/CSV-265



This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 505732)
Remaining Estimate: 0h
Time Spent: 10m

> CSV comments break CSVRecord#getCharacterPosition
> -
>
> Key: CSV-265
> URL: https://issues.apache.org/jira/browse/CSV-265
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Tyler King
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> The CSVRecord#getCharacterPosition method returns an incorrect value after 
> the CSVParser has encountered a comment in the CSV file.
> Example:
>  
> {code:java}
> String csv = "# Comment\n"
>+ "Headers,Header2\n"
>+ "Value1,Value2\n";
> CSVFormat format = 
> CSVFormat.EXCEL.withCommentMarker('#').withFirstRecordAsHeader();
> CSVParser parser = new CSVParser(new StringReader(csv), format);
> long expectedPosition = csv.indexOf("Value1");
> long actualPosition = parser.iterator().next().getCharacterPosition();
> assertEquals(expectedPosition, actualPosition);{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)