Skip to content

Commit

Permalink
NPE occurs after adding dynamic attribute manually to a table. Spotbugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtaimanov committed Aug 10, 2022
1 parent 72030d3 commit ea040be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1930,7 +1930,6 @@ public ActionsPermissions getActionsPermissions() {
}

protected List<Column<E>> getInitialVisibleColumns() {
MetaClass metaClass = getEntityDataGridItems().getEntityMetaClass();
return columnsOrder.stream()
.filter(column -> {
MetaPropertyPath propertyPath = column.getPropertyPath();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -736,10 +736,8 @@ public void setEditable(boolean editable) {
}
}

protected void enableEditableColumns(EntityTableItems<E> entityTableSource,
protected void enableEditableColumns(@SuppressWarnings("unused") EntityTableItems<E> entityTableSource, //backward compatibility //todo remove in minor release
Collection<MetaPropertyPath> propertyIds) {
MetaClass metaClass = entityTableSource.getEntityMetaClass();

List<MetaPropertyPath> editableColumns = new ArrayList<>(propertyIds.size());
for (MetaPropertyPath propertyId : propertyIds) {
UiEntityAttributeContext attributeContext =
Expand Down Expand Up @@ -1573,8 +1571,8 @@ && getComponent().getJTestId() == null) {
}
}

protected List<Object> getPropertyColumns(EntityTableItems<E> entityTableSource, List<Column<E>> columnsOrder) {
MetaClass entityMetaClass = entityTableSource.getEntityMetaClass();
protected List<Object> getPropertyColumns(@SuppressWarnings("unused") EntityTableItems<E> entityTableSource, //backward compatibility //todo remove in minor release
List<Column<E>> columnsOrder) {
return columnsOrder.stream()
.filter(c -> {
MetaPropertyPath propertyPath = c.getMetaPropertyPath();
Expand Down Expand Up @@ -2336,10 +2334,9 @@ protected void createStubsForGeneratedColumns() {
}
}

protected List<Object> getInitialVisibleColumnIds(EntityTableItems<E> entityTableSource) {
protected List<Object> getInitialVisibleColumnIds(@SuppressWarnings("unused") EntityTableItems<E> entityTableSource) {//backward compatibility //todo remove in minor release
List<Object> result = new ArrayList<>();

MetaClass metaClass = entityTableSource.getEntityMetaClass();
for (Column column : columnsOrder) {
if (column.getId() instanceof MetaPropertyPath) {
MetaPropertyPath propertyPath = (MetaPropertyPath) column.getId();
Expand Down

0 comments on commit ea040be

Please sign in to comment.