mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
nullize only after element is successfully read, otherwise our state will be undefined - both myDataHolder and myCodeStyleSettings are null
This commit is contained in:
+3
-1
@@ -78,8 +78,10 @@ public class CodeStyleSchemeImpl extends ExternalizableSchemeAdapter implements
|
||||
return myCodeStyleSettings;
|
||||
}
|
||||
|
||||
Element element = dataHolder.read();
|
||||
// nullize only after element is successfully read, otherwise our state will be undefined - both myDataHolder and myCodeStyleSettings are null
|
||||
myDataHolder = null;
|
||||
settings = init(myParentSchemeName == null ? null : CodeStyleSchemesImpl.getSchemeManager().findSchemeByName(myParentSchemeName), dataHolder.read());
|
||||
settings = init(myParentSchemeName == null ? null : CodeStyleSchemesImpl.getSchemeManager().findSchemeByName(myParentSchemeName), element);
|
||||
dataHolder.updateDigest(this);
|
||||
myParentSchemeName = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user