[
https://issues.apache.org/jira/browse/OLINGO-710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14595067#comment-14595067
]
Michael Bolz commented on OLINGO-710:
-------------------------------------
Created and pushed a
[fix|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=5f81a5c4c2c79a26619528ed9587de27bf27b7e7].
Should be discussed before merge in master because all implementations which
have override the {{getCallback}} method has to change their method too.
> Incorrect use of generics in {{ODataServiceFactory.getCallback(...)}} method.
> -----------------------------------------------------------------------------
>
> Key: OLINGO-710
> URL: https://issues.apache.org/jira/browse/OLINGO-710
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.4
> Reporter: Michael Bolz
> Priority: Minor
>
> Instead of:
> {code}
> public <T extends ODataCallback> T getCallback(final Class<? extends
> ODataCallback> callbackInterface)
> {code}
> the method should be:
> {code}
> public <T extends ODataCallback> T getCallback(final Class<T>
> callbackInterface)
> {code}
> Otherwise such a code is possible:
> {code}
> ODataDebugCallback callback =
> getServiceFactory().getCallback(ODataErrorCallback.class);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)