<BUG>String shortenedText = text;List<String> breakSplitted = Arrays.asList(shortenedText.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());if (breakSplitted.size() > 1) {</BUG><CONTEXT>list.add(text.length());return list;}public static String[] splitText(PDFont font, int fontSize, float allowedWidth, String text) {String endPart = "";<extra_id_0>String[] splittedFirst = splitText(font, fontSize, allowedWidth, breakSplitted.get(0));StringBuilder remaining = new StringBuilder(splittedFirst[1] == null ? "" : splittedFirst[1] + "\n");</CONTEXT>
List<String> breakSplitted = Arrays.asList(text.split("(\\r\\n)|(\\n)|(\\n\\r)")).stream().collect(Collectors.toList());if (breakSplitted.size() > 1) {