[
https://issues.apache.org/jira/browse/CSV-173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15149515#comment-15149515
]
Gary Gregory commented on CSV-173:
----------------------------------
I like final because it allows the JVM to optimize best and gives us the
freedom to fiddle with the class.
I wonder if adding a record factory class would be best here?
{code:java}
CSVRecordFactory.getDefault().newRecord(...)
{code}
Would your code be OK to call a factory method. This would give us the most
flexibility moving forward.
Hm... but we do not have a record interface, I would probably want to add one
of those as well...
> Update CSVRecord Constructor
> ----------------------------
>
> Key: CSV-173
> URL: https://issues.apache.org/jira/browse/CSV-173
> Project: Commons CSV
> Issue Type: Improvement
> Components: Parser
> Affects Versions: 1.2
> Reporter: Mike Foody
> Priority: Minor
>
> Thanks for the solid library. This is a simple change but the fact that
> CSVRecord is final and doesn't have a public constructor means you end up
> having to write more code than seems necessary just to instantiate instances
> for test cases. If it was made non final then most mocking frameworks would
> happily mock it or if it had a public constructor it could just be
> instantiated.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)