Skip to content

Conversation

@clagraff
Copy link
Contributor

Addresses the nil-pointer issue of tryDoc and tryAry.
Inspired by schylek's PR #49 .

Also adds a couple extra nil-pointer checks for lazyNode.

However, because how everything is currently coded, I don't see an avenue for intoDoc(), intoAry(), or compact() to actually have nil pointers to the n.raw property. So this was mostly "future-proofing" in case this ever changes. I can remove these extra checks or change the error messages if you would like 👍.

Doesn't modify the license.

Signed-off-by: Curtis La Graff <curtis@lagraff.me>
@evanphx
Copy link
Owner

evanphx commented Mar 16, 2018

I thank you and @schylek thanks you.

@evanphx evanphx merged commit ed7cfba into evanphx:master Mar 16, 2018
schylek added a commit to schylek/kubernetes that referenced this pull request Mar 19, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50
k8s-github-robot pushed a commit to kubernetes/kubernetes that referenced this pull request Mar 22, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50
k8s-publishing-bot pushed a commit to kubernetes/apimachinery that referenced this pull request Mar 22, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
k8s-publishing-bot added a commit to kubernetes/apimachinery that referenced this pull request Mar 22, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
k8s-publishing-bot pushed a commit to kubernetes/apiserver that referenced this pull request Mar 22, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
k8s-publishing-bot added a commit to kubernetes/apiserver that referenced this pull request Mar 22, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
k8s-publishing-bot pushed a commit to kubernetes/kube-aggregator that referenced this pull request Mar 22, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
k8s-publishing-bot added a commit to kubernetes/kube-aggregator that referenced this pull request Mar 22, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
k8s-publishing-bot pushed a commit to kubernetes/sample-apiserver that referenced this pull request Mar 22, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
k8s-publishing-bot added a commit to kubernetes/sample-apiserver that referenced this pull request Mar 22, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
k8s-publishing-bot pushed a commit to kubernetes/apiextensions-apiserver that referenced this pull request Mar 22, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
k8s-publishing-bot added a commit to kubernetes/apiextensions-apiserver that referenced this pull request Mar 22, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
sttts pushed a commit to sttts/apimachinery that referenced this pull request Apr 9, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
sttts pushed a commit to sttts/apimachinery that referenced this pull request Apr 9, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
sttts pushed a commit to sttts/apiserver that referenced this pull request Apr 9, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
sttts pushed a commit to sttts/apiserver that referenced this pull request Apr 9, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Apr 9, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
sttts pushed a commit to sttts/kube-aggregator that referenced this pull request Apr 9, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Apr 9, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
sttts pushed a commit to sttts/sample-apiserver that referenced this pull request Apr 9, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Apr 9, 2018
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
sttts pushed a commit to sttts/apiextensions-apiserver that referenced this pull request Apr 9, 2018
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
openshift-publish-robot pushed a commit to openshift/kubernetes-sample-apiserver that referenced this pull request Jan 14, 2019
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
openshift-publish-robot pushed a commit to openshift/kubernetes-sample-apiserver that referenced this pull request Jan 14, 2019
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
tamalsaha pushed a commit to gomodules/encoding that referenced this pull request Aug 10, 2021
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
tamalsaha pushed a commit to gomodules/encoding that referenced this pull request Aug 10, 2021
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
akhilerm pushed a commit to akhilerm/apimachinery that referenced this pull request Sep 20, 2022
Updates github.com/evanphx/json-patch dependency
to fix tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 758d3e7c576f0761b23fed69c3b5dabf6013e8d0
akhilerm pushed a commit to akhilerm/apimachinery that referenced this pull request Sep 20, 2022
Automatic merge from submit-queue (batch tested with PRs 61354, 61366, 61386, 61394, 60755). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

vendor: Update github.com/evanphx/json-patch

Updates github.com/evanphx/json-patch dependency
to fix handling tests against empty objects/arrays.

Includes fix from evanphx/json-patch#50

Kubernetes-commit: 18a7ea703bdf09f1ff0b83e15b3febf49a447a24
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