diff --git a/platform/projectModel-api/src/com/intellij/openapi/roots/libraries/LibraryTable.java b/platform/projectModel-api/src/com/intellij/openapi/roots/libraries/LibraryTable.java index 4ee102195792..ba9a76422f64 100644 --- a/platform/projectModel-api/src/com/intellij/openapi/roots/libraries/LibraryTable.java +++ b/platform/projectModel-api/src/com/intellij/openapi/roots/libraries/LibraryTable.java @@ -83,10 +83,17 @@ public interface LibraryTable { boolean isChanged(); } - interface Listener extends EventListener{ - void afterLibraryAdded (Library newLibrary); - void afterLibraryRenamed (Library library); - void beforeLibraryRemoved (Library library); - void afterLibraryRemoved (Library library); + interface Listener extends EventListener { + default void afterLibraryAdded(Library newLibrary) { + } + + default void afterLibraryRenamed(Library library) { + } + + default void beforeLibraryRemoved(Library library) { + } + + default void afterLibraryRemoved(Library library) { + } } } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryImpl.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryImpl.java index 93a1ff3440d3..c7abd910c8ef 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryImpl.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/LibraryOrderEntryImpl.java @@ -30,8 +30,8 @@ import org.jdom.Element; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.jetbrains.jps.model.serialization.module.JpsModuleRootModelSerializer; import org.jetbrains.jps.model.serialization.java.JpsJavaModelSerializerExtension; +import org.jetbrains.jps.model.serialization.module.JpsModuleRootModelSerializer; /** * @author dsl @@ -278,9 +278,5 @@ class LibraryOrderEntryImpl extends LibraryOrderEntryBaseImpl implements Library public void beforeLibraryRemoved(Library library) { LibraryOrderEntryImpl.this.beforeLibraryRemoved(library); } - - @Override - public void afterLibraryRemoved(Library library) { - } } } diff --git a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/libraries/LibraryTableBase.java b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/libraries/LibraryTableBase.java index 7ce950399710..6450d23b90d6 100644 --- a/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/libraries/LibraryTableBase.java +++ b/platform/projectModel-impl/src/com/intellij/openapi/roots/impl/libraries/LibraryTableBase.java @@ -321,24 +321,11 @@ public abstract class LibraryTableBase implements PersistentStateComponent libraries = ContainerUtil.findAll(myLibraries, library -> !((LibraryEx)library).isDisposed());