ctf: Collapse if statement in StructDefinition
authorMatthew Khouzam <matthew.khouzam@ericsson.com>
Mon, 13 Jul 2015 14:39:19 +0000 (10:39 -0400)
committerMatthew Khouzam <matthew.khouzam@ericsson.com>
Fri, 18 Dec 2015 03:11:20 +0000 (22:11 -0500)
Change-Id: I2736507e0ebbee70a172930cd4315c89872eb001
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/51857
Reviewed-by: Hudson CI
Reviewed-by: Francis Giraldeau <francis.giraldeau@gmail.com>
ctf/org.eclipse.tracecompass.ctf.core/src/org/eclipse/tracecompass/ctf/core/event/types/StructDeclaration.java

index 1376e4107926874ae3d5b04d4f5503f8aeeb2df8..733bd22ef0e704aa30f9627f7fcc9c3a7444b82b 100644 (file)
@@ -265,16 +265,14 @@ public class StructDeclaration extends Declaration {
             if (fTraceDef != null) {
                 lookupDefinition = fTraceDef.lookupDefinition(lookupPath);
             }
-            if (lookupDefinition == null) {
-                if (fEventHeaderDef != null) {
-                    String[] paths = EVENT_HEADER.split(lookupPath);
-                    if (paths.length > 1) {
-                        String[] childLookup = paths[1].split("\\."); //$NON-NLS-1$
-                        return getRecursiveDef(fEventHeaderDef.getDefinition(childLookup[0]), childLookup, 1);
-                    }
-                    if (fDefinition != null) {
-                        return fDefinition.lookupDefinition(lookupPath);
-                    }
+            if (lookupDefinition == null && fEventHeaderDef != null) {
+                String[] paths = EVENT_HEADER.split(lookupPath);
+                if (paths.length > 1) {
+                    String[] childLookup = paths[1].split("\\."); //$NON-NLS-1$
+                    return getRecursiveDef(fEventHeaderDef.getDefinition(childLookup[0]), childLookup, 1);
+                }
+                if (fDefinition != null) {
+                    return fDefinition.lookupDefinition(lookupPath);
                 }
             }
             return lookupDefinition;
This page took 0.025297 seconds and 5 git commands to generate.