cometchat / chat-sdk-android

Text Chat SDK for Android
https://www.cometchat.com
22 stars 12 forks source link

[1.8.3] Validation required in request Builder classes such as UsersRequest , GroupRequest , MessageRequest #10

Closed yadavmangesh closed 4 years ago

yadavmangesh commented 5 years ago

Describe the bug Null or random values can be set in the current Request Builder classes

To Reproduce Example

UsersRequest usersRequest=new UsersRequest.UsersRequestBuilder().setLimit(100)
                    .setUserStatus(null)
                    .setSearchKeyword("iron Man").build();
UsersRequest usersRequest=new UsersRequest.UsersRequestBuilder().setLimit(0)
                                                   .setSearchKeyword("iron Man").build();

Expected behavior Should have given an error or warning on setting null values or other than required

Actual behavior returns result even after setting null values in the builder

Enviorment/Platfrom (please complete the following information):

Logs (Error Logs)

adityagokula2210 commented 4 years ago

Done