Skip to content

Conversation

Jawnnypoo
Copy link
Member

Presently, the result:

{
   "result": null
}

will be returned as a JSONObject. This causes issues, considering that if you were to call:

val result = ParseCloud.callFunction<String?>("functionNameThatReturnsStringOrNull", null)
val invalid = result == null

^ this will always fail, due to the fact that JSONObject will be returned instead of null

This fixes this and returns null if the result is null in the response.

@codecov
Copy link

codecov bot commented Jul 25, 2018

Codecov Report

Merging #862 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #862      +/-   ##
============================================
+ Coverage     64.66%   64.69%   +0.02%     
- Complexity     1897     1898       +1     
============================================
  Files           122      122              
  Lines          9704     9706       +2     
  Branches       1359     1360       +1     
============================================
+ Hits           6275     6279       +4     
+ Misses         2924     2923       -1     
+ Partials        505      504       -1
Impacted Files Coverage Δ Complexity Δ
.../main/java/com/parse/ParseCloudCodeController.java 100% <100%> (ø) 6 <0> (+1) ⬆️
...se/src/main/java/com/parse/ParseKeyValueCache.java 45% <0%> (+2%) 14% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0cfc67e...878b575. Read the comment docs.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 69.885% when pulling 878b575 on Jawnnypoo:null-result into 0cfc67e on parse-community:master.

@Jawnnypoo Jawnnypoo requested a review from rogerhu July 26, 2018 00:08
@Jawnnypoo Jawnnypoo merged commit 5795828 into parse-community:master Jul 26, 2018
@Jawnnypoo Jawnnypoo deleted the null-result branch July 26, 2018 12:34
vovkab pushed a commit to vovkab/Parse-SDK-Android that referenced this pull request Sep 10, 2018
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.

2 participants