Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
76b3105
Merge pull request #251 from microsphere-projects/main
mercyblitz Mar 5, 2026
af846ee
Bump project revision to 0.1.9-SNAPSHOT
mercyblitz Mar 14, 2026
34db413
Initial plan
Copilot Mar 18, 2026
cb04c55
Add missing test cases for StringToByteConverter and ClassFileJarEntr…
Copilot Mar 18, 2026
d6e1b54
Merge pull request #6 from mercyblitz/copilot/add-test-cases-for-cove…
mercyblitz Mar 18, 2026
a0d96a9
Merge pull request #7 from mercyblitz/main
mercyblitz Mar 18, 2026
5c8e7b6
Initial plan
Copilot Mar 18, 2026
3586297
Changes before error encountered
Copilot Mar 18, 2026
a85c15e
Merge pull request #8 from mercyblitz/copilot/enhance-code-coverage-t…
mercyblitz Mar 18, 2026
fbfbefe
Merge pull request #255 from mercyblitz/dev
mercyblitz Mar 18, 2026
2d4744e
Initial plan
Copilot Mar 18, 2026
d1a41be
Enhance AbstractDequeTest.java for 100% coverage of AbstractDeque.java
Copilot Mar 18, 2026
2b89fe0
Enhance ClassPathResourceConfigurationPropertyLoaderTest for 100% cov…
Copilot Mar 18, 2026
e4c894b
Merge pull request #9 from mercyblitz/copilot/write-test-case-abstrac…
mercyblitz Mar 18, 2026
86286d9
Merge branch 'microsphere-projects:dev' into dev
mercyblitz Mar 18, 2026
3559210
Merge pull request #256 from mercyblitz/dev
mercyblitz Mar 18, 2026
8ee92bd
Initial plan
Copilot Mar 19, 2026
ad6511d
Add test cases to enhance coverage for ThrowableFunction and FileExte…
Copilot Mar 19, 2026
0fcccbb
Add test cases to enhance coverage for JSONArray, JSONObject, Standar…
Copilot Mar 19, 2026
2d1195f
Add test cases to enhance coverage for AbstractConverter, AbstractDeq…
Copilot Mar 19, 2026
fd30f1f
Add test cases to enhance coverage for Sets, Lists, Maps, and Reflect…
Copilot Mar 19, 2026
af5d740
Update JUnit Jupiter from 5.14.2 to 5.14.3 on Maven profile java8-16
Copilot Mar 19, 2026
655eb32
Merge pull request #257 from microsphere-projects/copilot/add-test-ca…
mercyblitz Mar 19, 2026
a601865
Enhance maven-publish and add merge workflow
mercyblitz Mar 19, 2026
5a954cb
Bump parent POM version to 0.2.5
mercyblitz Mar 19, 2026
4ee8d7e
refactor: extract MethodHandle helpers in Sets/Maps/Lists for full br…
Copilot Mar 19, 2026
71d6064
Merge pull request #259 from microsphere-projects/copilot/enhance-cod…
mercyblitz Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 63 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ on:
workflow_dispatch:
inputs:
revision:
description: 'The version to release'
description: 'The version to publish (must match ${major}.${minor}.${patch})'
required: true
default: '0.0.1-SNAPSHOT'
default: '${major}.${minor}.${patch}'

jobs:
build:
Expand All @@ -26,6 +26,13 @@ jobs:
- name: Checkout Source
uses: actions/checkout@v5

- name: Validate version format
run: |
if ! echo "${{ inputs.revision }}" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
echo "Error: version '${{ inputs.revision }}' does not match the required pattern major.minor.patch"
exit 1
fi

- name: Setup Maven Central Repository
uses: actions/setup-java@v5
with:
Expand All @@ -51,3 +58,57 @@ jobs:
SIGN_KEY_ID: ${{ secrets.OSS_SIGNING_KEY_ID_LONG }}
SIGN_KEY: ${{ secrets.OSS_SIGNING_KEY }}
SIGN_KEY_PASS: ${{ secrets.OSS_SIGNING_PASSWORD }}

release:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout Source
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Create Tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git rev-parse "${{ inputs.revision }}" >/dev/null 2>&1; then
echo "Tag ${{ inputs.revision }} already exists, skipping."
else
git tag ${{ inputs.revision }}
git push origin ${{ inputs.revision }}
fi

- name: Create Release
run: |
if gh release view "v${{ inputs.revision }}" >/dev/null 2>&1; then
echo "Release v${{ inputs.revision }} already exists, skipping."
else
gh release create v${{ inputs.revision }} \
--title "v${{ inputs.revision }}" \
--generate-notes \
--latest
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Increment patch version
run: |
CURRENT="${{ inputs.revision }}"
MAJOR=$(echo "$CURRENT" | cut -d. -f1)
MINOR=$(echo "$CURRENT" | cut -d. -f2)
PATCH=$(echo "$CURRENT" | cut -d. -f3)
NEXT_PATCH=$((PATCH + 1))
NEXT_VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}-SNAPSHOT"
sed -i "s|^\( *\)<revision>[^<]*</revision>|\1<revision>${NEXT_VERSION}</revision>|" pom.xml
echo "Bumped version from ${CURRENT} to ${NEXT_VERSION}"

