diff options
Diffstat (limited to 'org.eclipse.tracecompass.tmf.ui')
-rw-r--r-- | org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/FileAndName.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/FileAndName.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/FileAndName.java index 9dd48b2446..f970dae7d0 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/FileAndName.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/project/wizards/importtrace/FileAndName.java @@ -14,6 +14,8 @@ package org.eclipse.tracecompass.internal.tmf.ui.project.wizards.importtrace; import java.io.File; +import static org.eclipse.tracecompass.common.core.NonNullUtils.equalsNullable; + /** * File and name internal helper class <br> * it has the file, a name to display, whether the name is conflicting and a @@ -169,18 +171,10 @@ class FileAndName implements Comparable<FileAndName> { return false; } FileAndName other = (FileAndName) obj; - if (fTraceTypeId == null) { - if (other.fTraceTypeId != null) { - return false; - } - } else if (!fTraceTypeId.equals(other.fTraceTypeId)) { + if (!equalsNullable(fTraceTypeId, other.fTraceTypeId)) { return false; } - if (fFile == null) { - if (other.fFile != null) { - return false; - } - } else if (!fFile.equals(other.fFile)) { + if (!equalsNullable(fFile, other.fFile)) { return false; } return true; |