Skip to content

Optimize mergeProperties to Avoid Unnecessary Properties Object Creation#1300

Merged
derTobsch merged 2 commits into
mainfrom
ai-findings-autofix/jollyday-core-src-main-java-de-focus_shift-jollyday-core-parameter-BaseManagerParameter.java
Jun 15, 2026
Merged

Optimize mergeProperties to Avoid Unnecessary Properties Object Creation#1300
derTobsch merged 2 commits into
mainfrom
ai-findings-autofix/jollyday-core-src-main-java-de-focus_shift-jollyday-core-parameter-BaseManagerParameter.java

Conversation

@derTobsch

@derTobsch derTobsch commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

The mergeProperties method creates a new Properties object and performs two putAll operations, which is inefficient. Consider directly modifying this.properties by calling this.properties.putAll(properties) after putting the incoming properties first, or simply reversing the order of putAll calls to avoid creating an unnecessary intermediate object.

derTobsch and others added 2 commits June 15, 2026 14:34
…lyday/core/parameter/BaseManagerParameter.java from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Tobias Schneider <Tobias.Schneider@Tobsch.org>
…lyday/core/parameter/BaseManagerParameter.java from Copilot Autofix

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Signed-off-by: Tobias Schneider <Tobias.Schneider@Tobsch.org>
@sonarqubecloud

Copy link
Copy Markdown

@derTobsch derTobsch added this to the 2.12.0 milestone Jun 15, 2026
@derTobsch derTobsch marked this pull request as ready for review June 15, 2026 12:42
@derTobsch derTobsch changed the title Potential fixes for 2 code quality findings Optimize mergeProperties to Avoid Unnecessary Properties Object Creation Jun 15, 2026
@derTobsch derTobsch added the type: enhancement A general enhancement label Jun 15, 2026
@derTobsch derTobsch merged commit a3b9ba4 into main Jun 15, 2026
22 checks passed
@derTobsch derTobsch deleted the ai-findings-autofix/jollyday-core-src-main-java-de-focus_shift-jollyday-core-parameter-BaseManagerParameter.java branch June 15, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant