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

'remove-file-header' goal leaves the '\n' character, which should be avoided. #129

Closed
xeagle2 opened this issue Apr 14, 2018 · 1 comment
Milestone

Comments

@xeagle2
Copy link
Contributor

xeagle2 commented Apr 14, 2018

Hello there,

When the RemoveFileHeaderMojo removes the license it calculates the lastChar of '\n'

while ( lastchar != '\n' )
{
            lastchar = content.charAt( ( ++lastIndex ) );
}

A few lines lower there is a concatenation

String contentWithoutHeader = content.substring( 0, firstIndex ) + content.substring( lastIndex );

where substring method takes the lastIndex inclusive which is '\n'.

xeagle2 added a commit to xeagle2/license-maven-plugin that referenced this issue Apr 14, 2018
tchemit pushed a commit that referenced this issue Apr 14, 2018
…uld be avoided. #129' (#131)

* Fixed "Configuration property 'trimHeaderLine' doesn't take any effect. #128"

* Fixed "'remove-file-header' goal leaves the '\n' character, which should be avoided. #129"
@ppalaga
Copy link
Contributor

ppalaga commented Jan 4, 2019

The fix seems to have been merged. Feel free to reopen if that's not the case.

@ppalaga ppalaga closed this as completed Jan 4, 2019
@ppalaga ppalaga added this to the 1.17 milestone Feb 1, 2019
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

2 participants