diff options
Diffstat (limited to 'src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java')
-rw-r--r-- | src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java b/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java index d0cac9ad..c9ae092e 100644 --- a/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java +++ b/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java @@ -72,11 +72,13 @@ public class CommentCollectingScannerFactory extends ScannerFactory { super(context); } + @SuppressWarnings("all") @Override public Scanner newScanner(CharSequence input, boolean keepDocComments) { char[] array; if (input instanceof CharBuffer && ((CharBuffer) input).hasArray()) { - array = ((CharBuffer) input).compact().flip().array(); + // yes, the char[] cast is necessary + array = (char[]) ((CharBuffer) input).compact().flip().array(); } else { array = input.toString().toCharArray(); } @@ -85,6 +87,6 @@ public class CommentCollectingScannerFactory extends ScannerFactory { @Override public Scanner newScanner(char[] input, int inputLength, boolean keepDocComments) { - return new CommentCollectingScanner(this, new CommentCollectingTokenizer(this, input, inputLength, findTextBlocks)); + return new CommentCollectingScanner(this, CommentCollectingTokenizer.create(this, input, inputLength, findTextBlocks)); } } |