GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — A long string containing \\t fails to format: spurious "unclosed string literal" · Issue #32 · openjavaformat/open-java-format Closed Labels bugSomething isn't workingSomething isn't working DescriptionWhatReported upstream as palantir/palantir-java-format#1680 (open since 2026-05-29, no comments). It reproduces here on 2.98.0.2. Minimal case: class C { void m(java.sql.Connection con) throws Exception { con.createStatement() .execute("ALTER DATABASE tempdb MODIFY FILE (NAME = 'tempdev', FILENAME = 'D:\\tempDb\\DATA\\tempdb.mdf')"); } }
In the upstream report the errors point at methods further down the file, which makes the cause hard to see: the line and column come from the rewritten source the formatter parses to check itself, not from the file on disk. Why it happens
"ALTER DATABASE tempdb MODIFY FILE (NAME = 'tempdev', FILENAME = 'D:\\tempDb\\DATA\" + "\tempdb.mdf')" The first piece ends in a lone backslash, which escapes the closing quote — that is the error. The second piece starts with
FixWalk the literal left to right consuming escape sequences, so that Mind the output promise: files whose long strings contain Done when
Activity
MetadataMetadataAssigneesLabelsbugSomething isn't workingSomething isn't working TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |