An array type variable declaration must go with initialization in the same expression. Like long[] reservedFromIps = { /* ... */} . This is required by syntactic sugar (with which we can only initialize the array with {} ).
eg. the following should work:
static { reservedFromIps = new long[] {0l, 167772160l, 1681915904l, 2130706432l, 2851995648l, 2886729728l, 3221225984l, 3227017984l, 3232235520l, 3323068416l, 3325256704l, 3405803776l, 3758096384l, 4026531840l, 4294967295l}; }
Reason why the following
private static final long[] reservedFromIps = {0l, 167772160l, 1681915904l, 2130706432l, 2851995648l, 2886729728l, 3221225984l, 3227017984l, 3232235520l, 3323068416l, 3325256704l, 3405803776l, 3758096384l, 4026531840l, 4294967295l};
works because in this case the declaration and initialization of the reservedFromIps array are in the same expression.
source share