Merge pull request #6308 from mhmdanas/make-minor-changes

Make some minor changes
This commit is contained in:
XiangRongLin 2021-05-17 12:14:00 +02:00 committed by GitHub
commit 847831c195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 6 deletions

View File

@ -58,12 +58,10 @@ tailrec fun Throwable?.hasCause(checkSubtypes: Boolean, vararg causesToCheck: Cl
if (causeClass.isAssignableFrom(this.javaClass)) { if (causeClass.isAssignableFrom(this.javaClass)) {
return true return true
} }
} else { } else if (causeClass == this.javaClass) {
if (causeClass == this.javaClass) {
return true return true
} }
} }
}
val currentCause: Throwable? = cause val currentCause: Throwable? = cause
// Check if cause is not pointing to the same instance, to avoid infinite loops. // Check if cause is not pointing to the same instance, to avoid infinite loops.

View File

@ -15,7 +15,7 @@ class HeaderItem(
override fun bind(viewBinding: HeaderItemBinding, position: Int) { override fun bind(viewBinding: HeaderItemBinding, position: Int) {
viewBinding.headerTitle.text = title viewBinding.headerTitle.text = title
val listener: OnClickListener? = if (onClickListener != null) OnClickListener { onClickListener.invoke() } else null val listener = onClickListener?.let { OnClickListener { onClickListener.invoke() } }
viewBinding.root.setOnClickListener(listener) viewBinding.root.setOnClickListener(listener)
} }

View File

@ -712,7 +712,7 @@ public class WebMWriter implements Closeable {
return 0; return 0;
} }
// TODO: in the adove code, find and select the shortest track for the desired kind // TODO: in the above code, find and select the shortest track for the desired kind
for (i = 0; i < infoTracks.length; i++) { for (i = 0; i < infoTracks.length; i++) {
if (kind == infoTracks[i].trackType) { if (kind == infoTracks[i].trackType) {
return i; return i;