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

Fix incorrect parsing of comma-separate Jib property values #3522

Merged
merged 2 commits into from
Dec 6, 2021

Conversation

chanseokoh
Copy link
Member

Fixes #2224.

The only character we interpret in a special way is a comma (to separate tokens when parsing a list or a map). There should be a way to put a comma is to escape it, and that's the only character we need escaping for. However, the previous implementation didn't drop the slash used for escaping.

@suztomo
Copy link
Contributor

suztomo commented Dec 6, 2021

Which test case represents the problem in this comment #2224 (comment) ?

Escaping is tough to understand for me. It would be helpful if you can add a comment in the test case such as

// A case for command line parameter: -Djib.container.jvmFlags="-agentlib:jdwp=transport=dt_socket,server=y"

@chanseokoh
Copy link
Member Author

testParseListProperty() and testParseMapProperty(). So the test cases in those methods have been updated. Any changes to other methods are Truth migration.

Escaping is tough to understand for me. It would be helpful if you can add a comment in the test case such as

I just added another test case of -Xmx2g,-agentlib:jdwp=transport=dt_socket\,server=y\,address=*:5005.

@sonarcloud
Copy link

sonarcloud bot commented Dec 6, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@suztomo suztomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. Thank you.

@chanseokoh chanseokoh merged commit 0392bda into master Dec 6, 2021
@chanseokoh chanseokoh deleted the i2224-command-line-comma-escaping branch December 6, 2021 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Properties with commas in the value
2 participants