directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel L├ęcharny <>
Subject Message & generics
Date Mon, 17 Mar 2014 20:17:56 GMT

now that I cleaned up the controls, I started doing the same thing for
extended requests, and I was annoyed by the verbosity of construction like :

public interface ExtendedOperationFactory<Q extends ExtendedRequest<P>,
P extends ExtendedResponse>

At this point, I focused on the need of adding a generic to the
ExtendedRequest : there is none. In fact, it all boils down to the
inherited class :

public interface ResultResponseRequest<R extends ResultResponse> extends

Now, you have to propagate the response in all the classes implementing
Request (add, bind...)

This is extremelly heavy, and serves only ne single purpose : avoid a
couple of cast when returning the SearchResultDone.

I have removed all those heavy generics to make the code lighter, it
took me a couple of hours, and the tests just ran perfectly well : a no

Next step : continue to work out the Extended classes.

Note : this should have no impact on our API users : the generics are
internal to the API.

Emmanuel L├ęcharny 

View raw message