[
https://issues.apache.org/jira/browse/AVRO-3491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17524519#comment-17524519
]
ASF subversion and git services commented on AVRO-3491:
-------------------------------------------------------
Commit 361dd8b6ffdcba93c34a1801445c15fa02447442 in avro's branch
refs/heads/master from Kyle Schoonover
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=361dd8b6f ]
AVRO-3491 Avoid a cast after is check (#1645)
* AVRO-3360 Updated XML documentation
* Revert "AVRO-3360 Updated XML documentation"
This reverts commit b8601c072a5083380d30b580804dd0908b8cf4cc.
* AVRO-3491 Avoid a cast after is check
Co-authored-by: Kyle T. Schoonover <[email protected]>
> Fix IDE0020 Use pattern matching to avoid 'is' check followed by a cast
> -----------------------------------------------------------------------
>
> Key: AVRO-3491
> URL: https://issues.apache.org/jira/browse/AVRO-3491
> Project: Apache Avro
> Issue Type: Sub-task
> Components: csharp
> Reporter: Kyle Schoonover
> Priority: Minor
> Labels: pull-request-available
> Fix For: 1.12.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {code:java}
> // csharp_style_pattern_matching_over_is_with_cast_check = true
> if (o is int i) {...}
> // csharp_style_pattern_matching_over_is_with_cast_check = false
> if (o is int) {var i = (int)o; ... } {code}
> For Reference: [Use pattern matching to avoid 'is' check followed by a cast
> (IDE0020 and IDE0038) - .NET | Microsoft
> Docs|https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0020-ide0038]
--
This message was sent by Atlassian Jira
(v8.20.7#820007)