projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87a536e
)
Avoid Split(new char[]) inside loops (#32601)
author
Alaa Masoud
<alaa.masoud@live.com>
Thu, 20 Feb 2020 16:52:19 +0000
(19:52 +0300)
committer
GitHub
<noreply@github.com>
Thu, 20 Feb 2020 16:52:19 +0000
(11:52 -0500)
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapDirectoryIdentifier.cs
patch
|
blob
|
history
src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs
patch
|
blob
|
history
diff --git
a/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapDirectoryIdentifier.cs
b/src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapDirectoryIdentifier.cs
index
02e2fde
..
2d512ca
100644
(file)
--- a/
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapDirectoryIdentifier.cs
+++ b/
src/libraries/System.DirectoryServices.Protocols/src/System/DirectoryServices/Protocols/ldap/LdapDirectoryIdentifier.cs
@@
-35,7
+35,7
@@
namespace System.DirectoryServices.Protocols
if (servers[i] != null)
{
string trimmedName = servers[i].Trim();
- string[] result = trimmedName.Split(
new char[] { ' ' }
);
+ string[] result = trimmedName.Split(
' '
);
if (result.Length > 1)
{
throw new ArgumentException(SR.WhiteSpaceServerName);
diff --git
a/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs
b/src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs
index
7f093c6
..
78573e9
100644
(file)
--- a/
src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs
+++ b/
src/libraries/System.DirectoryServices/src/System/DirectoryServices/DirectoryEntry.cs
@@
-1003,7
+1003,7
@@
namespace System.DirectoryServices
_propertyCollection.valueTable.Remove(name);
// also need to consider the range retrieval case
- string[] results = name.Split(
new char[] { ';' }
);
+ string[] results = name.Split(
';'
);
if (results.Length != 1)
{
string rangeName = "";