Skip to content

Annotate plugin should trim strings #619

@mattrpav

Description

@mattrpav

Given an annotation that takes a value as a constructor (ie Jackson's JsonRootName):

<jaxb:bindings node="xs:complexType[@name='DataModelType']">
  <annox:annotate>
    <annox:annotate annox:class="com.fasterxml.jackson.annotation.JsonRootName">DataModelType<annox:annotate>
  </annox:annotate>
  ...

if the bindings file gets formatted to wrap the line (ie editorconfig), the resulting annotation will contain the line wrap

Formatted:

<jaxb:bindings node="xs:complexType[@name='DataModelType']">
  <annox:annotate>
    <annox:annotate annox:class="com.fasterxml.jackson.annotation.JsonRootName">
       DataModelType<annox:annotate>
  </annox:annotate>
  ...

Output:

@JsonRootName("\n        DataModelType")

Fix: The annotation plugin should trim values to remove whitespace by default

Metadata

Metadata

Labels

annotateIssue concerns annotate pluginannoxIssue concerns annoxenhancement

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions