From a1aed680fd2f94f2f8c947ea575ae6dd4b51f524 Mon Sep 17 00:00:00 2001 From: Mygod Date: Fri, 23 Mar 2018 00:54:47 -0700 Subject: [PATCH] Fix IllegalStateException in Profile.findAll --- mobile/src/main/java/com/github/shadowsocks/database/Profile.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/src/main/java/com/github/shadowsocks/database/Profile.kt b/mobile/src/main/java/com/github/shadowsocks/database/Profile.kt index 8e8e2ea1..43243d4a 100644 --- a/mobile/src/main/java/com/github/shadowsocks/database/Profile.kt +++ b/mobile/src/main/java/com/github/shadowsocks/database/Profile.kt @@ -67,7 +67,7 @@ class Profile : Serializable { profile.password = match.groupValues[2] // bug in Android: https://code.google.com/p/android/issues/detail?id=192855 val javaURI = URI(it.value) - profile.host = javaURI.host + profile.host = javaURI.host ?: "" if (profile.host.firstOrNull() == '[' && profile.host.lastOrNull() == ']') profile.host = profile.host.substring(1, profile.host.length - 1) profile.remotePort = javaURI.port