aboutsummaryrefslogtreecommitdiff
path: root/src/utils/lombok/javac
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2021-02-02 09:44:36 +0100
committerRoel Spilker <r.spilker@gmail.com>2021-09-06 11:58:05 +0200
commitfdcbaa033d27b344adfea99d8d7bdd99cceacfb3 (patch)
tree5f385d9d193bd66ac7b5036f0f1b63fce4405cfe /src/utils/lombok/javac
parente050dafc9016519e79184e383eab9ffbd579bebd (diff)
downloadlombok-fdcbaa033d27b344adfea99d8d7bdd99cceacfb3.tar.gz
lombok-fdcbaa033d27b344adfea99d8d7bdd99cceacfb3.tar.bz2
lombok-fdcbaa033d27b344adfea99d8d7bdd99cceacfb3.zip
Replace val with native final var in Java >= 10
Diffstat (limited to 'src/utils/lombok/javac')
-rw-r--r--src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java b/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java
index f29f501b..e625cd8d 100644
--- a/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java
+++ b/src/utils/lombok/javac/java8/CommentCollectingScannerFactory.java
@@ -21,6 +21,7 @@
*/
package lombok.javac.java8;
+import java.nio.Buffer;
import java.nio.CharBuffer;
import com.sun.tools.javac.parser.Scanner;
@@ -79,7 +80,7 @@ public class CommentCollectingScannerFactory extends ScannerFactory {
int limit;
if (input instanceof CharBuffer && ((CharBuffer) input).hasArray()) {
CharBuffer cb = (CharBuffer) input;
- cb.compact().flip();
+ ((Buffer)cb.compact()).flip();
array = cb.array();
limit = cb.limit();
} else {