mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
field can't be local if its initializer is not a constant
This commit is contained in:
+2
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<problems/>
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import java.util.*;
|
||||
|
||||
public class Outer {
|
||||
private final int value = calcValue();
|
||||
|
||||
int myValue;
|
||||
Set set = new HashSet();
|
||||
|
||||
int calcValue() {
|
||||
return set.size();
|
||||
}
|
||||
|
||||
void initMyValue() {
|
||||
myValue = value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user