-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix issue #2997 throws NullPointerException
- Loading branch information
1 parent
e9e4c80
commit 3ea0abc
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
fastjson1-compatible/src/test/java/com/alibaba/fastjson/v2issues/Issue2997.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.alibaba.fastjson.v2issues; | ||
|
||
import com.alibaba.fastjson.JSONPath; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class Issue2997 { | ||
@Test | ||
public void testContainsNullRootObject() { | ||
Object rootObject = null; | ||
String path = "$.key"; | ||
JSONPath.contains(rootObject, path); | ||
} | ||
} |