[platform] generified ComponentManager.getDisposed()

to avoid unchecked warnings on composition
This commit is contained in:
Roman Shevchenko
2016-11-08 18:54:29 +01:00
parent b9b7118c05
commit 8acfdc5921
4 changed files with 9 additions and 9 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -38,7 +38,7 @@ public interface ComponentManager extends UserDataHolder, Disposable {
*
* @param name the name of the component
* @return component with given name or null if there is no such component
* @see com.intellij.openapi.components.NamedComponent#getComponentName()
* @see NamedComponent#getComponentName()
*/
BaseComponent getComponent(@NotNull String name);
@@ -94,5 +94,5 @@ public interface ComponentManager extends UserDataHolder, Disposable {
* see {@link com.intellij.openapi.application.Application#invokeLater(Runnable, Condition)} for the usage example.
*/
@NotNull
Condition getDisposed();
}
Condition<?> getDisposed();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2015 JetBrains s.r.o.
* Copyright 2000-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -145,7 +145,7 @@ public class MockComponentManager extends UserDataHolderBase implements Componen
@NotNull
@Override
public Condition getDisposed() {
public Condition<?> getDisposed() {
return Conditions.alwaysFalse();
}
}
@@ -370,7 +370,7 @@ public abstract class ComponentManagerImpl extends UserDataHolderBase implements
@Override
@NotNull
public final Condition getDisposed() {
public final Condition<?> getDisposed() {
return myDisposedCondition;
}
@@ -138,7 +138,7 @@ public class DummyProject extends UserDataHolderBase implements Project {
@Override
@NotNull
public Condition getDisposed() {
public Condition<?> getDisposed() {
return o -> isDisposed();
}
@@ -186,4 +186,4 @@ public class DummyProject extends UserDataHolderBase implements Project {
public ComponentConfig getConfig(Class componentImplementation) {
throw new UnsupportedOperationException("Method getConfig not implemented in " + getClass());
}
}
}