You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2014/03/17 21:17:56 UTC
Message & generics
Hi,
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
Request
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
brainer.
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.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com