Skip to content

Commit a5478ea

Browse files
authored
Refactor of the way Lambda job classes are identified (#2431)
1 parent ffa70e2 commit a5478ea

File tree

5 files changed

+34
-12
lines changed

5 files changed

+34
-12
lines changed

.github/workflows/graalvm.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ on:
2323
paths:
2424
- '.github/workflows/graalvm.yml'
2525
- 'reachability-metadata/src/**'
26-
- 'test/native/native-image-filter/**'
27-
- 'test/native/src/**'
26+
- 'test/native/**'
2827

2928
jobs:
3029
build:

RELEASE-NOTES.md

+29-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,36 @@
1+
## Release 3.1.0-SNAPSHOT
2+
3+
### API Changes
4+
5+
1. Kernel: Refactor of the way Lambda job classes are identified - [#2370](https://github.com/apache/shardingsphere-elasticjob/issues/2370)
6+
7+
### New Features
8+
9+
### Enhancements
10+
11+
1. Bootstrap: Provides built-in GraalVM Reachability Metadata and nativeTest on Elasticjob Bootstrap - [#2268](https://github.com/apache/shardingsphere-elasticjob/pull/2268)
12+
1. Build: Support for building with OpenJDK 22 - [#2407](https://github.com/apache/shardingsphere-elasticjob/issues/2407)
13+
1. Spring Boot Starter: Block `elasticjob-spring-boot-starter` from passing `spring-boot-starter` test scope dependencies - [#2418](https://github.com/apache/shardingsphere-elasticjob/issues/2418)
14+
1. Lifecycle: Support dynamic configuration of jobs through the Operation API in GraalVM Native Image - [#2426](https://github.com/apache/shardingsphere-elasticjob/pull/2426)
15+
1. Doc: Adds documentation for connecting to Zookeeper Server with SASL enabled - [#2442](https://github.com/apache/shardingsphere-elasticjob/pull/2442)
16+
1. Build: Support building and using ElasticJob with JDK23 - [#2453](https://github.com/apache/shardingsphere-elasticjob/issues/2453)
17+
1. Build: Support building and using ElasticJob with JDK23 - [#2453](https://github.com/apache/shardingsphere-elasticjob/issues/2453)
18+
19+
### Bug Fixes
20+
21+
1. Build: Removes non-existent `elasticjob-tracing-api` and `elasticjob-error-handler-spi` module - [#2412](https://github.com/apache/shardingsphere-elasticjob/pull/2412)
22+
1. Spring Boot Starter: Fixes the issue that OneOffJobBootstrap cannot be used under ElasticJob Spring Boot Starter - [#2014](https://github.com/apache/shardingsphere-elasticjob/issues/2014)
23+
24+
### Change Logs
25+
26+
1. [MILESTONE](https://github.com/apache/shardingsphere-elasticjob/milestone/7)
27+
128
## 3.0.4
229

3-
## Dependencies Upgrade
30+
### Dependencies Upgrade
431
1. Update dependencies to fix CVE
532

6-
## Enhancements
33+
### Enhancements
734
1. Support for building with OpenJDK 21
835
2. Accelerate the startup speed of ElasticJob
936
3. Migrate from Junit Vintage to Junit Jupiter

kernel/src/main/java/org/apache/shardingsphere/elasticjob/kernel/internal/setup/DefaultJobClassNameProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*/
2525
public final class DefaultJobClassNameProvider implements JobClassNameProvider {
2626

27-
private static final String LAMBDA_CHARACTERISTICS = "$$Lambda$";
27+
private static final String LAMBDA_CHARACTERISTICS = "$$Lambda";
2828

2929
@Override
3030
public String getJobClassName(final ElasticJob elasticJob) {

kernel/src/test/java/org/apache/shardingsphere/elasticjob/kernel/internal/setup/DefaultJobClassNameProviderTest.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import org.apache.shardingsphere.elasticjob.kernel.fixture.job.DetailedFooJob;
2121
import org.apache.shardingsphere.elasticjob.kernel.fixture.job.FooJob;
2222
import org.junit.jupiter.api.Test;
23-
import org.junit.jupiter.api.condition.DisabledForJreRange;
24-
import org.junit.jupiter.api.condition.JRE;
2523

2624
import static org.hamcrest.CoreMatchers.is;
2725
import static org.hamcrest.MatcherAssert.assertThat;
@@ -35,14 +33,12 @@ void assertGetOrdinaryClassJobName() {
3533
assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.fixture.job.DetailedFooJob"));
3634
}
3735

38-
// TODO OpenJDK 21 breaks this unit test.
3936
@Test
40-
@DisabledForJreRange(min = JRE.JAVA_21, max = JRE.OTHER)
4137
void assertGetLambdaJobName() {
4238
JobClassNameProvider jobClassNameProvider = new DefaultJobClassNameProvider();
4339
FooJob lambdaFooJob = shardingContext -> {
4440
};
4541
String result = jobClassNameProvider.getJobClassName(lambdaFooJob);
46-
assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.internal.setup.DefaultJobClassNameProviderTest$$Lambda$"));
42+
assertThat(result, is("org.apache.shardingsphere.elasticjob.kernel.internal.setup.DefaultJobClassNameProviderTest$$Lambda"));
4743
}
4844
}

test/native/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
<properties>
3030
<maven.deploy.skip>true</maven.deploy.skip>
3131
<!--TODO Blocked by https://github.com/apache/shardingsphere-elasticjob/issues/2425 -->
32-
<spring-boot-dependencies.version>3.3.4</spring-boot-dependencies.version>
32+
<spring-boot-dependencies.version>3.3.5</spring-boot-dependencies.version>
3333
<slf4j.version>2.0.16</slf4j.version>
34-
<logback.version>1.5.8</logback.version>
34+
<logback.version>1.5.11</logback.version>
3535
</properties>
3636

3737
<dependencies>

0 commit comments

Comments
 (0)