Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed the issue with Any expected state for func services #261

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

alexeyzimarev
Copy link
Contributor

When using ExpectedState.Any in a func service, it crashes with an exception if the stream didn't exist.

It was caused by the code that tried to extract the new expected version from the stream, when the stream has no events, so calling Last on the sequence caused an exception,

@alexeyzimarev alexeyzimarev merged commit 330506f into dev Aug 28, 2023
2 checks passed
@alexeyzimarev alexeyzimarev deleted the app-service-api-cleanup branch August 28, 2023 17:59
@github-actions
Copy link

Qodana for .NET

781 new problems were found

Inspection name Severity Problems
Non-accessed positional property (non-private accessibility) 🔶 Warning 42
Auto-property accessor is never used (non-private accessibility) 🔶 Warning 12
Non-accessed field (private accessibility) 🔶 Warning 8
Possible unassigned object created by 'new' expression 🔶 Warning 8
Non-accessed positional property (private accessibility) 🔶 Warning 6
Unused parameter (private accessibility) 🔶 Warning 4
Unused local variable 🔶 Warning 3
Conditional access qualifier expression is not null according to nullable reference types' annotations 🔶 Warning 2
Return type of a function can be non-nullable 🔶 Warning 2
Redundant boolean comparison 🔶 Warning 2
XML comment has a 'param' tag for 'Parameter', but there is no parameter by that name 🔶 Warning 2
Member hides static member from outer class 🔶 Warning 2
Type member is never used (private accessibility) 🔶 Warning 2
Type member is never used (non-private accessibility) ◽️ Notice 437
Member can be made private (non-private accessibility) ◽️ Notice 76
Type is never used (non-private accessibility) ◽️ Notice 48
Auto-property can be made get-only (non-private accessibility) ◽️ Notice 26
Method return value is never used (non-private accessibility) ◽️ Notice 22
Unused parameter (non-private accessibility) ◽️ Notice 18
Member can be made protected (non-private accessibility) ◽️ Notice 16
Property can be made init-only (non-private accessibility) ◽️ Notice 8
Class is never instantiated (private accessibility) ◽️ Notice 6
Parameter type can be IEnumerable<T> (private accessibility) ◽️ Notice 4
Use preferred style of 'new' expression when created type is not evident ◽️ Notice 4
Type member is never accessed via base type (non-private accessibility) ◽️ Notice 4
Some values of the enum are not processed inside 'switch' expression and are handled via exception in default arm ◽️ Notice 4
Tail recursive call can be replaced with loop ◽️ Notice 2
Member can be made private (private accessibility) ◽️ Notice 2
Field can be made readonly (non-private accessibility) ◽️ Notice 2
Virtual (overridable) member is never overridden (non-private accessibility) ◽️ Notice 2
Return type can be IEnumerable<T> (non-private accessibility) ◽️ Notice 2
Some values of the enum are not processed inside 'switch' statement ◽️ Notice 2
Convert local variable or field into constant (private accessibility) ◽️ Notice 1

☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant