You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm also hitting this issue on v1.22. Notably the error also goes away if you manually reflow the string so that it complies with line length limitations.
Seems to have something to do with the length, the backslashes, and case of the characters. Here are some positive and negative cases.
// This one works
String test = "AB\\ABCDEFGH\\ABCDEFGHIJKLMNO\\ABCEFGHIJLMNPQRSTUV\\TRUNK\\SRC\\MAIN\\WEBAPP\\WEB-INF\\ABC";
// This one does NOT
String test = "ab\\abcdefgh\\abcdefghijklmno\\abcefghijlmnpqrstuv\\trunk\\src\\main\\webapp\\web-inf\\abc";
// This one works
String test = "ab\\abcdefgh\\abcdefghijklmno\\abcefghijlmnpqrstuv\\trunk\\src\\main\\webapp\\web-inf\\ab";
// This one works
String test = "12\\12345678\\123456789012345\\1234567890123456789\\12345\\123\\1234\\123456\\1234567\\123";
In version n1.24.0 of google-java-format_windows-x86-64.exe a long string literal that contains two backslashes followed by 't' results in an error.
Negative example:
Tool invocation and error message:
Positive example. This can be formatted.
Update: Using parameter
--skip-reflowing-long-strings
avoids this error!The text was updated successfully, but these errors were encountered: