diff --git a/src/FileTypeDetection/Infrastructure/ArchiveInternals.vb b/src/FileTypeDetection/Infrastructure/ArchiveInternals.vb
index f892f94b..7468e69d 100644
--- a/src/FileTypeDetection/Infrastructure/ArchiveInternals.vb
+++ b/src/FileTypeDetection/Infrastructure/ArchiveInternals.vb
@@ -861,11 +861,6 @@ Namespace Global.Tomtastisch.FileClassifier
Return True
End Function
- Private Shared Function TryReadEntryPayloadBounded(entry As SharpCompress.Archives.IArchiveEntry, maxBytes As Long,
- ByRef payload As Byte()) As Boolean
- Return TryReadEntryPayloadBoundedWithOptions(entry, maxBytes, FileTypeOptions.GetSnapshot(), payload)
- End Function
-
Private Shared Function TryReadEntryPayloadBoundedWithOptions(
entry As SharpCompress.Archives.IArchiveEntry,
maxBytes As Long,
diff --git a/src/FileTypeDetection/Providers/NetStandard2_0/HashPrimitivesProvider.vb b/src/FileTypeDetection/Providers/NetStandard2_0/HashPrimitivesProvider.vb
index 0991dd2d..31abe3a2 100644
--- a/src/FileTypeDetection/Providers/NetStandard2_0/HashPrimitivesProvider.vb
+++ b/src/FileTypeDetection/Providers/NetStandard2_0/HashPrimitivesProvider.vb
@@ -67,7 +67,7 @@ Namespace Global.Tomtastisch.FileClassifier
''' Hex-String in Kleinbuchstaben ohne Trennzeichen.
Public Function EncodeLowerHex(data As Byte()) As String Implements IHexCodec.EncodeLowerHex
Dim safeData = If(data, Array.Empty(Of Byte)())
- Dim chars As Char() = Nothing
+ Dim chars As Char()
Dim index As Integer = 0
If safeData.Length = 0 Then Return String.Empty
diff --git a/tests/FileTypeDetectionLib.Tests/Unit/ArchiveInternalsNestedBranchUnitTests.cs b/tests/FileTypeDetectionLib.Tests/Unit/ArchiveInternalsNestedBranchUnitTests.cs
index 987f3a10..84199c3a 100644
--- a/tests/FileTypeDetectionLib.Tests/Unit/ArchiveInternalsNestedBranchUnitTests.cs
+++ b/tests/FileTypeDetectionLib.Tests/Unit/ArchiveInternalsNestedBranchUnitTests.cs
@@ -67,19 +67,20 @@ public void TryProcessNestedGArchive_ReturnsTrue_WithInvalidNestedDescriptor()
}
[Fact]
- public void TryReadEntryPayloadBounded_ReturnsFalse_ForInvalidInputs()
+ public void TryReadEntryPayloadBoundedWithOptions_ReturnsFalse_ForInvalidInputs()
{
var method = typeof(SharpCompressArchiveBackend).GetMethod(
- "TryReadEntryPayloadBounded",
+ "TryReadEntryPayloadBoundedWithOptions",
BindingFlags.NonPublic | BindingFlags.Static,
binder: null,
- types: new[] { typeof(IArchiveEntry), typeof(long), typeof(byte[]).MakeByRefType() },
+ types: new[] { typeof(IArchiveEntry), typeof(long), typeof(FileTypeProjectOptions), typeof(byte[]).MakeByRefType() },
modifiers: null)!;
Assert.NotNull(method);
- Assert.False(TestGuard.Unbox(method.Invoke(null, new object?[] { null, 10L, null })));
+ var opt = FileTypeProjectOptions.DefaultOptions();
+ Assert.False(TestGuard.Unbox(method.Invoke(null, new object?[] { null, 10L, opt, null })));
Assert.False(TestGuard.Unbox(method.Invoke(null,
- new object?[] { CreateZipArchiveEntry("a.txt", new byte[] { 1 }), 0L, null })));
+ new object?[] { CreateZipArchiveEntry("a.txt", new byte[] { 1 }), 0L, opt, null })));
}
private static IArchiveEntry CreateZipArchiveEntry(string name, byte[] payload)
diff --git a/tools/ci/checks/QodanaContractValidator/Program.cs b/tools/ci/checks/QodanaContractValidator/Program.cs
index ee1fff33..05d2bf41 100644
--- a/tools/ci/checks/QodanaContractValidator/Program.cs
+++ b/tools/ci/checks/QodanaContractValidator/Program.cs
@@ -4,7 +4,11 @@
{
// Style/noise findings that are not security/reliability regressions for CI gate purposes.
"CheckNamespace",
- "RedundantQualifier"
+ "RedundantQualifier",
+ "RedundantSuppressNullableWarningExpression",
+ "UnusedImportClause",
+ "UnusedMember.Local",
+ "VBWarnings__BC42309"
};
var argsList = args.ToList();