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

Fix issues reported by Coverity Scan #5995

Merged
merged 2 commits into from
Apr 9, 2024
Merged

Conversation

stweil
Copy link
Member

@stweil stweil commented Mar 7, 2024

Fixes: 7a612fa ("Update MetadataEditor.java")
Fixes: 6c6f5cf ("adjust property search, so legacy filters do work")

Fixes: 7a612fa ("Update MetadataEditor.java")
Signed-off-by: Stefan Weil <[email protected]>
Fixes: 6c6f5cf ("adjust property search, so legacy filters do work")
Signed-off-by: Stefan Weil <[email protected]>
@stweil
Copy link
Member Author

stweil commented Mar 7, 2024

@Kathrin-Huber, could you please review the change in Kitodo/src/main/java/org/kitodo/production/services/data/FilterService.java?

@stweil stweil changed the title Fix CID 415251 (Dereference before null check) Fix issues reported by Coverity Scan Mar 7, 2024
filter.replace("template","property");
filter = filter.replace("processproperty","property");
filter = filter.replace("workpiece","property");
filter = filter.replace("template","property");
Copy link
Collaborator

Choose a reason for hiding this comment

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

The functional equivalent would be to remove this method. We don’t support these search terms any more since a long time.

Copy link
Member Author

Choose a reason for hiding this comment

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

If that code implements something which is no longer supported, then removing it is indeed the best solution.

@solth solth merged commit f73e4fe into kitodo:master Apr 9, 2024
5 checks passed
@solth
Copy link
Member

solth commented Apr 9, 2024

@stweil would you mind opening a corresponding pull request with the same fix against the 3.6.x branch?

@stweil stweil deleted the coverity branch April 9, 2024 14:23
@stweil
Copy link
Member Author

stweil commented Apr 9, 2024

Done in PR #6027.

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.

3 participants