Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imageurl made nullable (NPE fixed) #3863

Merged
merged 1 commit into from Mar 3, 2021

Conversation

kartikaysharma01
Copy link
Contributor

@kartikaysharma01 kartikaysharma01 commented Feb 28, 2021

Description

imageurl made nullable

Related issues

Fixes #3852
Fixes #3843

@VaiTon
Copy link
Member

VaiTon commented Mar 2, 2021

I don't like how we're fixing this. I'd like to keep nullable values out of the DB so let's so as on line


and just pass an empty value there.

@kartikaysharma01
Copy link
Contributor Author

kartikaysharma01 commented Mar 2, 2021

I don't like how we're fixing this. I'd like to keep nullable values out of the DB so let's so as on line
and just pass an empty value there.

@VaiTon That was my first instinct too. But the Picasso library we are using does not allow empty or blank strings while loading image url.

@VaiTon
Copy link
Member

VaiTon commented Mar 2, 2021

I don't like how we're fixing this. I'd like to keep nullable values out of the DB so let's so as on line
and just pass an empty value there.

@VaiTon That was my first instinct too. But the Picasso library we are using does not allow empty or blank strings while loading image url.

And does it allow null values? We could check if the string is empty where we need to use it.

@kartikaysharma01
Copy link
Contributor Author

And does it allow null values?

@VaiTon Yes, it handles null values gracefully ( skips loading and sets image as placeholder )

We could check if the string is empty where we need to use it.

Yes that can be done

@kartikaysharma01
Copy link
Contributor Author

@VaiTon comments resolved

@sonarcloud
Copy link

sonarcloud bot commented Mar 2, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@VaiTon VaiTon merged commit 87b4bd7 into openfoodfacts:develop Mar 3, 2021
@VaiTon
Copy link
Member

VaiTon commented Mar 3, 2021

Thanks a lot! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants