This does check not work:
if (newCertificates.indexOf(newCertificateInfo) != -1) {
// skip entry that's already in the database
continue
}
Everytime it downloads trustlist it is checking if certificate is already in array. For every CertificateInfo it is creating new object and this code above is checking if same object is already in cachced array, but not comparing its data but only if it is same object. This results in in adding same certificate everytime it updates as it is always a newly created CerticateInfo object
CertStore.kt -> private fun processReceivedData(...) -> updateCachedData { cachedData -> ... }
This does check not work: if (newCertificates.indexOf(newCertificateInfo) != -1) { // skip entry that's already in the database continue }
Everytime it downloads trustlist it is checking if certificate is already in array. For every CertificateInfo it is creating new object and this code above is checking if same object is already in cachced array, but not comparing its data but only if it is same object. This results in in adding same certificate everytime it updates as it is always a newly created CerticateInfo object