Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/KubernetesClient.Aot/V1PatchJsonConverter.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace k8s.Models
{
#pragma warning disable CA1812 // Avoid uninstantiated internal classes
internal sealed class V1PatchJsonConverter : JsonConverter<V1Patch>
#pragma warning restore CA1812 // Avoid uninstantiated internal classes
public sealed class V1PatchJsonConverter : JsonConverter<V1Patch>
{
public override V1Patch Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
Expand Down
2 changes: 1 addition & 1 deletion src/KubernetesClient/Models/IntOrStringJsonConverter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace k8s.Models
{
internal sealed class IntOrStringJsonConverter : JsonConverter<IntOrString>
public sealed class IntOrStringJsonConverter : JsonConverter<IntOrString>
{
public override IntOrString Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
Expand All @@ -24,7 +24,7 @@
throw new ArgumentNullException(nameof(writer));
}

var s = value.Value;

Check warning on line 27 in src/KubernetesClient/Models/IntOrStringJsonConverter.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

In externally visible method 'void IntOrStringJsonConverter.Write(Utf8JsonWriter writer, IntOrString value, JsonSerializerOptions options)', validate parameter 'value' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 27 in src/KubernetesClient/Models/IntOrStringJsonConverter.cs

View workflow job for this annotation

GitHub Actions / e2e

In externally visible method 'void IntOrStringJsonConverter.Write(Utf8JsonWriter writer, IntOrString value, JsonSerializerOptions options)', validate parameter 'value' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

if (long.TryParse(s, out var intv))
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace k8s.Models
{
internal sealed class ResourceQuantityJsonConverter : JsonConverter<ResourceQuantity>
public sealed class ResourceQuantityJsonConverter : JsonConverter<ResourceQuantity>
{
// https://github.com/kubernetes/apimachinery/blob/4b14f804a0babdcc58e695d72f77ad29f536511e/pkg/api/resource/quantity.go#L683
public override ResourceQuantity Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
Expand Down Expand Up @@ -28,7 +28,7 @@
throw new ArgumentNullException(nameof(writer));
}

writer.WriteStringValue(value.ToString());

Check warning on line 31 in src/KubernetesClient/Models/ResourceQuantityJsonConverter.cs

View workflow job for this annotation

GitHub Actions / Analyze (csharp)

In externally visible method 'void ResourceQuantityJsonConverter.Write(Utf8JsonWriter writer, ResourceQuantity value, JsonSerializerOptions options)', validate parameter 'value' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)

Check warning on line 31 in src/KubernetesClient/Models/ResourceQuantityJsonConverter.cs

View workflow job for this annotation

GitHub Actions / e2e

In externally visible method 'void ResourceQuantityJsonConverter.Write(Utf8JsonWriter writer, ResourceQuantity value, JsonSerializerOptions options)', validate parameter 'value' is non-null before using it. If appropriate, throw an 'ArgumentNullException' when the argument is 'null'. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1062)
}
}
}
2 changes: 1 addition & 1 deletion src/KubernetesClient/Models/V1PatchJsonConverter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace k8s.Models
{
internal sealed class V1PatchJsonConverter : JsonConverter<V1Patch>
public sealed class V1PatchJsonConverter : JsonConverter<V1Patch>
{
public override V1Patch Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
Expand Down
Loading