[
https://issues.apache.org/jira/browse/DAFFODIL-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mike Beckerle updated DAFFODIL-1490:
------------------------------------
Priority: Minor (was: Major)
> Unnecessary creation of ParseError and UnparseError objects from ProcessError?
> ------------------------------------------------------------------------------
>
> Key: DAFFODIL-1490
> URL: https://issues.apache.org/jira/browse/DAFFODIL-1490
> Project: Daffodil
> Issue Type: Improvement
> Components: Clean Ups
> Reporter: Taylor Wise
> Priority: Minor
>
> Looking through the Runtime.scala code you will find under doParse and the
> unparse methods a case statement for when ProcessingErrors are caught.
> Within this statement we do:
> state.setFailed(x.toParseError)
> This seems unnecessary as the ProcessingError is already an object. The
> toParseError or toUnparseError call on the existing ProcessingError object
> creates yet another object which is then added to the diagnostics list. This
> seems wasteful as we're creating a new object for each existing ProcessError
> object.
> Also, is there a need to make a distinction between ProcessingErrors being
> either Parse or Unparse errors? Shouldn't we know that just by the fact that
> we 'got diagnostics' from the Parser or Unparser?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)