Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

General code clean up of System.Memory #25958

Merged
merged 3 commits into from
Dec 16, 2017
Merged

Conversation

ahsonkhan
Copy link

  • Use explicit type instead of var where type can't be inferred easily.
  • Removing unnecessary use of 'unsafe' keyword and generic type specifiers.

As an aside, change comment in LinuxNetworkInterface.cs to the right type - OperationalStatus (to avoid confusion with OperationStatus)

cc @KrzysztofCwalina, @jkotas, @stephentoub

@ahsonkhan
Copy link
Author

System.IO.Compression.Tests Dispose_WithUnfinishedWriteAsync test failed on Windows.7.Amd64.Open
https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/87216ce10f7b0f5fd51ccdd911896ff3f4e39ccb/workItem/System.IO.Compression.Tests/analysis/xunit/System.IO.Compression.DeflateStreamUnitTests~2FDispose_WithUnfinishedWriteAsync

Assert.Throws() Failure
Expected: typeof(System.AggregateException)
Actual:   (No exception was thrown)
Stack Trace :
   at System.IO.Compression.CompressionStreamUnitTestBase.<Dispose_WithUnfinishedWriteAsync>d__5.MoveNext() in D:\j\workspace\windows-TGrou---f8ac6754\src\Common\tests\System\IO\Compression\CompressionStreamUnitTestBase.cs:line 208
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---

cc @ianhays

System.Net.Ping.Functional.Tests PacketSizeIsRespected(payloadSize: 0) test failed on OSX.1012.Amd64.Open-Debug-x64
https://mc.dot.net/#/user/ahsonkhan/pr~2Fjenkins~2Fdotnet~2Fcorefx~2Fmaster~2F/test~2Ffunctional~2Fcli~2F/87216ce10f7b0f5fd51ccdd911896ff3f4e39ccb/workItem/System.Net.Ping.Functional.Tests/analysis/xunit/System.Net.NetworkInformation.Tests.UnixPingUtilityTests~2FPacketSizeIsRespected(payloadSize:%200)

System.Exception : Ping output was <>
---- System.ArgumentOutOfRangeException : Length cannot be less than zero.
Parameter name: length
Stack Trace :
   at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.<PacketSizeIsRespected>d__1.MoveNext() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs:line 68
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
--- End of stack trace from previous location where exception was thrown ---
----- Inner Stack Trace -----
   at System.String.Substring(Int32 startIndex, Int32 length) in /Users/buildagent/agent/_work/289/s/src/mscorlib/src/System/String.Manipulation.cs:line 1559
   at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.ParseReturnedPacketSize(String pingOutput) in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs:line 76
   at System.Net.NetworkInformation.Tests.UnixPingUtilityTests.<PacketSizeIsRespected>d__1.MoveNext() in /Users/dotnet-bot/j/workspace/dotnet_corefx/master/osx-TGroup_netcoreapp+CGroup_Debug+AGroup_x64+TestOuter_false_prtest/src/System.Net.Ping/tests/FunctionalTests/UnixPingUtilityTests.cs:line 55

cc @Priya91

@ahsonkhan
Copy link
Author

@dotnet-bot test OSX x64 Debug Build
@dotnet-bot test Windows x86 Release Build

@ahsonkhan ahsonkhan merged commit b29814c into dotnet:master Dec 16, 2017
@ahsonkhan ahsonkhan deleted the FixFormatting branch December 16, 2017 06:19
@karelz karelz added this to the 2.1.0 milestone Dec 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Use explicit type instead of var where type can't be inferred easily.

* Removing unnecessary use of 'unsafe' and generic type specifiers.

* Remove leftover unnecessary generic specifiers.


Commit migrated from dotnet/corefx@b29814c
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants