Skip to content

Conversation

rozza
Copy link
Member

@rozza rozza commented Apr 12, 2024

@rozza rozza requested review from a team and stIncMale and removed request for a team April 12, 2024 11:22
Comment on lines 277 to 280
private static boolean isJsonObjectOrArray(@Nullable final String data) {
if (data == null || data.isEmpty()) {
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

data can't currently be null, so there is no need to relax the method requirements my allowing null values, which our Spark connector don't currently pass anyway.

Suggested change
private static boolean isJsonObjectOrArray(@Nullable final String data) {
if (data == null || data.isEmpty()) {
return false;
}
private static boolean isJsonObjectOrArray(final String data) {
if (data.isEmpty()) {
return false;
}

Copy link
Member

Choose a reason for hiding this comment

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

The import org.jetbrains.annotations.Nullable; line is also not needed anymore. It's surprising that the static checks don't complain about it.

I am approving to speedup the process: once the line is removed, feel free to merge.

…DocumentConverter.java

Co-authored-by: Valentin Kovalenko <valentin.male.kovalenko@gmail.com>
@rozza rozza requested a review from stIncMale April 16, 2024 08:31
@rozza rozza merged commit d8fad9a into mongodb:main Apr 17, 2024
@rozza rozza deleted the SPARK-421 branch April 17, 2024 16:44
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