Browse Source
Address Copilot review feedback
- Drop manual HttpResponseMessage dispose in DownloadSourceCodeContentAsync,
consistent with Volo.Abp.Http.Client.ClientProxyBase and ASP.NET Core OAuth
handlers (default HttpCompletionOption.ResponseContentRead does not need
manual disposal)
- Fix "occured" -> "occurred" typos in two log lines
- Remove unused using Microsoft.Extensions.Options from test
pull/25443/head
maliming
5 months ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
2 changed files with
3 additions and
7 deletions
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs
framework/test/Volo.Abp.Cli.Core.Tests/Volo/Abp/Cli/ProjectBuilding/RemoteServiceExceptionHandler_Tests.cs
@ -248,7 +248,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency
}
catch ( Exception ex ) when ( ex is not CliUsageException )
{
Console . WriteLine ( "Error occured while getting the latest version from {0} : {1}" , url , ex . Message ) ;
Console . WriteLine ( "Error occurr ed while getting the latest version from {0} : {1}" , url , ex . Message ) ;
return null ;
}
}
@ -351,10 +351,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency
}
await EnsureAbpIoSuccessfulResponseAsync ( responseMessage ) ;
var resultAsBytes = await responseMessage . Content . ReadAsByteArrayAsync ( ) ;
responseMessage . Dispose ( ) ;
return resultAsBytes ;
return await responseMessage . Content . ReadAsByteArrayAsync ( ) ;
}
catch ( Exception ex )
{
@ -369,7 +366,7 @@ public class AbpIoSourceCodeStore : ISourceCodeStore, ITransientDependency
throw ;
}
Console . WriteLine ( "Error occured while downloading source-code from {0} : {1}{2}{3}" , url ,
Console . WriteLine ( "Error occurr ed while downloading source-code from {0} : {1}{2}{3}" , url ,
responseMessage ? . ToString ( ) , Environment . NewLine , ex . Message ) ;
throw ;
}
@ -2,7 +2,6 @@ using System;
using System.Net ;
using System.Net.Http ;
using System.Threading.Tasks ;
using Microsoft.Extensions.Options ;
using Shouldly ;
using Volo.Abp.Cli.ProjectBuilding ;
using Volo.Abp.Json.SystemTextJson ;