Tail.java:259 FakeConnect.read() XPath has stray trailing space inside text()
#2367 aperta il 12 giu 2026
Metriche repository
- Star
- (575 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Tail.FakeConnect.read() in src/main/java/com/rultor/agents/daemons/Tail.java reads the daemon directory with this.xml.xpath("/talk/daemon/dir/text() "), with a trailing space inside the XPath expression. Every other caller in the same file uses /talk/daemon/dir/text() without the trailing space, including SSHConnect.read() ten lines earlier and EndsDaemon.process() in the neighbouring class.
The trailing space is tolerated by the current XPath engine, but the expression is no longer recognised by a literal search of the codebase, and the cosmetic drift between two callers that mean the same thing is a footgun the next time someone tries to refactor or grep for the XPath. The mismatch slipped past xslint because the literal is a Java string, not an XSL document.
Drop the trailing space on the text() call at line 259 so the FakeConnect path matches the rest of the file. No behaviour change is expected.