mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Unnecessary null-check removed
This commit is contained in:
+1
-1
@@ -1098,7 +1098,7 @@ public abstract class AbstractColorsScheme extends EditorFontCacheImpl implement
|
||||
if (myParentScheme instanceof TemporaryParent) {
|
||||
String parentName = ((TemporaryParent)myParentScheme).getParentName();
|
||||
EditorColorsScheme newParent = nameResolver.apply(parentName);
|
||||
if (newParent == null || !(newParent instanceof ReadOnlyColorsScheme)) {
|
||||
if (!(newParent instanceof ReadOnlyColorsScheme)) {
|
||||
throw new InvalidDataException(parentName);
|
||||
}
|
||||
myParentScheme = newParent;
|
||||
|
||||
@@ -466,7 +466,7 @@ public class ActionButton extends JComponent implements ActionButtonComponent, A
|
||||
Icon icon = ActionButton.this.getIcon();
|
||||
if (icon instanceof Accessible) {
|
||||
AccessibleContext context = ((Accessible)icon).getAccessibleContext();
|
||||
if (context != null && context instanceof AccessibleIcon) {
|
||||
if (context instanceof AccessibleIcon) {
|
||||
return new AccessibleIcon[]{(AccessibleIcon)context};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ abstract class AbstractGraphCommit<CommitId> extends ImmutableList<CommitId> imp
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || !(o instanceof GraphCommit)) return false;
|
||||
if (!(o instanceof GraphCommit)) return false;
|
||||
GraphCommit commit = (GraphCommit)o;
|
||||
return getId().equals(commit.getId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user