diff options
Diffstat (limited to 'src/utils/lombok/javac')
-rw-r--r-- | src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java | 8 |
1 files changed, 1 insertions, 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); } |