|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2024 the original author or authors. |
| 2 | + * Copyright 2012-2025 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
17 | 17 | package org.springframework.boot.system;
|
18 | 18 |
|
19 | 19 | import java.io.Console;
|
| 20 | +import java.io.Reader; |
20 | 21 | import java.text.NumberFormat;
|
21 | 22 | import java.time.Duration;
|
22 | 23 | import java.util.Arrays;
|
@@ -77,15 +78,21 @@ public enum JavaVersion {
|
77 | 78 | * Java 23.
|
78 | 79 | * @since 3.2.9
|
79 | 80 | */
|
80 |
| - TWENTY_THREE("23", NumberFormat.class, "isStrict"); |
| 81 | + TWENTY_THREE("23", NumberFormat.class, "isStrict"), |
| 82 | + |
| 83 | + /** |
| 84 | + * Java 24. |
| 85 | + * @since 3.4.3 |
| 86 | + */ |
| 87 | + TWENTY_FOUR("24", Reader.class, "of", CharSequence.class); |
81 | 88 |
|
82 | 89 | private final String name;
|
83 | 90 |
|
84 | 91 | private final boolean available;
|
85 | 92 |
|
86 |
| - JavaVersion(String name, Class<?> versionSpecificClass, String versionSpecificMethod) { |
| 93 | + JavaVersion(String name, Class<?> versionSpecificClass, String versionSpecificMethod, Class<?>... paramTypes) { |
87 | 94 | this.name = name;
|
88 |
| - this.available = ClassUtils.hasMethod(versionSpecificClass, versionSpecificMethod); |
| 95 | + this.available = ClassUtils.hasMethod(versionSpecificClass, versionSpecificMethod, paramTypes); |
89 | 96 | }
|
90 | 97 |
|
91 | 98 | @Override
|
|
0 commit comments