Skip to content

refactor(backend) : extract persistence logic in LicenseDatabaseHandler#3755

Open
clapppp wants to merge 2 commits intoeclipse-sw360:mainfrom
clapppp:refactor/extract-persistence-logic
Open

refactor(backend) : extract persistence logic in LicenseDatabaseHandler#3755
clapppp wants to merge 2 commits intoeclipse-sw360:mainfrom
clapppp:refactor/extract-persistence-logic

Conversation

@clapppp
Copy link

@clapppp clapppp commented Feb 25, 2026

Summary of changes

This PR refactors the updateLicense method in LicenseDatabaseHandler.java to extract the core CouchDB persistence logic into a separate, dedicated helper method (persistLicenseAndChangelogs).

Motivation (Preparation for GSoC 2026 Idea):
By isolating the persistence logic, this refactoring lays the necessary groundwork for GSoC 2026 Idea : Integration of SW360 and LicenseDB. When the future Sync Engine fetches license data from the external LicenseDB, it can directly reuse this extracted method to update the local CouchDB cache and maintain changelog history, without duplicating code or bypassing manual validation flows.

Did you add or update any new dependencies that are required for your change?
No, this is a pure structural refactoring (Extract Method). No new dependencies were added.

Checklist

Must:

  • All related issues are referenced in commit messages and in PR

Signed-off-by: Suhyeon Park <ssantta999@gmail.com>
@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Feb 25, 2026
Copy link
Member

@GMishx GMishx left a comment

Choose a reason for hiding this comment

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

LGTM

@GMishx GMishx added ready ready to merge and removed needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 2, 2026
@GMishx
Copy link
Member

GMishx commented Mar 2, 2026

Hey @clapppp thanks for the explanation as this PR currently did not made any sense. However, I am not merging this PR as of now as are in process of tagging a release and this might be a breaking change and require thorough testing. Thus, I am just marking it as ready to be merged after the release.

@GMishx GMishx added this to the After Release 20.0.0 milestone Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants