Skip to content

Commit adb7567

Browse files
committed
[Bug修复](master): bugly问题修复
1 parent 7bc9b90 commit adb7567

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

common_component/src/main/java/com/xyoye/common_component/weight/binding/BindingEncode.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ object BindingEncode {
1212

1313
@InverseMethod("stringDecode")
1414
@JvmStatic
15-
fun stringEncode(value: String): String {
15+
fun stringEncode(value: String?): String {
16+
value ?: return ""
1617
return URLEncoder.encode(value, Charsets.UTF_8.name())
1718
}
1819

1920
@JvmStatic
20-
fun stringDecode(value: String): String {
21+
fun stringDecode(value: String?): String {
22+
value ?: return ""
2123
return URLDecoder.decode(value, Charsets.UTF_8.name())
2224
}
2325
}

download_component/src/main/java/com/xyoye/download_component/ui/dialog/PlaySelectionDialog.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class PlaySelectionDialog : BaseBottomDialog<DialogPlaySelectionBinding> {
8989
}
9090

9191
val torrentInfo = XLTaskHelper.getInstance().getTorrentInfo(filePath)
92-
if (torrentInfo?.mSubFileInfo == null) {
92+
if (torrentInfo?.mSubFileInfo.isNullOrEmpty()) {
9393
dismiss()
9494
mOwnerActivity?.finish()
9595
ToastCenter.showError("解析种子文件失败")

stream_component/src/main/java/com/xyoye/stream_component/utils/FileHashUtils.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ object FileHashUtils {
4242
}
4343
outputStream.flush()
4444
return getStreamHash(FileInputStream(cacheFile))
45-
} catch (e: Exception) {
46-
e.printStackTrace()
45+
} catch (t: Throwable) {
46+
t.printStackTrace()
4747
return null
4848
} finally {
4949
IOUtils.closeIO(inputStream)

0 commit comments

Comments
 (0)