From cbf930a9b8245aab402f68e1b0acbb948cd78d8f Mon Sep 17 00:00:00 2001 From: Roel Spilker Date: Fri, 19 Mar 2021 02:02:36 +0100 Subject: [jdk16] forget optimization... --- src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java b/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java index c9ae092e..767cbf5b 100644 --- a/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java +++ b/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java @@ -75,13 +75,7 @@ public class CommentCollectingScannerFactory extends ScannerFactory { @SuppressWarnings("all") @Override public Scanner newScanner(CharSequence input, boolean keepDocComments) { - char[] array; - if (input instanceof CharBuffer && ((CharBuffer) input).hasArray()) { - // yes, the char[] cast is necessary - array = (char[]) ((CharBuffer) input).compact().flip().array(); - } else { - array = input.toString().toCharArray(); - } + char[] array = input.toString().toCharArray(); return newScanner(array, array.length, keepDocComments); } -- cgit