Should be (note "final" and typo correction):
final String pathConverted = on(separator).join(pathSegments);