Skip to content

For open source Parse with /parse mounts, this fix helps avoid the problem of remembering to add the trailing slash. #436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2016

Conversation

rogerhu
Copy link
Contributor

@rogerhu rogerhu commented Apr 7, 2016

No description provided.

@facebook-github-bot
Copy link

By analyzing the blame information on this pull request, we identified @richardjrossiii, @grantland and @wangmengyan95 to be potential reviewers.

@facebook-github-bot
Copy link

@rogerhu updated the pull request.

@grantland
Copy link
Contributor

@richardjrossiii Could you take a look at this?

@@ -30,14 +30,14 @@ public void testBuilder() {
Parse.Configuration.Builder builder = new Parse.Configuration.Builder(null);
builder.applicationId("foo");
builder.clientKey("bar");
builder.server("some.server");
builder.server("http://myserver.com/parse");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we perhaps duplicate this test case, instead of just modifying it in-place? One test for each branch?

@richardjrossiii
Copy link
Contributor

I'd prefer we use String.endsWith() instead of charAt(), even if the performance of the latter is better. Seems more clear to me.

@facebook-github-bot
Copy link

@rogerhu updated the pull request.

…oblem of remembering to add

the trailing slash.
@facebook-github-bot
Copy link

@rogerhu updated the pull request.

@rogerhu
Copy link
Contributor Author

rogerhu commented Apr 7, 2016

Fixed...can you take a look again? I took out the server() on the original test and broke them out to separate tests to check both cases.

@richardjrossiii
Copy link
Contributor

Nice! Merging now.

@richardjrossiii richardjrossiii merged commit 95b6b17 into parse-community:master Apr 8, 2016
@rogerhu
Copy link
Contributor Author

rogerhu commented Apr 8, 2016

Thanks!

@posativ
Copy link
Contributor

posativ commented Apr 25, 2016

Example traceback for GitHub's search.

com.parse.ParseRequest$ParseRequestException: bad json response
    at com.parse.ParseRequest.newTemporaryException(ParseRequest.java:290)
    at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:308)
    at com.parse.ParseRequest$3.then(ParseRequest.java:137)
    at com.parse.ParseRequest$3.then(ParseRequest.java:133)
    at bolts.Task$15.run(Task.java:917)
    at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
    at bolts.Task.completeAfterTask(Task.java:908)
    at bolts.Task.continueWithTask(Task.java:715)
    at bolts.Task.continueWithTask(Task.java:726)
    at bolts.Task$13.then(Task.java:818)
    at bolts.Task$13.then(Task.java:806)
    at bolts.Task$15.run(Task.java:917)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
    at java.lang.Thread.run(Thread.java:818)
Caused by: org.json.JSONException: Value Cannot of type java.lang.String cannot be converted to JSONObject
    at org.json.JSON.typeMismatch(JSON.java:111)
    at org.json.JSONObject.<init>(JSONObject.java:160)
    at org.json.JSONObject.<init>(JSONObject.java:173)
    at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:298)
    ... 13 more

@rogerhu
Copy link
Contributor Author

rogerhu commented Apr 26, 2016

Could you explain what this has to do with this PR?

@posativ
Copy link
Contributor

posativ commented Apr 26, 2016

You run into this error when you're not using the master (that includes this fix) and you cannot find it easily.

@rogerhu
Copy link
Contributor Author

rogerhu commented Apr 26, 2016

Could you provide a code sample? How is this PR related to your issue?

On Tue, Apr 26, 2016 at 10:38 AM, Martin Zimmermann <
[email protected]> wrote:

You run into this error when you're not using the master and you cannot
find it easily.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#436 (comment)

@posativ
Copy link
Contributor

posativ commented Apr 26, 2016

If you use the latest release of Parse SDK for Android with a custom Parse server hosted on e.g. foo.example.org:4043/foobar and forget to add a slash, you get this nonsense error message.

The PR resolves this.

If it still doesn't make sense, remove my comments.

@rogerhu
Copy link
Contributor Author

rogerhu commented Apr 26, 2016

Yes we should release a new version right? :)

On Tue, Apr 26, 2016 at 11:04 AM, Martin Zimmermann <
[email protected]> wrote:

If you use the latest release of Parse SDK for Android with a custom Parse
server hosted on e.g. foo.example.org:4043/foobar and forget to add a
slash, you get this nonsense error message.

The PR resolves this.

If it still doesn't make sense, remove my comments.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#436 (comment)

@posativ
Copy link
Contributor

posativ commented Apr 26, 2016

Yup, might save a few hours questionig the self-hosted server ;)

@rogerhu
Copy link
Contributor Author

rogerhu commented Apr 26, 2016

Can someone make this happen?

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

Successfully merging this pull request may close these issues.

5 participants