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

Jar parser chokes on empty lines #2179

Closed
ecki opened this issue Sep 27, 2023 · 1 comment · Fixed by #2254
Closed

Jar parser chokes on empty lines #2179

ecki opened this issue Sep 27, 2023 · 1 comment · Fixed by #2254
Assignees
Labels
bug Something isn't working good-first-issue Good for newcomers

Comments

@ecki
Copy link

ecki commented Sep 27, 2023

if strings.TrimSpace(line) == "" {

We have manifests which contain something like this. The line is leading with a blank, so it is not an empty line which should trigger the section change. I guess removing the Trim would fix this problem ($ denotes line end):

Key-keykeykey: initialconfig:com/seeburger/aqmtestclient/aqmtestclient$
 ,$
  line1,$
  line2,$
        $    # aka not empty line
  line3,$

That value (especially line break semantics) is not so important for the analysis, but the warnings are annoying.

@wagoodman wagoodman added the bug Something isn't working label Sep 27, 2023
@wagoodman wagoodman changed the title Jar parser jokes on empty lines Jar parser chokes on empty lines Sep 27, 2023
@wagoodman
Copy link
Contributor

I think this might be as simple as removing the strings.TrimSpace, however, this needs to be verified.

Dev note: for the person picking this up, on top of fixing the correctness issue we should also try and improve the manifest parser to not log too many warnings under these conditions (be a little more resilient) .

@wagoodman wagoodman added the good-first-issue Good for newcomers label Sep 28, 2023
@spiffcs spiffcs self-assigned this Oct 24, 2023
@spiffcs spiffcs linked a pull request Oct 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good-first-issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants