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

[3.6] Backport fixes from master #6027

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ public List<Pair<PhysicalDivision, LogicalDivision>> getSelectedMedia() {
* <p>Note: This method is called potentially thousands of times when rendering large galleries.</p>
*/
public boolean consecutivePagesSelected() {
if (selectedMedia.isEmpty()) {
if (Objects.isNull(selectedMedia) || selectedMedia.isEmpty()) {
return false;
}
int maxOrder = selectedMedia.stream().mapToInt(m -> m.getLeft().getOrder()).max().orElseThrow(NoSuchElementException::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private static void addMultipleStructuresWithMetadataGroup(int number, String ty
for (int i = 0; i < number; i++) {
LogicalDivision newStructure = addLogicalDivision(type, workpiece, structure, position,
Collections.emptyList());
if (Objects.isNull(newStructure) || metadataKey.isEmpty() || metadataKey == null) {
if (Objects.isNull(newStructure) || metadataKey == null || metadataKey.isEmpty()) {
continue;
}
MetadataGroup metadataGroup = new MetadataGroup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ private QueryBuilder buildQueryFromCondition(String condition, ObjectType object
}

private String replaceLegacyFilters(String filter) {
filter.replace("processproperty","property");
filter.replace("workpiece","property");
filter.replace("template","property");
filter = filter.replace("processproperty","property");
filter = filter.replace("workpiece","property");
filter = filter.replace("template","property");
return filter;
}

Expand Down
Loading