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: PROTO_SCHEMA generated value with unclosed string literal #279

Merged

Conversation

israel-ramos
Copy link
Contributor

The issue:

  • The value being generated for constant PROTO_SCHEMA was adding odd quotes in the middle of the string. So the generated value could not be compiled.
    image

The cause:

  • The method makeStringLiteral, used to generate the value for PROTO_SCHEMA, was building the string iterating char by char and appending line breaks, slashes, quotes and plus signs in order to transform the string to literal keeping that as multi line.

Suggested fix:

  • The method was refactored to use java builtin multi-line string support with triple quotes (""" ...multi line string here... """). So, no need to escape line breaks any more.

@tristantarrant tristantarrant added this to the 5.0.5.Final milestone Jun 3, 2024
@tristantarrant
Copy link
Member

Nice fix. Thanks

@tristantarrant tristantarrant merged commit 1cbdcba into infinispan:main Jun 3, 2024
7 checks passed
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

Successfully merging this pull request may close these issues.

2 participants