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: Remove escaping of ' in a CtLiteral<String> #5070

Merged
merged 8 commits into from
Apr 6, 2023

Conversation

MartinWitt
Copy link
Collaborator

@MartinWitt MartinWitt commented Jan 10, 2023

Currently, spoon escapes every ' in a CtLiteral<String> without a source position. In a string escaping ' is not necessary.

This is only relevant for CtLiterals without a position.
In strings escaping ' is not necessary.
@MartinWitt
Copy link
Collaborator Author

MartinWitt commented Jan 10, 2023

I could create another method overload(1) to fix the constant value warning. But this would increase the size of the class unnecessary. Any opinions?

(1) Actually this is not a method overload because the methods are static

@MartinWitt MartinWitt changed the title wip: fix: Remove escaping of ' in a CtLiteral<String> fix: Remove escaping of ' in a CtLiteral<String> Jan 10, 2023
@MartinWitt MartinWitt changed the title fix: Remove escaping of ' in a CtLiteral<String> review: fix: Remove escaping of ' in a CtLiteral<String> Jan 10, 2023
@I-Al-Istannen
Copy link
Collaborator

* This exists for backwards compatibility

The method seems to be package private, why do you need to keep it if it is never called?

@MartinWitt
Copy link
Collaborator Author

I thought about the one guy creating his code inside the same package in his project. I can remove this method if we ignore that one guy.

@I-Al-Istannen
Copy link
Collaborator

Yes, I would ignore them.

@MartinWitt MartinWitt force-pushed the bug/tooStrictEscaping branch from 8d035c0 to 62b9300 Compare March 4, 2023 16:51
@MartinWitt MartinWitt requested a review from I-Al-Istannen March 5, 2023 15:44
@I-Al-Istannen I-Al-Istannen changed the title review: fix: Remove escaping of ' in a CtLiteral<String> fix: Remove escaping of ' in a CtLiteral<String> Apr 6, 2023
@I-Al-Istannen I-Al-Istannen merged commit 8d5f42d into master Apr 6, 2023
@I-Al-Istannen I-Al-Istannen deleted the bug/tooStrictEscaping branch April 6, 2023 08:24
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