Skip to content

Rollback TypeUtils.java changes#285

Merged
mercyblitz merged 5 commits into
mainfrom
copilot/refactor-collection-creation-methods
May 30, 2026
Merged

Rollback TypeUtils.java changes#285
mercyblitz merged 5 commits into
mainfrom
copilot/refactor-collection-creation-methods

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 30, 2026

Rollback TypeUtils.java to revert recent changes that replaced factory method calls with direct constructor invocations in JavaDoc examples.

Changes

  • Restore SetUtils factory method import
  • Restore factory method calls in JavaDoc examples (newArrayList(), newHashMap(), newHashSet())

Before:

ParameterizedType listType = (ParameterizedType) new ArrayList<>().getClass().getGenericSuperclass();
Set<Type> types = new HashSet<>();

After:

ParameterizedType listType = (ParameterizedType) newArrayList().getClass().getGenericSuperclass();
Set<Type> types = newHashSet();

Copilot AI changed the title Refactor collection constructors to use factory methods Standardize collection instantiation via factory methods May 30, 2026
Copilot AI requested a review from mercyblitz May 30, 2026 06:33
Copilot AI force-pushed the copilot/refactor-collection-creation-methods branch from 16cf0a9 to deb3c95 Compare May 30, 2026 06:40
Copilot AI changed the title Standardize collection instantiation via factory methods Fix import conventions and JavaDoc examples in collection factory refactoring May 30, 2026
@mercyblitz mercyblitz marked this pull request as ready for review May 30, 2026 08:08
Copilot AI changed the title Fix import conventions and JavaDoc examples in collection factory refactoring Rollback TypeUtils.java changes May 30, 2026
Remove unused static import of SetUtils and update Javadoc examples to use standard collection constructors (e.g. new ArrayList<String>(), new HashMap<String, Integer>(), new HashSet<>()) instead of project-specific factory helpers like newArrayList()/newHashMap()/newHashSet(). Changes only touch documentation comments and imports to make examples clearer and remove an unused import; no runtime behavior changes.
Add static import of io.microsphere.collection.ListUtils.newLinkedList to MethodUtils and JarUtils so the helper can be referenced without qualification in these classes.
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ Complexity Δ
.../io/microsphere/classloading/ArtifactDetector.java 98.03% <100.00%> (ø) 22.00 <0.00> (ø)
...assloading/BannedArtifactClassLoadingExecutor.java 100.00% <100.00%> (ø) 13.00 <4.00> (ø)
.../io/microsphere/event/AbstractEventDispatcher.java 98.30% <100.00%> (ø) 21.00 <2.00> (ø)
...ava/io/microsphere/event/GenericEventListener.java 100.00% <100.00%> (ø) 13.00 <1.00> (ø)
...src/main/java/io/microsphere/event/Listenable.java 100.00% <100.00%> (ø) 5.00 <1.00> (ø)
...c/main/java/io/microsphere/filter/FilterUtils.java 100.00% <100.00%> (ø) 4.00 <3.00> (ø)
...va/io/microsphere/io/StandardFileWatchService.java 97.27% <100.00%> (ø) 34.00 <0.00> (ø)
...e/src/main/java/io/microsphere/json/JSONArray.java 92.94% <100.00%> (ø) 82.00 <0.00> (ø)
.../src/main/java/io/microsphere/json/JSONObject.java 94.38% <100.00%> (ø) 105.00 <2.00> (ø)
...rc/main/java/io/microsphere/json/JSONStringer.java 100.00% <100.00%> (ø) 59.00 <0.00> (ø)
... and 8 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mercyblitz mercyblitz merged commit 24d04d7 into main May 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants