-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
String.Join(string, object[]) bug when first item is null #5681
Comments
It's a documented bug so that makes it a feature 😉 @jkotas What is the viewpoint on quirking old bugs on the new core platforms? |
It is case by case. |
@bbowyersmyth oh no! Haha that is so unfortunate. |
IMO I think this should be fixed for .NET Core; this behavior is unintuitive, especially considering the fact that if you cast to |
@jkotas, you mentioned in the Tuple PR that commits that may cause compatibility issues with the desktop are simply not cherry-picked. Would it make sense to remove the bug now and fix the documentation? (It is preventing me from sharing code with the new |
I do not have an option on this one. |
I thought I responded to this a few weeks ago, but apparently my comment didn't take. I don't really know of similar examples. We've certainly taken bug fixes that haven't yet been ported back to desktop. But we've also avoided making some kinds of fixes when the benefit is very low and the observable difference could cause cross-platform compatibility issues, e.g. throwing an ArgumentOutOfRangeException instead of an IndexOutOfRangeException. I similarly don't have a strong opinion on this particular case. This behavior is documented, which is unfortunate, but it's also quite strange and inconsistents, e.g. that these two Console.WriteLine calls output different results: var args = new[] { null, "x" };
Console.WriteLine(string.Join(",", (object[])args));
Console.WriteLine(string.Join(",", (string[])args)); so I'd be ok seeing it fixed as long as it was ported back to desktop. |
@stephentoub This behavior is documented in note as issue and have number of workarounds. |
This was fixed in dotnet/coreclr#8114. |
@AlexGhiondea we don't have the netfx tags in the coreclr repo what is the best way to get this tracked for desktop? |
@weshaggard the easiest way is to create an issue in the CoreFx repo and tag that with Netfx-port-consider. |
@AlexGhiondea we should probably do that for this issue if we haven't already. |
I have tagged dotnet/corefx#14083 with netfx-port-consider. |
Updated PR # in @AlexGhiondea's comment to the new one (dotnet/corefx#14083). @AlexRadch please consider all impact of your PR switches in future. |
I see no use for this issue. fixed by dotnet/corefx#13747 |
Oh, it was clsoed already. My bad |
@danmosemsft : Is this ported to netfx yet? |
Continuing my series to break the BCL for fun and no profit here's another
string.Join
bug:returns
""
. It should return",x"
.This bug exists in CoreCLR, in 4.6.2 and in the recently merged
string.Join
fix.The text was updated successfully, but these errors were encountered: