Skip to content

Commit e22129a

Browse files
committed
Methods fixed to handle an empty/null input:
>> API.Utility.GZipCompress >> API.Utility.GZipCompress
1 parent d1d82e7 commit e22129a

23 files changed

+14
-49166
lines changed

rls/API.Library.dll

0 Bytes
Binary file not shown.

rls/API.Library.pdb

0 Bytes
Binary file not shown.

src/API.Library/Entities/Utility.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,11 @@ public static string DecodeBase64ToUTF8(string data)
239239
/// <returns></returns>
240240
public static string GZipCompress(string inputUTF8)
241241
{
242+
if (String.IsNullOrEmpty(inputUTF8))
243+
{
244+
return inputUTF8;
245+
}
246+
242247
var byteInput = Encoding.UTF8.GetBytes(inputUTF8);
243248

244249
using (var msInput = new MemoryStream(byteInput))
@@ -260,6 +265,11 @@ public static string GZipCompress(string inputUTF8)
260265
/// <returns></returns>
261266
public static string GZipDecompress(string inputBase64)
262267
{
268+
if (String.IsNullOrEmpty(inputBase64))
269+
{
270+
return inputBase64;
271+
}
272+
263273
byte[] byteInput = Convert.FromBase64String(inputBase64);
264274

265275
using (var msInput = new MemoryStream(byteInput))

src/API.Library/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("3.0.5.0")]
36-
[assembly: AssemblyFileVersion("3.0.5.0")]
35+
[assembly: AssemblyVersion("3.0.6.0")]
36+
[assembly: AssemblyFileVersion("3.0.6.0")]
3737

3838
// Configure log4net using the Web.config file by default
3939
[assembly: log4net.Config.XmlConfigurator(Watch = true)]
-59 KB
Binary file not shown.

src/API.Library/bin/Release/API.Library.dll.config

Lines changed: 0 additions & 253 deletions
This file was deleted.
-85.5 KB
Binary file not shown.
-146 KB
Binary file not shown.

0 commit comments

Comments
 (0)