From 27a2c030d6a77219236a690cc435a680c57a614a Mon Sep 17 00:00:00 2001 From: Simon Redman Date: Thu, 4 Apr 2019 11:39:18 -0600 Subject: [PATCH] Replaced getString(..) != null with isNull(..) --- src/org/kde/kdeconnect/Helpers/FilesHelper.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/org/kde/kdeconnect/Helpers/FilesHelper.java b/src/org/kde/kdeconnect/Helpers/FilesHelper.java index 023df0df..76582c6a 100644 --- a/src/org/kde/kdeconnect/Helpers/FilesHelper.java +++ b/src/org/kde/kdeconnect/Helpers/FilesHelper.java @@ -146,11 +146,10 @@ public class FilesHelper { String filename = cursor.getString(nameColumnIndex); - // It is recommended to check this value before getting the int value, because - // there are situations were we don't know the size (for instance, if the file is + // It is recommended to check for the value to be null because there are + // situations were we don't know the size (for instance, if the file is // not local to the device) - boolean sizeExists = cursor.getString(sizeColumnIndex) != null; - if (sizeExists) { + if (!cursor.isNull(sizeColumnIndex)) { size = cursor.getInt(sizeColumnIndex); }