tmf: annotate TmfContext#location as nullable
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / parsers / custom / CustomXmlTrace.java
index e562fd880e6f232d9669e073e17fc10654222ded..50298e6624a4511c18e6ea9470a5dd1f771fd13c 100644 (file)
@@ -266,15 +266,16 @@ public class CustomXmlTrace extends TmfTrace implements ITmfPersistentlyIndexabl
         }
 
         final CustomXmlTraceContext context = (CustomXmlTraceContext) tmfContext;
-        if (context.getLocation() == null || !(context.getLocation().getLocationInfo() instanceof Long) || NULL_LOCATION.equals(context.getLocation())) {
+        ITmfLocation location = context.getLocation();
+        if (location == null || !(location.getLocationInfo() instanceof Long) || NULL_LOCATION.equals(location)) {
             return null;
         }
 
         CustomXmlEvent event = null;
         try {
             // Below +1 for the <
-            if (fFile.getFilePointer() != (Long) context.getLocation().getLocationInfo() + 1) {
-                fFile.seek((Long) context.getLocation().getLocationInfo() + 1);
+            if (fFile.getFilePointer() != (Long) location.getLocationInfo() + 1) {
+                fFile.seek((Long) location.getLocationInfo() + 1);
             }
             final StringBuffer elementBuffer = new StringBuffer("<"); //$NON-NLS-1$
             readElement(elementBuffer, fFile);
This page took 0.029168 seconds and 5 git commands to generate.