{"record":{"id":"fac80655cb41bc09","repo":"projectlombok/lombok","slug":"unclosed-in-file-fac806","errorCode":null,"errorMessage":"Unclosed ' in @ file","messagePattern":"Unclosed ' in @ file","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/delombok/lombok/delombok/Delombok.java","lineNumber":447,"sourceCode":"\t\t\t\tif (c == '\\'') {\n\t\t\t\t\tstate = 1;\n\t\t\t\t\tx.add(a.toString());\n\t\t\t\t\ta.setLength(0);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\ta.append(c);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (state == 1) {\n\t\t\tString aa = a.toString();\n\t\t\tif (!aa.isEmpty()) x.add(aa);\n\t\t} else if (state < 0) {\n\t\t\tthrow new IOException(\"Unclosed backslash escape in @ file\");\n\t\t} else if (state == 2) {\n\t\t\tthrow new IOException(\"Unclosed \\\" in @ file\");\n\t\t} else if (state == 3) {\n\t\t\tthrow new IOException(\"Unclosed ' in @ file\");\n\t\t}\n\t\t\n\t\treturn x.toArray(new String[0]);\n\t}\n\t\n\tpublic static class InvalidFormatOptionException extends Exception {\n\t\tpublic InvalidFormatOptionException(String msg) {\n\t\t\tsuper(msg);\n\t\t}\n\t}\n\t\n\tpublic static Map<String, String> formatOptionsToMap(List<String> formatOptions) throws InvalidFormatOptionException {\n\t\tboolean prettyEnabled = false;\n\t\tMap<String, String> formatPrefs = new HashMap<String, String>();\n\t\tfor (String format : formatOptions) {\n\t\t\tint idx = format.indexOf(':');\n\t\t\tif (idx == -1) {\n\t\t\t\tif (format.equalsIgnoreCase(\"pretty\")) {","sourceCodeStart":429,"sourceCodeEnd":465,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/delombok/lombok/delombok/Delombok.java#L429-L465","documentation":"Thrown by readArgsFromFile when the tokenizer of an @ argument file reaches end of input while still inside a single-quoted token (state == 3). It fires when the @ file contains a ' that opens a quoted argument but the quote is never closed before the file ends, so the argument list cannot be tokenized reliably. This is a generic sentinel-style validation error naming the malformed input (an unterminated single-quoted token in the @ file), not a wrapper around any underlying failure.","triggerScenarios":"An @argfile line contains an apostrophe or single-quoted argument that is never closed before end of input, e.g. -d 'C:\\my output or an English possessive apostrophe (don't) inside a value.","commonSituations":"Copy-pasted shell commands with single quotes; prose-like values containing apostrophes (don't, user's) pasted into the argfile; editors auto-correcting or stripping trailing quotes.","solutions":["Add the closing single quote for every quoted segment","Avoid apostrophes in argument values, or quote them with double quotes instead: \"don't\"","Verify the argfile with a plain-text editor showing all quote characters (disable smart quotes)"],"exampleFix":"// before (@args.txt)\n--src 'C:\\Users\\john's files\n// after (@args.txt)\n--src 'C:\\Users\\john''s files'","handlingStrategy":"validation","validationCode":"long c = line.chars().filter(ch -> ch == '\\'').count();\nif (c % 2 != 0) throw new IllegalArgumentException(\"Unbalanced single quotes in argfile line: \" + line);","typeGuard":null,"tryCatchPattern":"try { return delombok.parts(new String[]{\"@args.txt\"}); } catch (IOException e) { if (e.getMessage().contains(\"Unclosed '\")) { /* repair quotes and retry */ } throw e; }","preventionTips":["Avoid apostrophes in argument values or wrap them in double quotes","Check prose-like values (possessives) for stray apostrophes","Keep argfiles ASCII-only plain text"],"tags":["delombok","argfile","parsing","io"],"backgroundTag":"invalid-argument-format","analyzedSha":"6d6a3e9fec0a9555702561fbeb8eac836575116e","analyzedAt":"2026-09-07T23:18:01.841Z","contentChangedAt":"2026-09-07T23:18:01.841Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}