mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 14:16:39 +00:00
Replace val with native final var in Java >= 10
This commit is contained in:
1 parent
e050dafc90
commit
fdcbaa033d
36 files changed
+128
-16
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// version 10:
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class ValToNative {
|
||||
private void test() throws IOException {
|
||||
final var intField = 1;
|
||||
for (final var s : Arrays.asList("1")) {
|
||||
final var s2 = s;
|
||||
}
|
||||
try (var in = getClass().getResourceAsStream("ValToNative.class")) {
|
||||
final var j = in.read();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user