foo.properties is not print idempotent due to `key==value`
Bananeweizen opened this issue · comments
Michael Keppler commented
What version of OpenRewrite are you using?
I am using
- Maven/Gradle 5.2.1
What is the smallest, simplest way to reproduce the problem?
foo.properties containing
key==value
What is the full stack trace of any errors you encountered?
[WARNING] There were problems parsing foo.properties
[WARNING] java.lang.IllegalStateException: foo.properties is not print idempotent.
... (skipped diff header output)
-key==value
+key=value
...
org.openrewrite.Parser.requirePrintEqualsInput(Parser.java:52)
I checked the Javadoc of Properties and an equals sign immediately after the first equals should be considered part of the value. Also when loading "key==value" into Java properties, it returns "=value" when asking for "key".
Are you interested in contributing a fix to OpenRewrite?
Not for this one.
Tim te Beek commented
Oh wow, curious case once again. Thanks for reporting it here!