- name: Commit and push next version
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pom.xml
git diff --cached --quiet && echo "No changes to commit" || \
git commit -m "chore: bump version to next patch after publishing ${{ inputs.revision }}" && git push
66 changes: 66 additions & 0 deletions .github/workflows/merge-main-to-branches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This workflow automatically merges the 'main' branch into 'dev' and 'release' branches
# whenever changes are pushed to 'main', without requiring manual confirmation.

name: Merge Main to Dev and Release

on:
push:
branches:
- main

concurrency:
group: merge-main-to-branches
cancel-in-progress: false

jobs:
merge-to-dev:
name: Merge main → dev
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Merge main into dev
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if ! git checkout dev; then
echo "::error::Branch 'dev' does not exist. Skipping merge."
exit 1
fi
if ! git merge --no-ff origin/main -m "chore: merge main into dev [skip ci]"; then
echo "::error::Merge conflict detected when merging main into dev. Manual intervention required."
exit 1
fi
git push origin dev
merge-to-release:
name: Merge main → release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Repository
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Merge main into release
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if ! git checkout release; then
echo "::error::Branch 'release' does not exist. Skipping merge."
exit 1
fi
if ! git merge --no-ff origin/main -m "chore: merge main into release [skip ci]"; then
echo "::error::Merge conflict detected when merging main into release. Manual intervention required."
exit 1
fi
git push origin release
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList() {
if (of0MethodHandle == null) {
return ofList0(of0MethodHandle);
}

static <E> List<E> ofList0(MethodHandle methodHandle) {
if (methodHandle == null) {
return emptyList();
}
try {
return (List<E>) of0MethodHandle.invokeExact();
return (List<E>) methodHandle.invokeExact();
} catch (Throwable e) {
return emptyList();
}
Expand All @@ -146,11 +150,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1) {
if (of1MethodHandle == null) {
return ofList1(of1MethodHandle, e1);
}

static <E> List<E> ofList1(MethodHandle methodHandle, E e1) {
if (methodHandle == null) {
return singletonList(e1);
}
try {
return (List<E>) of1MethodHandle.invokeExact(e1);
return (List<E>) methodHandle.invokeExact(e1);
} catch (Throwable e) {
return singletonList(e1);
}
Expand All @@ -176,11 +184,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2) {
if (of2MethodHandle == null) {
return ofList2(of2MethodHandle, e1, e2);
}

static <E> List<E> ofList2(MethodHandle methodHandle, E e1, E e2) {
if (methodHandle == null) {
return of(e1, e2);
}
try {
return (List<E>) of2MethodHandle.invokeExact(e1, e2);
return (List<E>) methodHandle.invokeExact(e1, e2);
} catch (Throwable e) {
return of(e1, e2);
}
Expand All @@ -207,11 +219,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2, E e3) {
if (of3MethodHandle == null) {
return ofList3(of3MethodHandle, e1, e2, e3);
}

static <E> List<E> ofList3(MethodHandle methodHandle, E e1, E e2, E e3) {
if (methodHandle == null) {
return of(e1, e2, e3);
}
try {
return (List<E>) of3MethodHandle.invokeExact(e1, e2, e3);
return (List<E>) methodHandle.invokeExact(e1, e2, e3);
} catch (Throwable e) {
return of(e1, e2, e3);
}
Expand Down Expand Up @@ -239,11 +255,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2, E e3, E e4) {
if (of4MethodHandle == null) {
return ofList4(of4MethodHandle, e1, e2, e3, e4);
}

static <E> List<E> ofList4(MethodHandle methodHandle, E e1, E e2, E e3, E e4) {
if (methodHandle == null) {
return of(e1, e2, e3, e4);
}
try {
return (List<E>) of4MethodHandle.invokeExact(e1, e2, e3, e4);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4);
} catch (Throwable e) {
return of(e1, e2, e3, e4);
}
Expand Down Expand Up @@ -272,11 +292,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2, E e3, E e4, E e5) {
if (of5MethodHandle == null) {
return ofList5(of5MethodHandle, e1, e2, e3, e4, e5);
}

static <E> List<E> ofList5(MethodHandle methodHandle, E e1, E e2, E e3, E e4, E e5) {
if (methodHandle == null) {
return of(e1, e2, e3, e4, e5);
}
try {
return (List<E>) of5MethodHandle.invokeExact(e1, e2, e3, e4, e5);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4, e5);
} catch (Throwable e) {
return of(e1, e2, e3, e4, e5);
}
Expand All @@ -298,11 +322,15 @@
@Nonnull
@Immutable
static <E> List<E> ofList(E e1, E e2, E e3, E e4, E e5, E e6) {
if (of6MethodHandle == null) {
return ofList6(of6MethodHandle, e1, e2, e3, e4, e5, e6);
}

static <E> List<E> ofList6(MethodHandle methodHandle, E e1, E e2, E e3, E e4, E e5, E e6) {
if (methodHandle == null) {
return of(e1, e2, e3, e4, e5, e6);
}
try {
return (List<E>) of6MethodHandle.invokeExact(e1, e2, e3, e4, e5, e6);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4, e5, e6);
} catch (Throwable e) {
return of(e1, e2, e3, e4, e5, e6);
}
Expand Down Expand Up @@ -333,11 +361,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2, E e3, E e4, E e5, E e6, E e7) {
if (of7MethodHandle == null) {
return ofList7(of7MethodHandle, e1, e2, e3, e4, e5, e6, e7);
}

static <E> List<E> ofList7(MethodHandle methodHandle, E e1, E e2, E e3, E e4, E e5, E e6, E e7) {

Check warning on line 367 in microsphere-java-core/src/main/java/io/microsphere/collection/Lists.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Method has 8 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=microsphere-projects_microsphere-java&issues=AZ0GRfH2rpT77nGxohCK&open=AZ0GRfH2rpT77nGxohCK&pullRequest=258
if (methodHandle == null) {
return of(e1, e2, e3, e4, e5, e6, e7);
}
try {
return (List<E>) of7MethodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7);
} catch (Throwable e) {
return of(e1, e2, e3, e4, e5, e6, e7);
}
Expand Down Expand Up @@ -369,11 +401,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) {
if (of8MethodHandle == null) {
return ofList8(of8MethodHandle, e1, e2, e3, e4, e5, e6, e7, e8);
}

static <E> List<E> ofList8(MethodHandle methodHandle, E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8) {

Check warning on line 407 in microsphere-java-core/src/main/java/io/microsphere/collection/Lists.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Method has 9 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=microsphere-projects_microsphere-java&issues=AZ0GRfH2rpT77nGxohCL&open=AZ0GRfH2rpT77nGxohCL&pullRequest=258
if (methodHandle == null) {
return of(e1, e2, e3, e4, e5, e6, e7, e8);
}
try {
return (List<E>) of8MethodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7, e8);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7, e8);
} catch (Throwable e) {
return of(e1, e2, e3, e4, e5, e6, e7, e8);
}
Expand Down Expand Up @@ -406,11 +442,15 @@
@Nonnull
@Immutable
public static <E> List<E> ofList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) {
if (of9MethodHandle == null) {
return ofList9(of9MethodHandle, e1, e2, e3, e4, e5, e6, e7, e8, e9);
}

static <E> List<E> ofList9(MethodHandle methodHandle, E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9) {

Check warning on line 448 in microsphere-java-core/src/main/java/io/microsphere/collection/Lists.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Method has 10 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=microsphere-projects_microsphere-java&issues=AZ0GRfH2rpT77nGxohCM&open=AZ0GRfH2rpT77nGxohCM&pullRequest=258
if (methodHandle == null) {
return of(e1, e2, e3, e4, e5, e6, e7, e8, e9);
}
try {
return (List<E>) of9MethodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7, e8, e9);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7, e8, e9);
} catch (Throwable e) {
return of(e1, e2, e3, e4, e5, e6, e7, e8, e9);
}
Expand All @@ -436,11 +476,15 @@
@Nonnull
@Immutable
static <E> List<E> ofList(E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) {
if (of10MethodHandle == null) {
return ofList10(of10MethodHandle, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
}

static <E> List<E> ofList10(MethodHandle methodHandle, E e1, E e2, E e3, E e4, E e5, E e6, E e7, E e8, E e9, E e10) {

Check warning on line 482 in microsphere-java-core/src/main/java/io/microsphere/collection/Lists.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Method has 11 parameters, which is greater than 7 authorized.

See more on https://sonarcloud.io/project/issues?id=microsphere-projects_microsphere-java&issues=AZ0GRfH2rpT77nGxohCN&open=AZ0GRfH2rpT77nGxohCN&pullRequest=258
if (methodHandle == null) {
return of(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
}
try {
return (List<E>) of10MethodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
return (List<E>) methodHandle.invokeExact(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
} catch (Throwable e) {
return of(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10);
}
Expand Down Expand Up @@ -470,11 +514,15 @@
if (length(elements) < 1) {
return ofList();
}
if (ofMethodHandle == null) {
return ofListElements(ofMethodHandle, elements);
}

static <E> List<E> ofListElements(MethodHandle methodHandle, E[] elements) {
if (methodHandle == null) {
return of(elements);
}
try {
return (List<E>) ofMethodHandle.invokeExact(elements);
return (List<E>) methodHandle.invokeExact(elements);
} catch (Throwable e) {
return of(elements);
}
Expand Down
Loading