Open
Conversation
Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
…NonNullByDefault Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
Added JavaDoc documentation to 5 files in console.rfc147 bundle: - CommandWrapper.java: 2 methods (constructor, _main) - ConsoleCommandsContainer.java: 1 interface method - ConsoleSupportRfc147.java: 7 methods (constructor, activate, deactivate, add/remove, createProperties) - OSGiConsole.java: 2 methods (constructor, getBase) - HelpConsoleCommandExtension.java: 3 methods (constructor, setConsoleCommandsContainer, help) Total: 15 methods documented Build: SUCCESS with only pre-existing warnings Signed-off-by: Vambot07 <salihinazizizol@gmail.com>
suhadaudd11
approved these changes
Jan 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch:
assignment_MuhdSalihinU2100555→main(RareZyn/openhab-core)Author: Muhd Salihin (U2100555)
Date: December 4, 2025
1. The Addressed Issue
Problems Identified:
1.1 Missing Documentation
1.2 Critical Concurrency Bug (org.openhab.core.config.serial)
HashMapfor tracking open serial portsConcurrentModificationExceptionand data corruption when multiple threads access ports simultaneously1.3 Null Safety Violations (org.openhab.core.config.dispatch)
NullPointerException.equals()on potentially null values insetFileRemoved()method2. What Has Been Reengineered
Summary:
Detailed Changes by Bundle:
Key Bug Fixes:
Bug #1: Concurrency Issue (config.serial)
Impact: Prevents crashes in multi-threaded OSGi environment
Bug #2: Null Pointer Exception (config.dispatch)
Impact: Prevents crashes when configuration files are removed
Additional Fixes: Added
@Nullableannotations to 6 fields/methods/parameters that can legitimately be null, enabling compile-time null checking.3. Reengineering Strategy Used
3.1 Documentation-Driven Reengineering
Approach:
Grep/Globto identify undocumented methods@param,@return,@throws)Rationale: Improves maintainability and reduces onboarding time for new contributors.
3.2 Defensive Programming (Bug Fixing)
For Concurrency Bug:
HashMapwithConcurrentHashMapjava.util.concurrentcollections in multi-threaded environmentsFor Null Safety Bugs:
@NonNullByDefaultto enable strict null checking@Nullableannotations where neededknownNonNull.equals(possiblyNull)Rationale: Prevents crashes by catching issues at compile-time instead of runtime.
3.3 Incremental Refactoring
Process:
git commit -s)Tools:
mvn spotless:apply- Code formattingmvn install -DskipTests -DskipChecks- Compilation check4. Impact of Changes
4.1 Improved Maintainability
Before: 61 undocumented methods
After: 100% documented with comprehensive JavaDoc
Benefits:
4.2 Enhanced System Stability
Bugs Fixed → Crashes Prevented:
Before: Potential crashes when multiple threads access serial ports or when config files are deleted
After: Thread-safe and null-safe operations
4.3 CI/CD Compliance
Before: 6 commits failed CI/CD (DCO violations, compilation errors)
After: All 9 commits passing ✅
Checks:
4.4 Technical Debt Reduction
Quantified Improvements: