Michael Bolz created OLINGO-710:
-----------------------------------

             Summary: 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)

Reply via email to