DESCRIPTION

Avoid multiple seek to the same location.

There is multiple instance of seeking to the same location twice.
To solve this issue the seek method check if the current location is the same.

Here is the explanation:

[CtfTmfContext.java]

    public void setLocation(ITmfLocation location) {
        curLocation = (CtfLocation) location;
        if (curLocation != null) {
            getIterator().seek(curLocation.getLocationInfo());
        }
    }

GetIterator  --> will force a seek to curLocation
.seek        --> force an other seek to curLocation

Here are the called method:

    private CtfIterator getIterator() {
        return CtfIteratorManager.getIterator(fTrace, this);
    }

    public static synchronized CtfIterator getIterator(final CtfTmfTrace trace,
            final CtfTmfContext ctx) {
        return map.get(trace).getIterator(ctx);
    }

    public CtfIterator getIterator(final CtfTmfContext context) {
            [...]
            if (context.getLocation() != null) {
                final CtfLocationInfo location = (CtfLocationInfo) context.getLocation().getLocationInfo();
                retVal.seek(location);   /// FORCE SEEK!!!!!!!!!!!!
            }

Change-Id: Ib5ad6d05eb47045660c7ab5076930a30e829c7a0
Signed-off-by: Jordon Obrien xxx@xxx.xxx


COMMENTS

author: Jordon Obrien
date: 2013-11-17 04:30:31.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-11-17 05:12:30.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/3980/

-------------------------------------
author: Brenden Conley
date: 2013-11-17 05:58:14.000000000

Patch Set 2: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/3980/ : SUCCESS

-------------------------------------
