Skip to content

Commit

Permalink
[2133] Fix NPE in Related Elements view
Browse files Browse the repository at this point in the history
Since #2032, `self` is a single element, not a list.

Bug: #2133
Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
Signed-off-by: Axel RICHARD <axel.richard@obeo.fr>
  • Loading branch information
pcdavid authored and AxelRICHARD committed Jun 30, 2023
1 parent 587d2e3 commit 2c67738
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Expand Up @@ -35,6 +35,7 @@ An absent/empty candidates expression now simply means the widget is empty.
- https://github.com/eclipse-sirius/sirius-components/issues/2067[#2064] [view] Enable completion support and other text field customizations for custom widgets
- https://github.com/eclipse-sirius/sirius-components/issues/2092[#2092] [form] Fix support for help expressions on the _FlexboxContainer_ widget
- https://github.com/eclipse-sirius/sirius-components/issues/2088[#2088] [tree] Fix initial value of the tree filter bar
- https://github.com/eclipse-sirius/sirius-components/issues/2133[#2133] [workbench] Fix NPE in Related Elements view

=== New Features

Expand Down
Expand Up @@ -62,9 +62,6 @@ public FormDescription getFormDescription() {

// @formatter:off
Function<VariableManager, String> targetObjectIdProvider = variableManager -> variableManager.get(VariableManager.SELF, Object.class)
.filter(self -> self instanceof List<?>)
.map(self -> (List<?>) self)
.flatMap(self -> self.stream().findFirst())
.map(this.objectService::getId)
.orElse(null);

Expand Down

0 comments on commit 2c67738

Please sign in to comment.