Skip to content

Commit 9cd00ed

Browse files
committed
Add ThrowingRunnable alongside ThrowingSupplier et al
Signed-off-by: Hosam Aly <[email protected]>
0 parents  commit 9cd00ed

File tree

11,185 files changed

+1645247
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,185 files changed

+1645247
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*.{adoc,bat,groovy,html,java,js,jsp,kt,kts,md,properties,py,rb,sh,sql,svg,txt,xml,xsd}]
4+
charset = utf-8
5+
6+
[*.{groovy,java,kt,kts,xml,xsd}]
7+
indent_style = tab
8+
indent_size = 4
9+
continuation_indent_size = 8
10+
end_of_line = lf

.gitattributes

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Normalize line endings to LF.
2+
* text eol=lf
3+
4+
# Ensure that line endings for multipart files in spring-web are not modified.
5+
*.multipart -text
6+
7+
# Ensure that line endings for DOS batch files are not modified.
8+
*.bat -text
9+
10+
# Ensure the following are treated as binary.
11+
*.gif binary
12+
*.jar binary
13+
*.jpeg binary
14+
*.jpg binary
15+
*.png binary
16+
*.vsd binary

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Community Support
4+
url: https://stackoverflow.com/tags/spring
5+
about: Please ask and answer questions on StackOverflow with the tag `spring`.
6+

.github/ISSUE_TEMPLATE/issue.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: General
3+
about: Bugs, enhancements, documentation, tasks.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
<!--
11+
12+
Have you considered asking for help on stackoverflow.com?
13+
14+
** Bug Reports **
15+
Please submit issues against OSS supported versions, see https://spring.io/projects/spring-framework#support
16+
Please provide a minimal sample application that reproduces the problem for faster issue triage.
17+
18+
** Enhancements requests **
19+
Before explaining how you would like things to work,
20+
please describe a concrete use case for this feature and how you have tried to solve this so far.
21+
22+
-->
23+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Await HTTP Resource
2+
description: 'Waits for an HTTP resource to be available (a HEAD request succeeds)'
3+
inputs:
4+
url:
5+
description: 'URL of the resource to await'
6+
required: true
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Await HTTP resource
11+
shell: bash
12+
run: |
13+
url=${{ inputs.url }}
14+
echo "Waiting for $url"
15+
until curl --fail --head --silent ${{ inputs.url }} > /dev/null
16+
do
17+
echo "."
18+
sleep 60
19+
done
20+
echo "$url is available"

