Reading the error, it seems the issue is the default value "[]" which a
List, not an Array...
is there a way to change the default value to an Array? Seems like that
would be a more useful solution.
Tnx Szymon. I opted for the first solution without CompileStatic.
You might actually don't need the @CompileStatic annotation in this
example. Here is what the bytecode decompiled to the Java class looks like
(an example without static compilation enabled):
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//
Without static compilation, annotation defined as bellow works as expected:
@interface SomeAnnitation {
Class[] someAttribute default []
}
However, with static compilation,
@CompileStatic
@interface SomeAnnitation {
Class[] someAttribute default []
}
I'm getting an error saying "Cannot