igreenwood / SimpleCropView

A simple image cropping library for Android.
MIT License
2.48k stars 465 forks source link

Fixed: Unchecked call to Long.valueOf(String) may cause an NFE #137

Closed sumimakito closed 5 years ago

sumimakito commented 6 years ago

Hello Aoki,

I've found that if the Uri passed into CropImageView.load(Uri) looks like content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Fsome_file, then a NumberFormatException will be thrown, which is caused by passing the unchecked raw:/storage/emulated/0/Download/some_file to Long.valueOf(String).

I've added an if-else statement in class com.isseiaoki.simplecropview.util.Util to fix this problem.

Anyway, SimpleCropView is a great work. It has saved me a lot of time on handling image cropping things.

Cheers Makito

igreenwood commented 5 years ago

Sorry for late response. Thank you for your contribution! I will release new version soon!

igreenwood commented 5 years ago

1.1.8 has released. Thank you so much!