Closed jonathanpeppers closed 2 months ago
There are some APK tests that failed with:
System.Net.Http.HttpRequestException : net_http_message_not_success_statuscode_reason, 503, Service Temporarily Unavailable
But I don't think these changes could affect this, so going to merge.
I was building Xamarin.Android.Build.Tasks and noticed some CA2022 warnings that scared me:
Some cases like this were actually ok:
Because it uses
stream.Length
for thebyte[]
size, we don't need to use the return value ofRead()
.Looking at another place, however:
This actually is a bug, as it rents a
destBytes
array potentially a bit larger than bytes read.This made me think, we should make CA2022 an error and fix them all.
I also updated
MonoAndroidHelper.SizeAndContentFileComparer
to just use theFiles.HashFile()
method. This is probably faster than the previous code, anyway.