mirror of
https://github.com/moparisthebest/fernflower
synced 2024-11-23 09:42:18 -05:00
Fixed wrong order of static initializations (probably part of IDEA-127465)
This commit is contained in:
parent
e098fbf669
commit
1a8e8ba7a2
@ -138,12 +138,17 @@ public class InitializerProcessor {
|
|||||||
AssignmentExprent asexpr = (AssignmentExprent)exprent;
|
AssignmentExprent asexpr = (AssignmentExprent)exprent;
|
||||||
if(asexpr.getLeft().type == Exprent.EXPRENT_FIELD) {
|
if(asexpr.getLeft().type == Exprent.EXPRENT_FIELD) {
|
||||||
FieldExprent fexpr = (FieldExprent)asexpr.getLeft();
|
FieldExprent fexpr = (FieldExprent)asexpr.getLeft();
|
||||||
if(fexpr.isStatic() && fexpr.getClassname().equals(cl.qualifiedName)) {
|
if(fexpr.isStatic() && fexpr.getClassname().equals(cl.qualifiedName) &&
|
||||||
String keyField = InterpreterUtil.makeUniqueKey(fexpr.getName(), fexpr.getDescriptor().descriptorString);
|
cl.hasField(fexpr.getName(), fexpr.getDescriptor().descriptorString)) {
|
||||||
if(!wrapper.getStaticFieldInitializers().containsKey(keyField)) {
|
|
||||||
wrapper.getStaticFieldInitializers().addWithKey(asexpr.getRight(), keyField);
|
if(isExprentIndependent(asexpr.getRight(), meth)) {
|
||||||
firstdata.getExprents().remove(0);
|
|
||||||
found = true;
|
String keyField = InterpreterUtil.makeUniqueKey(fexpr.getName(), fexpr.getDescriptor().descriptorString);
|
||||||
|
if(!wrapper.getStaticFieldInitializers().containsKey(keyField)) {
|
||||||
|
wrapper.getStaticFieldInitializers().addWithKey(asexpr.getRight(), keyField);
|
||||||
|
firstdata.getExprents().remove(0);
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user