If the Java source code contains a string literal ending with a properly escaped backslash, the Java parser is prone to fail with a (false) syntax error. It wrongly associates the second backslash with the ending quote, thus preventing the detection of the string literal end:
error.syntax in file "D:\SW-Produkte\Structorizer\tests\Issue1131_Java_import\Structorizer_mod.java"
Preceding source context:
1662: String problems = "";
1663: File configDir = configFile.getParentFile();
1664: File homeDir = new File(System.getProperty("user.home"));
1665: StringList pathParts = new StringList();
1666: while (configDir != null && homeDir != null) {
1667: if (homeDir.equals(configDir)) {
1668: pathParts.add("%h");
1669: homeDir = null;
1670: }
1671: else if (configDir.getName().isEmpty()) {
1672: pathParts.add(configDir.toString().replace(":\\", "» :"));
Found token ':'
Expected: ')' | ','
If the Java source code contains a string literal ending with a properly escaped backslash, the Java parser is prone to fail with a (false) syntax error. It wrongly associates the second backslash with the ending quote, thus preventing the detection of the string literal end: