Release 0.1.5#187
Conversation
Braces were added to single-line if statements in the JSONUtils class to improve code readability and maintainability.
Refactored MethodUtils by renaming addBannedMethod to banMethod for clarity and updated all relevant references. Also removed unnecessary throws declaration from initBannedMethods.
Changed the type of 'properties' from raw Map to Properties in copySystemProperties, and updated the putAll call to cast Properties to Map. This improves type safety and clarity.
Updated MethodUtilsTest to use the new banMethod name instead of addBannedMethod, reflecting the method rename in MethodUtils. Adjusted related test and helper method names accordingly.
There was a problem hiding this comment.
Pull Request Overview
This is a release PR for version 0.1.5 that includes code improvements and refactoring changes across the codebase.
- Renamed
addBannedMethodtobanMethodfor better clarity - Fixed thread safety issues in system properties handling
- Improved code formatting with proper braces for single-line if statements
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| MethodUtilsTest.java | Updated test method names to reflect the renamed banMethod function |
| SystemUtils.java | Fixed thread safety by moving synchronization block and improved type safety |
| MethodUtils.java | Renamed addBannedMethod to banMethod and removed unnecessary exception declaration |
| JSONUtils.java | Added missing braces for single-line if statements and removed unnecessary cast |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Map<String, String> copy = systemPropertiesCopy; | ||
| if (copy == null) { | ||
| copy = newHashMap(properties.size()); | ||
| systemPropertiesCopy = copy; | ||
| } | ||
| copy.putAll((Map) properties); |
There was a problem hiding this comment.
The variable copy is accessed outside the synchronized block on line 551. This creates a race condition where another thread could modify systemPropertiesCopy between the assignment and the putAll operation. Move the copy.putAll((Map) properties); line inside the synchronized block or ensure proper synchronization.
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Expanded StopWatchTest to include tests for Task equality, inequality, and hashCode. Refactored to use a constant for the test name and improved test coverage for Task-related methods.
|



No description provided.