summary refs log tree commit diff
path: root/crypto/src/bzip2
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2022-06-28 00:47:21 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2022-06-28 00:47:21 +0700
commitbf718b4e64a757a8a5442c935cc862b8f231c103 (patch)
tree7302f2840266b6b38855c7d38b83e473d359de51 /crypto/src/bzip2
parentFix NPE (diff)
downloadBouncyCastle.NET-ed25519-bf718b4e64a757a8a5442c935cc862b8f231c103.tar.xz
Generics migration in Bcpg, Bzip2, Cmp
Diffstat (limited to 'crypto/src/bzip2')
-rw-r--r--crypto/src/bzip2/CBZip2OutputStream.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/src/bzip2/CBZip2OutputStream.cs b/crypto/src/bzip2/CBZip2OutputStream.cs
index 045506931..38966efd4 100644
--- a/crypto/src/bzip2/CBZip2OutputStream.cs
+++ b/crypto/src/bzip2/CBZip2OutputStream.cs
@@ -23,7 +23,7 @@
  */
 
 using System;
-using System.Collections;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 
@@ -254,7 +254,7 @@ namespace Org.BouncyCastle.Bzip2
         private readonly int allowableBlockSize;
 
         bool blockRandomised;
-        private readonly IList blocksortStack = Platform.CreateArrayList();
+        private readonly IList<StackElem> blocksortStack = new List<StackElem>();
 
         int bsBuff;
         int bsLivePos;
@@ -1043,12 +1043,12 @@ namespace Org.BouncyCastle.Bzip2
             internal int dd;
         }
 
-        private static void PushStackElem(IList stack, int stackCount, int ll, int hh, int dd)
+        private static void PushStackElem(IList<StackElem> stack, int stackCount, int ll, int hh, int dd)
         {
             StackElem stackElem;
             if (stackCount < stack.Count)
             {
-                stackElem = (StackElem)stack[stackCount];
+                stackElem = stack[stackCount];
             }
             else
             {
@@ -1065,7 +1065,7 @@ namespace Org.BouncyCastle.Bzip2
         {
             int unLo, unHi, ltLo, gtHi, n, m;
 
-            IList stack = blocksortStack;
+            var stack = blocksortStack;
             int stackCount = 0;
             StackElem stackElem;
 
@@ -1081,7 +1081,7 @@ namespace Org.BouncyCastle.Bzip2
                     if (stackCount < 1 || (workDone > workLimit && firstAttempt))
                         return;
 
-                    stackElem = (StackElem)stack[--stackCount];
+                    stackElem = stack[--stackCount];
                     lo = stackElem.ll;
                     hi = stackElem.hh;
                     d = stackElem.dd;