Challen created OLINGO-398:
------------------------------

             Summary: java proxy code: duplicated $skip & $top in query URL.
                 Key: OLINGO-398
                 URL: https://issues.apache.org/jira/browse/OLINGO-398
             Project: Olingo
          Issue Type: Bug
          Components: odata4-client
    Affects Versions: V4 4.0.0-beta-01
            Reporter: Challen
             Fix For: V4 4.0.0-beta-01


public MessageCollection getMessages(String folderId, int from) {

                MessageCollection messages = null;

                try {
                        
                        messages = 
container.getMe().getFolders().getByKey(folderId)
                                                                .getMessages()
                                                                
.select("Id,From,Sender,Subject,BodyPreview,DateTimeSent")
                                                                
.expand("From,Sender").skip(from)
                                                                
.top(mBuilder.getMaxResults())
                                                                .execute();

                } catch (Throwable t) {
                        Log.e("Client", t.getMessage());
                }

                return messages;
        }

The first time I call it, creates this request with the mentioned Odata 
operators:

~/Me/Folders('AAMkADg0N2IyYmY3LWY4ZDktNDczNy1iNjAwLTcwYjhhOWM0YjM0MgAuAAAAAABUiwVVm9hQT4oWiN47MJamAQAHg_6kMOm8T7tGK7OZBwRsAAAA999fAAA=')/Messages?$select=Id,From,Sender,Subject,BodyPreview,DateTimeSent,Id,From,Sender,Subject,BodyPreview,DateTimeSent&$expand=From,Sender,From,Sender&$skip=10&$top=10

But when I try to call it again this is what happens:

~//Me/Folders('AAMkADg0N2IyYmY3LWY4ZDktNDczNy1iNjAwLTcwYjhhOWM0YjM0MgAuAAAAAABUiwVVm9hQT4oWiN47MJamAQAHg_6kMOm8T7tGK7OZBwRsAAAA999fAAA=')/Messages?$select=Id,From,Sender,Subject,BodyPreview,DateTimeSent,Id,From,Sender,Subject,BodyPreview,DateTimeSent&$expand=From,Sender,From,Sender&$skip=10,20&$top=10,10





--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to