void (String text) { String currentPrefix = text.isEmpty() ? "^" : text.substring(0, 1); if (<warning descr="Condition '!currentPrefix.isEmpty()' is always 'true'">!currentPrefix.isEmpty()</warning> && Character.isDigit(currentPrefix.charAt(0))) { currentPrefix = ""; } System.out.println(currentPrefix); }