Fix more SonarCloud warnings (#10901)

This commit is contained in:
Ihar Hubchyk
2026-07-05 19:40:15 +08:00
committed by GitHub
parent c000894847
commit 3982709039
3 changed files with 10 additions and 10 deletions
@@ -696,7 +696,7 @@ final class InnoExtract
}
System.arraycopy( stripped, 5, lzmaAlone, 13, stripped.length - 5 );
try ( final InputStream lzmaStream = new java.io.ByteArrayInputStream( lzmaAlone ) ) {
try ( final InputStream lzmaStream = new ByteArrayInputStream( lzmaAlone ) ) {
try ( final org.tukaani.xz.LZMAInputStream decoder = new org.tukaani.xz.LZMAInputStream( lzmaStream ) ) {
return readAllBytes( decoder );
}
@@ -719,7 +719,7 @@ final class InnoExtract
dictSize = ( 2 | ( dictProp & 1 ) ) << ( dictProp / 2 + 11 );
}
try ( final InputStream bis = new java.io.ByteArrayInputStream( data, 1, data.length - 1 ) ) {
try ( final InputStream bis = new ByteArrayInputStream( data, 1, data.length - 1 ) ) {
try ( final org.tukaani.xz.LZMA2InputStream decoder = new org.tukaani.xz.LZMA2InputStream( bis, dictSize ) ) {
return readAllBytes( decoder );
}
+1 -1
View File
@@ -63,7 +63,7 @@ try {
}
}
} catch {
if ($null -Eq $Env:APPDATA) {
if ($null -eq $Env:APPDATA) {
Write-Host -ForegroundColor Red "FATAL ERROR: Unable to determine the destination directory"
return
+7 -7
View File
@@ -63,7 +63,7 @@ try {
$randName = [System.IO.Path]::GetRandomFileName()
$tempPath = "$DestPath\$randName"
if (-Not (Test-Path -Path $tempPath)) {
if (-not (Test-Path -Path $tempPath)) {
[void](New-Item -Path $tempPath -ItemType "directory")
break
@@ -84,20 +84,20 @@ try {
$randName = [System.IO.Path]::GetRandomFileName()
$tmpMusicPath = "$DestPath\$randName"
if (-Not (Test-Path -Path $tmpMusicPath)) {
if (-not (Test-Path -Path $tmpMusicPath)) {
[void](New-Item -Path $tmpMusicPath -ItemType "directory")
break
}
}
if (-Not (Test-Path -Path $tmpMusicPath -PathType Container)) {
if (-not (Test-Path -Path $tmpMusicPath -PathType Container)) {
[void](New-Item -Path $tmpMusicPath -ItemType "directory")
}
if (-Not (Test-Path -Path "$tmpMusicPath\pol" -PathType Container)) {
if (-not (Test-Path -Path "$tmpMusicPath\pol" -PathType Container)) {
[void](New-Item -Path "$tmpMusicPath\pol" -ItemType "directory")
}
if (-Not (Test-Path -Path "$tmpMusicPath\sw" -PathType Container)) {
if (-not (Test-Path -Path "$tmpMusicPath\sw" -PathType Container)) {
[void](New-Item -Path "$tmpMusicPath\sw" -ItemType "directory")
}
@@ -162,7 +162,7 @@ try {
$dirName = "music$musicType.$uniqId"
}
if (-Not (Test-Path -Path "$DestPath\$dirName")) {
if (-not (Test-Path -Path "$DestPath\$dirName")) {
break
}
@@ -283,7 +283,7 @@ try {
[System.Windows.Forms.Application]::Run($mainForm)
if ($null -Ne $commandToRun) {
if ($null -ne $commandToRun) {
& $commandToRun
}
} catch {