The following code shows a static field on an interface not initialized at the point when the constructor of an instance of an implementing class is being run.
Throws java.lang.IllegalAccessError when x is accessed via f.get(this).
I would expect x to have been initialized by this point. Is there something subtle in when interfaces are initialized?
There is no problem if A is a class extended by B, and more curiously, no problem if x is set equal to a named outer class (e.g. a class X2 implements X).
|Field||Original Value||New Value|
|Assignee||Cedric Champeau [ melix ]|
|Fix Version/s||2.0-beta-2 [ 18072 ]|
|Fix Version/s||1.7.11 [ 17244 ]|
|Fix Version/s||1.8.5 [ 18071 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Fixed [ 1 ]|
|Status||Resolved [ 5 ]||Closed [ 6 ]|