.github/actions/build/action.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: 'Build'
2+
description: 'Builds the project, optionally publishing it to a local deployment repository'
3+
inputs:
4+
develocity-access-key:
5+
description: 'Access key for authentication with ge.spring.io'
6+
required: false
7+
java-distribution:
8+
description: 'Java distribution to use'
9+
required: false
10+
default: 'liberica'
11+
java-early-access:
12+
description: 'Whether the Java version is in early access'
13+
required: false
14+
default: 'false'
15+
java-toolchain:
16+
description: 'Whether a Java toolchain should be used'
17+
required: false
18+
default: 'false'
19+
java-version:
20+
description: 'Java version to compile and test with'
21+
required: false
22+
default: '25'
23+
publish:
24+
description: 'Whether to publish artifacts ready for deployment to Artifactory'
25+
required: false
26+
default: 'false'
27+
outputs:
28+
build-scan-url:
29+
description: 'URL, if any, of the build scan produced by the build'
30+
value: ${{ (inputs.publish == 'true' && steps.publish.outputs.build-scan-url) || steps.build.outputs.build-scan-url }}
31+
version:
32+
description: 'Version that was built'
33+
value: ${{ steps.read-version.outputs.version }}
34+
runs:
35+
using: composite
36+
steps:
37+
- name: Prepare Gradle Build
38+
uses: ./.github/actions/prepare-gradle-build
39+
with:
40+
develocity-access-key: ${{ inputs.develocity-access-key }}
41+
java-distribution: ${{ inputs.java-distribution }}
42+
java-early-access: ${{ inputs.java-early-access }}
43+
java-toolchain: ${{ inputs.java-toolchain }}
44+
java-version: ${{ inputs.java-version }}
45+
- name: Build
46+
id: build
47+
if: ${{ inputs.publish == 'false' }}
48+
shell: bash
49+
run: ./gradlew check antora
50+
- name: Publish
51+
id: publish
52+
if: ${{ inputs.publish == 'true' }}
53+
shell: bash
54+
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository build publishAllPublicationsToDeploymentRepository
55+
- name: Read Version From gradle.properties
56+
id: read-version
57+
shell: bash
58+
run: |
59+
version=$(sed -n 's/version=\(.*\)/\1/p' gradle.properties)
60+
echo "Version is $version"
61+
echo "version=$version" >> $GITHUB_OUTPUT
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Create GitHub Release
2+
description: 'Create the release on GitHub with a changelog'
3+
inputs:
4+
milestone:
5+
description: 'Name of the GitHub milestone for which a release will be created'
6+
required: true
7+
pre-release:
8+
description: 'Whether the release is a pre-release (a milestone or release candidate)'
9+
required: false
10+
default: 'false'
11+
token:
12+
description: 'Token to use for authentication with GitHub'
13+
required: true
14+
runs:
15+
using: composite
16+
steps:
17+
- name: Generate Changelog
18+
uses: spring-io/github-changelog-generator@86958813a62af8fb223b3fd3b5152035504bcb83 #v0.0.12
19+
with:
20+
config-file: .github/actions/create-github-release/changelog-generator.yml
21+
milestone: ${{ inputs.milestone }}
22+
token: ${{ inputs.token }}
23+
- name: Create GitHub Release
24+
shell: bash
25+
env:
26+
GITHUB_TOKEN: ${{ inputs.token }}
27+
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.pre-release == 'true' && '--prerelease' || '' }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
changelog:
2+
repository: spring-projects/spring-framework
3+
sections:
4+
- title: ":star: New Features"
5+
labels:
6+
- "type: enhancement"
7+
- title: ":lady_beetle: Bug Fixes"
8+
labels:
9+
- "type: bug"
10+
- "type: regression"
11+
- title: ":notebook_with_decorative_cover: Documentation"
12+
labels:
13+
- "type: documentation"
14+
- title: ":hammer: Dependency Upgrades"
15+
sort: "title"
16+
labels:
17+
- "type: dependency-upgrade"
18+
contributors:
19+
exclude:
20+
names:
21+
- "bclozel"
22+
- "jhoeller"
23+
- "poutsma"
24+
- "rstoyanchev"
25+
- "sbrannen"
26+
- "sdeleuze"
27+
- "simonbasle"
28+
- "snicoll"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Prepare Gradle Build
2+
description: 'Prepares a Gradle build. Sets up Java and Gradle and configures Gradle properties'
3+
inputs:
4+
develocity-access-key:
5+
description: 'Access key for authentication with ge.spring.io'
6+
required: false
7+
java-distribution:
8+
description: 'Java distribution to use'
9+
required: false
10+
default: 'liberica'
11+
java-early-access:
12+
description: 'Whether the Java version is in early access. When true, forces java-distribution to temurin'
13+
required: false
14+
default: 'false'
15+
java-toolchain:
16+
description: 'Whether a Java toolchain should be used'
17+
required: false
18+
default: 'false'
19+
java-version:
20+
description: 'Java version to use for the build'
21+
required: false
22+
default: '25'
23+
runs:
24+
using: composite
25+
steps:
26+
- name: Set Up Java
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: ${{ inputs.java-early-access == 'true' && 'temurin' || (inputs.java-distribution || 'liberica') }}
30+
java-version: |
31+
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
32+
${{ inputs.java-toolchain == 'true' && '17' || '' }}
33+
25
34+
- name: Set Up Gradle
35+
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
36+
with:
37+
cache-read-only: false
38+
develocity-access-key: ${{ inputs.develocity-access-key }}
39+
develocity-token-expiry: 4
40+
- name: Configure Gradle Properties
41+
shell: bash
42+
run: |
43+
mkdir -p $HOME/.gradle
44+
echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
45+
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
46+
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
47+
echo 'org.gradle.daemon=4' >> $HOME/.gradle/gradle.properties
48+
- name: Configure Toolchain Properties
49+
if: ${{ inputs.java-toolchain == 'true' }}
50+
shell: bash
51+
run: |
52+
echo toolchainVersion=${{ inputs.java-version }} >> $HOME/.gradle/gradle.properties
53+
echo systemProp.org.gradle.java.installations.auto-detect=false >> $HOME/.gradle/gradle.properties
54+
echo systemProp.org.gradle.java.installations.auto-download=false >> $HOME/.gradle/gradle.properties
55+
echo systemProp.org.gradle.java.installations.paths=${{ format('$JAVA_HOME_{0}_X64', inputs.java-version) }} >> $HOME/.gradle/gradle.properties
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Print JVM thread dumps
2+
description: 'Prints a thread dump for all running JVMs'
3+
runs:
4+
using: composite
5+
steps:
6+
- if: ${{ runner.os == 'Linux' }}
7+
shell: bash
8+
run: |
9+
for jvm_pid in $(jps -q -J-XX:+PerfDisableSharedMem); do
10+
jcmd $jvm_pid Thread.print
11+
done
12+
- if: ${{ runner.os == 'Windows' }}
13+
shell: powershell
14+
run: |
15+
foreach ($jvm_pid in $(jps -q -J-XX:+PerfDisableSharedMem)) {
16+
jcmd $jvm_pid Thread.print
17+
}

0 commit comments

Comments
 (0)