twilio / twilio-java

A Java library for communicating with the Twilio REST API and generating TwiML.
MIT License
482 stars 421 forks source link

Twilio 9.x - Page Size query param is broken #723

Closed ayushworks closed 1 year ago

ayushworks commented 1 year ago

Issue Summary

All Reader classes like OutgoingCallerIdReader etc have a new private field called pageSize in 9.x. The query param pageSize of the outgoing http call is set using this new parameter. There is one more parameter called Reader.pageSize which is inherited from the parent Reader class. This parameter is ignored while setting page size query param.

This is 9.x

image

This is 8.x

image

Code written in 8.x like

outgoingCallerIdReader.pageSize(1000).readAsync(twilioRestClient)

will compile in 9.x also but not set the page size. Instead the default page size of 50 will be used in HTTP calls made with 9.x. The migration to 9.x will not respect page size requests until all .pageSize(xxx) calls are changed to .setPageSize(xxx) method. So basically .pageSize(xxx) method is broken in 9.x version.

Steps to Reproduce

Code Snippet

OutgoingCallerId.reader.pageSize(1000).readAsync(twilioRestClient) // will not set page size in http calls

OutgoingCallerId.reader.setPageSize(1000).readAsync(twilioRestClient) // will set page size in http calls

Technical details:

charan678 commented 1 year ago

This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.

kridai commented 1 year ago

The fix has been merged and should be available in the next release.