diff options
Diffstat (limited to 'crypto/src/bcpg/UserAttributePacket.cs')
-rw-r--r-- | crypto/src/bcpg/UserAttributePacket.cs | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/crypto/src/bcpg/UserAttributePacket.cs b/crypto/src/bcpg/UserAttributePacket.cs index 20e3598ab..861f62f5d 100644 --- a/crypto/src/bcpg/UserAttributePacket.cs +++ b/crypto/src/bcpg/UserAttributePacket.cs @@ -1,9 +1,6 @@ -using System; -using System.Collections; +using System.Collections.Generic; using System.IO; -using Org.BouncyCastle.Utilities; - namespace Org.BouncyCastle.Bcpg { /** @@ -20,18 +17,13 @@ namespace Org.BouncyCastle.Bcpg UserAttributeSubpacketsParser sIn = new UserAttributeSubpacketsParser(bcpgIn); UserAttributeSubpacket sub; - IList v = Platform.CreateArrayList(); + var v = new List<UserAttributeSubpacket>(); while ((sub = sIn.ReadPacket()) != null) { v.Add(sub); } - subpackets = new UserAttributeSubpacket[v.Count]; - - for (int i = 0; i != subpackets.Length; i++) - { - subpackets[i] = (UserAttributeSubpacket)v[i]; - } + subpackets = v.ToArray(); } public UserAttributePacket( |