Skip to content

102 feature implement booleanexpressionextensions#309

Merged
TanaseMariusatstarion merged 3 commits into
developmentfrom
102-feature-implement-booleanexpressionextensions
Jun 23, 2026
Merged

102 feature implement booleanexpressionextensions#309
TanaseMariusatstarion merged 3 commits into
developmentfrom
102-feature-implement-booleanexpressionextensions

Conversation

@TanaseMariusatstarion

Copy link
Copy Markdown
Contributor

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the SysML2.NET code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

Fixed #102 implementation of BooleanExpression extension.

// therefore, just return the function as a predicate; if no function, will return null;
return booleanExpressionSubject == null
? throw new ArgumentNullException(nameof(booleanExpressionSubject))
: booleanExpressionSubject.ComputeFunction() as IPredicate;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could silently fails in following case : If inside the "type" collection, we do have 2 elements, if the first one is a Function and the second one a Predicate, this method would return null even if it should return the second element. It's preferable to filter via the "type" collection directly and no call the ComputeFunction that already return the First element of type IFunction

@sonarqubecloud

Copy link
Copy Markdown

@TanaseMariusatstarion TanaseMariusatstarion merged commit a42ee93 into development Jun 23, 2026
8 checks passed
@TanaseMariusatstarion TanaseMariusatstarion deleted the 102-feature-implement-booleanexpressionextensions branch June 23, 2026 15:28
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.

[Feature]: Implement BooleanExpressionExtensions

2 participants