Commit 2b29dcb
committed
Make JFR optional to support minimized JREs without jdk.jfr module
TaskExecutorJobOperator.start() creates a JobLaunchEvent which
extends jdk.jfr.Event. On minimized JREs without the jdk.jfr module,
this causes NoClassDefFoundError: jdk/jfr/Event.
This commit wraps the JFR event creation in a try-catch block to
handle the case when JFR is not available, allowing Spring Batch
to work on minimized JREs without JFR support.
Fixes #5326
Signed-off-by: Nikita Nagar <permanayan84@gmail.com>1 parent 258da33 commit 2b29dcb
File tree
1 file changed
+11
-1
lines changed- spring-batch-core/src/main/java/org/springframework/batch/core/launch/support
1 file changed
+11
-1
lines changedLines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
113 | 123 | | |
114 | 124 | | |
115 | 125 | | |
| |||
0 commit comments