RunConfigurationBase and PersistentStateComponent incompatible with 2019.1(.3)?


I've implemented persistence for my custom run configuration that inherits from LocatableConfigurationBase and in turn from RunConfigurationBase. For persistence, I've used PersistentStateComponent. When I try to compile for 2019.1.3, I get an error because now there are two loadState Methods, one from PersistentStateComponent and one from RunConfigurationBase, which I don't want. The same code works for 2018.2.3.

Error Message:

/home/patrick/code/intellij-digital-plugin/src/main/java/de/patrick246/intellij/digitalplugin/debugger/configuration/ error: name clash: loadState(RunConfigState) in DARunConfiguration overrides a method whose erasure is the same as another method, yet neither overrides the other
public void loadState(@NotNull RunConfigState state) {
first method: loadState(T#1) in RunConfigurationBase
second method: loadState(T#2) in PersistentStateComponent
where T#1,T#2 are type-variables:
T#1 extends Object declared in class RunConfigurationBase
T#2 extends Object declared in interface PersistentStateComponent

You can see my implementation in my GitHub-Repository:

What method of persistence can I use instead? The documentation suggests JDOMExternalizable, but thats deprecated.



Please sign in to leave a comment.