diff --git a/src/org/kde/kdeconnect/Helpers/ContactsHelper.java b/src/org/kde/kdeconnect/Helpers/ContactsHelper.java index 5f2a40e2..899ad152 100644 --- a/src/org/kde/kdeconnect/Helpers/ContactsHelper.java +++ b/src/org/kde/kdeconnect/Helpers/ContactsHelper.java @@ -46,6 +46,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import androidx.annotation.NonNull; import androidx.annotation.RequiresApi; import androidx.collection.LongSparseArray; @@ -394,6 +395,7 @@ public class ContactsHelper { .append("\n"); } + @NonNull public String toString() { return vcardBody.toString() + VCARD_END; } @@ -415,9 +417,14 @@ public class ContactsHelper { static final String COLUMN = ContactsContract.Contacts.LOOKUP_KEY; public uID(String lookupKey) { + + if (lookupKey == null) + throw new IllegalArgumentException("lookUpKey should not be null"); + contactLookupKey = lookupKey; } + @NonNull public String toString() { return this.contactLookupKey; } diff --git a/src/org/kde/kdeconnect/Plugins/SftpPlugin/RootFile.java b/src/org/kde/kdeconnect/Plugins/SftpPlugin/RootFile.java index fa94245a..a6eea5dc 100644 --- a/src/org/kde/kdeconnect/Plugins/SftpPlugin/RootFile.java +++ b/src/org/kde/kdeconnect/Plugins/SftpPlugin/RootFile.java @@ -22,6 +22,7 @@ package org.kde.kdeconnect.Plugins.SftpPlugin; import org.apache.sshd.common.file.SshFile; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.Calendar;