Skip to content

Commit 2cbee5a

Browse files
authored
use built in check for if path is definite (#13834)
1 parent df759b3 commit 2cbee5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

airbyte-commons/src/main/java/io/airbyte/commons/json/JsonPaths.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public static void assertIsJsonPath(final String jsonPath) {
132132
* @param jsonPath - path to validate
133133
*/
134134
public static void assertIsSingleReturnQuery(final String jsonPath) {
135-
Preconditions.checkArgument(!jsonPath.contains("*"), "Cannot accept paths with wildcards because they may return more than one item.");
135+
Preconditions.checkArgument(JsonPath.isPathDefinite(jsonPath), "Cannot accept paths with wildcards because they may return more than one item.");
136136
}
137137

138138
/**

0 commit comments

Comments
 (0)