Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 toDate methods in com.univocity.parsers.conversions.Conversions causing compile error #503

Open
dan-s1 opened this issue Apr 28, 2022 · 0 comments

Comments

@dan-s1
Copy link

dan-s1 commented Apr 28, 2022

When attempting to use com.univocity.parsers.conversions.Conversions toDate method
to perform conversions on a record

parser.getRecordMetadata().convertFields(Conversions.toDate(someDateObj, "yyyy-MM-dd'T'HH:mm:ss")).set("someField")

I got a compile error in Intellij and when trying to build with Maven that this method was ambiguous since another method matched. Message in Intellij was:
"Ambiguous method call. Both toDate(Date, String...) in Conversions and toDate(Date, String, String...) in Conversions match."

I assume the other method Intellij and Maven are complaining about is com.univocity.parsers.conversions.Conversions toDate method with signature:
public static DateConversion toDate(Date dateIfNull, String stringIfNull, String... dateFormats)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant