aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2021-03-19 02:02:36 +0100
committerRoel Spilker <r.spilker@gmail.com>2021-03-19 02:02:36 +0100
commitcbf930a9b8245aab402f68e1b0acbb948cd78d8f (patch)
tree3c390c348caa79934d078e45efc5c82c399ca30a
parenta5b7439516cdea9bce49f3403b637fb0b08f84a9 (diff)
downloadlombok-cbf930a9b8245aab402f68e1b0acbb948cd78d8f.tar.gz
lombok-cbf930a9b8245aab402f68e1b0acbb948cd78d8f.tar.bz2
lombok-cbf930a9b8245aab402f68e1b0acbb948cd78d8f.zip
[jdk16] forget optimization...
-rw-r--r--src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java8
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);
}