yegor256/rultor

Tail.java:259 FakeConnect.read() XPath has stray trailing space inside text()

Open

#2,367 opened on Jun 12, 2026

 (1 comment) (0 reactions) (0 assignees)Java (165 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (575 stars)
PR merge metrics
 (PR metrics pending)

Description

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.

Contributor guide