-
Notifications
You must be signed in to change notification settings - Fork 54
Release 0.1.6 #195
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
Release 0.1.6 #195
Conversation
…rojects#193 Removed the 'spring-core' test dependency from microsphere-java-core/pom.xml and added multiple Spring Framework source files under src/test/java for testing purposes. This change allows tests to run without relying on the external spring-core dependency.
…sphere-projects#193" This reverts commit 66405ee.
Bumped the default Spring version to 6.2.11. Added a Maven profile 'spring5' to use Spring 5.3.31 for JDK versions 1.8 to 16, ensuring compatibility with older Java versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the Spring framework version from 5.3.31 to 6.2.11 and adds Java version-based profile support to maintain backward compatibility. It also refactors a test method to run in a separate executor thread.
- Upgrades Spring framework to version 6.2.11 with fallback profile for Spring 5.3.31 on Java 8-16
- Adds Maven profile for conditional Spring version selection based on JDK version
- Refactors FileUtilsTest to execute deletion test in separate thread executor
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| microsphere-java-parent/pom.xml | Updates Spring version and adds JDK-based profile for Spring 5 compatibility |
| microsphere-java-core/src/test/java/io/microsphere/io/FileUtilsTest.java | Refactors test method to run in executor thread with proper shutdown handling |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| while (!executor.isTerminated()) { | ||
| sleep(10L); | ||
| } |
Copilot
AI
Sep 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This busy-wait loop with sleep could run indefinitely if the executor never terminates. Consider using executor.awaitTermination(timeout, timeUnit) with a reasonable timeout to prevent potential test hangs.
| while (!executor.isTerminated()) { | |
| sleep(10L); | |
| } | |
| // Wait for executor to terminate, with a timeout to prevent hangs | |
| boolean terminated = executor.awaitTermination(5000L, MILLISECONDS); | |
| assertTrue(terminated, "Executor did not terminate within timeout"); |
Codecov Report❌ Patch coverage is
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ects#191 Reimplemented StringUtils.split to avoid StringTokenizer, handle null and empty delimiters, and added toStringArray utility. Updated StringUtilsTest to cover new edge cases and ensure compatibility with Spring's delimitedListToStringArray.
Corrects the substring indices when extracting the protocol from a URL string, ensuring the returned value does not include a leading character.
Eliminated redundant sleep call in FileUtilsTest to improve test efficiency and clarity.
|



This pull request introduces several improvements and refactorings across the codebase, focusing on enhancing the
StringUtilsutility methods, updating dependencies, and improving test coverage and maintainability. The most notable changes include a complete rewrite of thesplitmethods inStringUtils, the addition of a contributor code of conduct, and updates to dependency management for Spring compatibility.String utilities enhancements
StringUtils.splitmethods to handle more edge cases (null/empty strings, empty delimiters, single-character delimiters), added annotations for null-safety, and replaced the use ofStringTokenizerwith custom logic for splitting. This improves correctness and consistency across usages. [1] [2]toStringArray(Collection<String>)to safely convert collections to string arrays, returning an empty array for null or empty collections.Test improvements
StringUtilsTestto cover new edge cases insplit,replace,substringBeforeLast,substringAfterLast, and to test the newtoStringArraymethod. Refactored tests for clarity and correctness. [1] [2] [3] [4] [5] [6]FileUtilsTestby refactoring the test for directory deletion to run in a separate thread and properly handle executor shutdown. [1] [2]ClassDataRepositoryTestto remove an unnecessary assertion.Dependency and configuration updates
pom.xmlfrom0.2.0to0.2.1.Project governance
CODE_OF_CONDUCT.mdfile based on the Contributor Covenant, establishing clear guidelines for community behavior and reporting mechanisms.Minor fixes
URLUtils.findSubProtocolsStringto correctly extract subprotocols from URLs.