[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2022-02-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Feb/22 17:07
Start Date: 19/Feb/22 17:07
Worklog Time Spent: 10m 
  Work Description: garydgregory merged pull request #114:
URL: https://github.com/apache/commons-csv/pull/114


   


-- 
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: 730056)
Time Spent: 4.5h  (was: 4h 20m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2022-02-19 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 19/Feb/22 17:07
Start Date: 19/Feb/22 17:07
Worklog Time Spent: 10m 
  Work Description: garydgregory edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-874321915


   @SethFalco 
   Please accept my apologies for the delay in further reviewing this PR.
   
   I feel there is something important missing here:
   
   - What happens/should happen for each enum value when you call 
`CSVRecord.get(String)`.
   - What happens/should happen for each enum value when you call 
`CSVRecord.toMap()`.
   
   For example, if duplicate headers are allowed, does the first column win? 
Should it? Does the last column win? Certainly, it should not be random or 
undocumented.
   
   Also, would you mind rebasing on master please? I've recently deprecated the 
`with` methods in favor of a Builder. New settings should be added through the 
Builder, not `with` 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: 730055)
Time Spent: 4h 20m  (was: 4h 10m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2021-12-26 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 26/Dec/21 18:49
Start Date: 26/Dec/21 18:49
Worklog Time Spent: 10m 
  Work Description: SethFalco commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-1001226987


   Just rebased this to resolve merge conflicts.
   
   > I'd like feedback from the community as well.
   
   Seems no one wants to comment on this. ^-^' 
   
   Any chance this could be merged soon, or still waiting on feedback? (Note, 
I'm in no rush.)


-- 
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: 701207)
Time Spent: 4h 10m  (was: 4h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 09/Jul/21 15:38
Start Date: 09/Jul/21 15:38
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-877275446


   @SethFalco 
   TY, the PR looks good to me. I'd like feedback from the community as well.


-- 
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: 621035)
Time Spent: 4h  (was: 3h 50m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 09/Jul/21 14:29
Start Date: 09/Jul/21 14:29
Worklog Time Spent: 10m 
  Work Description: SethFalco commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-877230492


   Sorry about the imports, I'm guessing that due to a setting in IntelliJ 
setting back when I was using that.
   I've rebased with master and done the requested changes. (I hope!)


-- 
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: 620998)
Time Spent: 3h 50m  (was: 3h 40m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

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



##
File path: src/main/java/org/apache/commons/csv/CSVFormat.java
##
@@ -1439,9 +1455,21 @@ public String format(final Object... values) {
  *
  * @return whether duplicate header names are allowed
  * @since 1.7
+ * @deprecated Use {@link #getDuplicateHeaderMode()}.
  */
+@Deprecated
 public boolean getAllowDuplicateHeaderNames() {
-return allowDuplicateHeaderNames;
+return duplicateHeaderMode == DuplicateHeaderMode.ALLOW_ALL;
+}
+
+/**
+ * Returns how duplicate headers are handled.

Review comment:
   "Returns" -> "Gets"
   

##
File path: src/main/java/org/apache/commons/csv/CSVFormat.java
##
@@ -1439,9 +1455,21 @@ public String format(final Object... values) {
  *
  * @return whether duplicate header names are allowed
  * @since 1.7
+ * @deprecated Use {@link #getDuplicateHeaderMode()}.
  */
+@Deprecated
 public boolean getAllowDuplicateHeaderNames() {
-return allowDuplicateHeaderNames;
+return duplicateHeaderMode == DuplicateHeaderMode.ALLOW_ALL;
+}
+
+/**
+ * Returns how duplicate headers are handled.
+ *
+ * @return if duplicate header values are allowed, allowed conditionally, 
or disallowed.
+ * @since 1.9

Review comment:
   "1.9" -> "1.9.0"

##
File path: src/main/java/org/apache/commons/csv/DuplicateHeaderMode.java
##
@@ -0,0 +1,43 @@
+/*
+ * 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;
+
+/**
+ * Determines how duplicate header fields should be handled
+ * if {@link CSVFormat#withHeader(String...)} is not null.
+ *
+ * @since 1.9
+ */
+public enum DuplicateHeaderMode {
+
+/**
+ * Allows all duplicate headings.
+ */
+ALLOW_ALL,
+
+/**
+ * Allows duplicate headings only if they're empty

Review comment:
   "headings" -> "headers"

##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv264Test.java
##
@@ -0,0 +1,98 @@
+/*
+ * 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 org.apache.commons.csv.CSVFormat;
+import org.apache.commons.csv.DuplicateHeaderMode;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import java.io.IOException;
+import java.io.StringReader;
+
+/**
+ * When {@link CSVFormat#withHeader(String...)} is not null;
+ * duplicate headers with empty strings should not be allowed.
+ *
+ * @see https://issues.apache.org/jira/projects/CSV/issues/CSV-264?filter=allopenissues";>Jira
 Ticker

Review comment:
   Simplify link, use https://issues.apache.org/jira/browse/CSV-264

##
File path: src/test/java/org/apache/commons/csv/issues/JiraCsv264Test.java
##
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. 

[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

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


   
   [![Coverage 
Status](https://coveralls.io/builds/41235098/badge)](https://coveralls.io/builds/41235098)
   
   Coverage increased (+0.02%) to 98.327% when pulling 
**1be64a61410300d4951524948d8be87771ec1928 on SethFalco:CSV-264** into 
**46bae4b99b3151e7bb358a5fcb896be44324282d 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: 620848)
Time Spent: 3.5h  (was: 3h 20m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 09/Jul/21 02:06
Start Date: 09/Jul/21 02:06
Worklog Time Spent: 10m 
  Work Description: SethFalco commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-876858602


   I didn't see it documented, figured the easiest way to find out would be to 
just test it.
   It currently uses the last column with the given name.
   
   > What happens/should happen for each enum value when you call 
CSVRecord.get(String).
   
   | A | A
   |---|---
   | 1 | 2
   | 3 | 4
   
   ```java
   List records = parser.getRecords();
   
   for (CSVRecord record : records)
   System.out.println(record.get("A"));
   
   // 2
   // 4
   ```
   
   > What happens/should happen for each enum value when you call 
CSVRecord.toMap().
   
   | A | A | B | B
   |---|---|---|---
   | 1 | 2 | 5 | 6
   | 3 | 4 | 7 | 8
   
   ```java
   List records = parser.getRecords();
   
   for (CSVRecord record : records) {
   Map map = record.toMap();
   System.out.println(map);
   }
   
   // {A=2, B=6}
   // {A=4, B=8}
   ```
   
   I think we could add a docstring on `CSVRecord#get` and `CSVRecord#toMap` to 
clarify this.
   We could also add something on `CSVFormat#setDuplicateHeaderMode`?
   
   It might be a good idea to add test cases to cover this scenario, if it'll 
become documented behavior.
   
   Mind if I do this in a separate PR?
   I'd say it counts as a separate change from this one, so it'll keep things 
tidier.


-- 
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: 620835)
Time Spent: 3h 20m  (was: 3h 10m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 09/Jul/21 01:18
Start Date: 09/Jul/21 01:18
Worklog Time Spent: 10m 
  Work Description: SethFalco edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-876841043


   It's worth noting this change doesn't impact how data is resolved internally 
or how headers are referenced, but just how if duplicate empty headers are 
allowed. I can peek into the current behavior anyway and try to document it if 
it's not already.
   
   Meanwhile, I've rebased with master.
   I also squashed my commits to make rebasing a bit easier.
   
   I also updated an exception to no longer recommend using one of the 
deprecated methods.
   
   Edit: Sorry, forgot to add @ Deprecated to the getter.


-- 
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: 620820)
Time Spent: 3h 10m  (was: 3h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 09/Jul/21 01:17
Start Date: 09/Jul/21 01:17
Worklog Time Spent: 10m 
  Work Description: SethFalco edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-876841043


   It's worth noting this change doesn't impact how data is resolved internally 
or how headers are referenced, but just how if duplicate empty headers are 
allowed. I can peek into the current behavior anyway and try to document it if 
it's not already.
   
   Meanwhile, I've rebased with master.
   I also squashed my commits to make rebasing a bit easier.
   
   I also updated an exception to no longer recommend using one of the 
deprecated methods.
   
   Edit: Sorry, forgot to add \@Deprecated to the getter.


-- 
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: 620819)
Time Spent: 3h  (was: 2h 50m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 09/Jul/21 01:11
Start Date: 09/Jul/21 01:11
Worklog Time Spent: 10m 
  Work Description: SethFalco commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-876841043


   It's worth noting this change doesn't impact how data is resolved internally 
or how headers are referenced, but just how if duplicate empty headers are 
allowed. I can peek into the current behavior anyway and try to document it if 
it's not already.
   
   Meanwhile, I've rebased with master.
   I also squashed my commits to make rebasing a bit easier.
   
   I also updated an exception to no longer recommend using one 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: 620818)
Time Spent: 2h 50m  (was: 2h 40m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

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


   @SethFalco 
   Please accept my apologieses for the delay in further reviewing this PR.
   
   I feel there is something important missing here:
   
   - What happens/should happen for each enum value when you call 
`CSVRecord.get(String)`.
   - What happens/should happen for each enum value when you call 
`CSVRecord.toMap()`.
   
   For example, if duplicate headers are allowed, does the first column win? 
Should it? Does the last column win? Certainly, it should not be random or 
undocumented.
   
   Also, would you mind rebasing on master please? I've recently deprecated the 
`with` methods in favor of a Builder. New settings should be added through the 
Builder, not `with` 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: 619193)
Time Spent: 2h 40m  (was: 2.5h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

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


   @SethFalco 
   Please accept my apologieses for the delay in further reviewing this PR.
   
   I feel there is something important missing here:
   
   - What happens/should happen for each enum value when you call 
`CSVRecord.get(String)`.
   - What happens/should happen for each enum value when you call 
`CSVRecord.toMap()`.
   
   For example, if duplicate headers are allowed, does the first column win? 
Should it? Does the last column win? Certainly, it should not be random or 
undocumented.
   
   Also, would you mind rebasing on master please? I've recently deprecated the 
`with` methods in favor of a Builder. New settings should be added through the 
Builder, not `with` 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: 618796)
Time Spent: 2.5h  (was: 2h 20m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2021-02-02 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 03/Feb/21 01:53
Start Date: 03/Feb/21 01:53
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-702969045


   
   [![Coverage 
Status](https://coveralls.io/builds/36798850/badge)](https://coveralls.io/builds/36798850)
   
   Coverage increased (+0.02%) to 98.469% when pulling 
**b2e67292fd1042c7eb1196ba2133ba6bb7a1ee11 on SethFalco:CSV-264** into 
**bf2f8093a49a3432be62e9fdae073e82ac78bd04 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: 546806)
Time Spent: 2h 20m  (was: 2h 10m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2020-12-17 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 17/Dec/20 12:21
Start Date: 17/Dec/20 12:21
Worklog Time Spent: 10m 
  Work Description: SethiPandi commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-747406922


   Just a heads up that this is rebased with `master` now!



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: 525523)
Time Spent: 2h 10m  (was: 2h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2020-12-13 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 13/Dec/20 15:27
Start Date: 13/Dec/20 15:27
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-702969045


   
   [![Coverage 
Status](https://coveralls.io/builds/35672876/badge)](https://coveralls.io/builds/35672876)
   
   Coverage increased (+0.02%) to 98.471% when pulling 
**a22ace9ef658f7fb5fce66e2613dc88f0eb32488 on SethiPandi:CSV-264** into 
**7ebb8db97794986ef958a8b9a50d057940b58105 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: 523609)
Time Spent: 2h  (was: 1h 50m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2020-12-12 Thread ASF GitHub Bot (Jira)


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

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

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


   
   [![Coverage 
Status](https://coveralls.io/builds/35664297/badge)](https://coveralls.io/builds/35664297)
   
   Coverage increased (+0.02%) to 98.473% when pulling 
**3268d4e831dd9f98e8aceacdad02d24d739a11e8 on SethiPandi:CSV-264** into 
**e5fbba3eb326bf6443167df90f32560e66fa102a 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: 523439)
Time Spent: 1h 50m  (was: 1h 40m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2020-12-12 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 12/Dec/20 16:47
Start Date: 12/Dec/20 16:47
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-743782488


   @SethiPandi 
   Please rebase on master.
   TY!
   Gary
   



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: 523433)
Time Spent: 1h 40m  (was: 1.5h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2020-11-30 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 01/Dec/20 02:13
Start Date: 01/Dec/20 02:13
Worklog Time Spent: 10m 
  Work Description: SethiPandi commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-736170787


   Not sure if you guys are interested in merging this PR, but figured I'd fix 
the merge conflicts that appeared from recent commits.
   



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: 518239)
Time Spent: 1.5h  (was: 1h 20m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

2020-11-30 Thread ASF GitHub Bot (Jira)


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

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

Author: ASF GitHub Bot
Created on: 01/Dec/20 02:10
Start Date: 01/Dec/20 02:10
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-702969045


   
   [![Coverage 
Status](https://coveralls.io/builds/35343192/badge)](https://coveralls.io/builds/35343192)
   
   Coverage increased (+0.02%) to 98.473% when pulling 
**0cf7e4e04572325bc88a3f8ac6e8b51ac3393d37 on SethiPandi:CSV-264** into 
**2ac83980ea4630bf92c2bbcf15c6efaa9e71cb3e 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: 518233)
Time Spent: 1h 20m  (was: 1h 10m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 06/Oct/20 23:29
Start Date: 06/Oct/20 23:29
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-704605916


   You can force push to your branch all you want; -) we usually do not rewrite 
history for long lived branches like master and release.



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: 496234)
Time Spent: 1h 10m  (was: 1h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 05/Oct/20 13:49
Start Date: 05/Oct/20 13:49
Worklog Time Spent: 10m 
  Work Description: coveralls edited a comment on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-702969045


   
   [![Coverage 
Status](https://coveralls.io/builds/33933379/badge)](https://coveralls.io/builds/33933379)
   
   Coverage increased (+0.01%) to 98.521% when pulling 
**9590db2520a3a1e56df0a53acacf0d13e28e4b3a on SethiPandi:CSV-264** into 
**84aabf0009012652621aeae186e40941cf0a0b5d 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: 495334)
Time Spent: 1h  (was: 50m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 05/Oct/20 13:18
Start Date: 05/Oct/20 13:18
Worklog Time Spent: 10m 
  Work Description: SethiPandi commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-703626038


   Sorry about that, I rebased master and applied the changes requested.
   I believe this should be good now, though I'll take a peek at the 
unsuccessful checks now.
   
   I usually use `git pull` and `git merge` to obtain changes, I'm a bit new to 
using `rebase` however.  
   I'm not 100% sure if I was supposed to use `git push --force-with-lease...`, 
but the usual `git push...` was throwing warnings, please let me know if that's 
a problem.



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: 495313)
Time Spent: 50m  (was: 40m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

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


   
   [![Coverage 
Status](https://coveralls.io/builds/33932397/badge)](https://coveralls.io/builds/33932397)
   
   Coverage decreased (-0.08%) to 98.422% when pulling 
**6d33ab6c0f293ae6f31e52dd3205ceb241944b15 on SethiPandi:CSV-264** into 
**84aabf0009012652621aeae186e40941cf0a0b5d 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: 495311)
Time Spent: 40m  (was: 0.5h)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 02/Oct/20 21:36
Start Date: 02/Oct/20 21:36
Worklog Time Spent: 10m 
  Work Description: coveralls commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-702969045


   
   [![Coverage 
Status](https://coveralls.io/builds/33899801/badge)](https://coveralls.io/builds/33899801)
   
   Coverage increased (+0.007%) to 98.513% when pulling 
**4b62b308bf3b7a04fc20c788f580022099dca6e2 on SethiPandi:CSV-264** into 
**d467e41a8faa4e3d528d94fc41b7dca8462b1622 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: 494160)
Time Spent: 0.5h  (was: 20m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 02/Oct/20 21:29
Start Date: 02/Oct/20 21:29
Worklog Time Spent: 10m 
  Work Description: aherbert commented on pull request #114:
URL: https://github.com/apache/commons-csv/pull/114#issuecomment-702966394


   Thanks for the PR. You have removed some public API methods. This is not 
allowed and would fail binary compatibility tests. I have enabled these on the 
CI environments. If you rebase on master the errors should appear in the checks.
   
   You can run:
   ```
   mvn
   ```
   
   on the project to see the full checks on the code. 
   
   The `mvn clirr:check` goal will fail and indicate the public methods that 
have been removed. These should be supported in addition to the new methods 
with the new duplicate header names enum.
   



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: 494157)
Time Spent: 20m  (was: 10m)

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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


[jira] [Work logged] (CSV-264) Duplicate empty header names are allowed even with `.withAllowDuplicateHeaderNames(false)`

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


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

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

Author: ASF GitHub Bot
Created on: 02/Oct/20 20:45
Start Date: 02/Oct/20 20:45
Worklog Time Spent: 10m 
  Work Description: SethiPandi opened a new pull request #114:
URL: https://github.com/apache/commons-csv/pull/114


   Instead of only having a boolean `true`/`false` for how duplicate header 
values are handled, this uses an enum instead.
   
   Previously the only possibilities were:
   * `true`: To allow duplicates.
   * `false`: To disallow duplicates, except empty cells which were allowed to 
be duplicates.
   
   This pull request makes an enum with three options:
   * `ALLOW_ALL`: To always allow duplicates. (Same as `true` previously.)
   * `ALLOW_EMPTY`: To allow duplicates only if they're empty cells. (Same as 
`false` previously.)
   * `DISALLOW`: To disallow all duplicates. 
   
   This provides a little more flexibility in the strictness for the parser, 
and makes what the options do clearer.
   
   Jira Issue: https://issues.apache.org/jira/browse/CSV-264



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: 494143)
Remaining Estimate: 0h
Time Spent: 10m

> Duplicate empty header names are allowed even with 
> `.withAllowDuplicateHeaderNames(false)`
> --
>
> Key: CSV-264
> URL: https://issues.apache.org/jira/browse/CSV-264
> Project: Commons CSV
>  Issue Type: Bug
>  Components: Parser
>Affects Versions: 1.8
>Reporter: Sagar Tiwari
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> I'm trying to parse to parse a csv like this:
>  
> {{CSVFormat.DEFAULT}}
> {{ .withHeader()}}
> {{ .withAllowDuplicateHeaderNames(false)}}
> {{ .withAllowMissingColumnNames()}}
> {{ .parse(InputStreamReader(FileInputStream(fl)))}}
>  
> One would expect this code to throw an error if the following csv is given as 
> input:
>  
>  
> {{"","a",""}}
> {{"1","X","3"}}
> {{"3","Y","4"}}
>  
> But it doesn't, and asking for `record.get("")` gives the value from the 
> second column. The first column is ignored.



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