diff --git a/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java b/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java index 86c92651ba0..bbf6e35934b 100644 --- a/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java +++ b/team/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareUIPlugin.java @@ -1118,12 +1118,11 @@ private static void ensureTextIsLast(LinkedHashSet result) { */ Set findEditorLinkedDescriptors(String fileName, IContentType contentType, boolean firstIsEnough) { - if (fileName == null) { - if (contentType == null) { - contentType = fgContentTypeManager.findContentTypeFor(fileName); - } else { - return Collections.emptySet(); - } + if (fileName == null && contentType == null) { + return Collections.emptySet(); + } + if (contentType == null) { + contentType = fgContentTypeManager.findContentTypeFor(fileName); } LinkedHashSet viewers = fContentMergeViewers.getAll().stream()