Skip to content
This repository has been archived by the owner on Aug 6, 2019. It is now read-only.

Support for empty query param values #12

Open
DavidRyan opened this issue Mar 2, 2016 · 1 comment
Open

Support for empty query param values #12

DavidRyan opened this issue Mar 2, 2016 · 1 comment

Comments

@DavidRyan
Copy link

I think the issue is when the queryString.split happens it's not checking if the returned array is greater that 1

        ERROR https://mock.vokal.io/v1/user/?search=&page=1
        java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
            at io.vokal.mocktrofit.MockClient.alphabetizeQuery(MockClient.java:48)
            at io.vokal.mocktrofit.MockClient.alphabetizeEncodeQuery(MockClient.java:56)
            at io.vokal.mocktrofit.MockClient.getFileName(MockClient.java:112)
            at io.vokal.mocktrofit.MockClient.execute(MockClient.java:239)
            at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)
            at retrofit.RestAdapter$RestHandler.access$100(RestAdapter.java:220)
            at retrofit.RestAdapter$RestHandler$1.invoke(RestAdapter.java:265)
            at retrofit.RxSupport$2.run(RxSupport.java:55)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
            at java.lang.Thread.run(Thread.java:818)
@wmbest2
Copy link
Contributor

wmbest2 commented Mar 2, 2016

Good catch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants