About an API change since v1.1.1p6c

Hi Beni,

After I upgraded the framework to the latest revision, I encountered a regression in my code, which I believe is due to the following API change in v1.1.1p6c: Generics now force CStations to use CommonDockStation as internal representations.

Attached are the two affected java files (CStack.java and CStackDockStation.java), along with a sample using those types (ExampleWithDocking.java), which of course doesn’t run anymore. :smiley:

Can you please advise on how to update my code, to cope with the API change?

To make it easier for you, below are the compilation errors I get:

Bound mismatch: The type StackDockStation is not a valid substitute for the bounded parameter <S extends CommonDockStation<?,?>> of the type AbstractDockableCStation

at test.CStack.<init>(CStack.java:37)

The return type is incompatible with CommonDockStation<StackDockStation,CStackDockStation>.getStation()
Bound mismatch: The type StackDockStation is not a valid substitute for the bounded parameter <S extends CommonDockStation<?,?>> of the type CStation
Type mismatch: cannot convert from CStack to CStation

at test.CStackDockStation.getStation(CStackDockStation.java:56)

Thanks a lot,
Shant

That’s quite easy to solve. Wherever you see the error, replace “StackDockStation” with “CStackDockStation”. Only two modifications are required:

CStack:
public class CStack extends AbstractDockableCStation<CStackDockStation>

And CStackDockStation:

    public CStation<CStackDockStation> getStation() {
        return delegate;
    }```

Thank you Beni!