Skip to content

Commit 305e5ee

Browse files
ludochgae-java-bot
authored andcommitted
Reenable the experiment EXPERIMENT_ENABLE_JETTY12_FOR_JAVA.
PiperOrigin-RevId: 858640689 Change-Id: I48db2564cd9e6d1cdea77e6c459442dffe9ca2a1
1 parent 763138f commit 305e5ee

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

appengine_init/src/main/java/com/google/appengine/init/AppEngineWebXmlInitialParse.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ public final class AppEngineWebXmlInitialParse {
9494
* <ul>
9595
* <li>{@code <runtime>java17</runtime>}:
9696
* <ul>
97-
* <li>No flags set: Jetty 9.4 (EE6)
97+
* <li>No flags set: Jetty 9.4 (EE6) unless env variable
98+
* EXPERIMENT_ENABLE_JETTY12_FOR_JAVA is set to true, in which case Jetty 12.0 (EE8)
99+
* is used.
98100
* <li>{@code appengine.use.EE8=true}: Jetty 12.0 (EE8)
99101
* <li>{@code appengine.use.EE10=true}: Jetty 12.0 (EE10)
100102
* <li>{@code appengine.use.EE10=true} and {@code appengine.use.jetty121=true}: Jetty 12.1
@@ -120,8 +122,8 @@ public final class AppEngineWebXmlInitialParse {
120122
* </ul>
121123
* </ul>
122124
*
123-
* @throws IllegalArgumentException if more than one EE version flag is set to true, or if
124-
* {@code appengine.use.EE10=true} with {@code runtime="java25"}.
125+
* @throws IllegalArgumentException if more than one EE version flag is set to true, or if {@code
126+
* appengine.use.EE10=true} with {@code runtime="java25"}.
125127
*/
126128
public void handleRuntimeProperties() {
127129

@@ -203,7 +205,10 @@ public void handleRuntimeProperties() {
203205
if (trueCount == 0) {
204206
// Apply defaults based on javaVersion
205207
if (Objects.equals(runtimeId, "java17")) {
206-
System.setProperty("appengine.use.EE8", "false");
208+
System.setProperty(
209+
"appengine.use.EE8",
210+
String.valueOf(
211+
Objects.equals(System.getenv("EXPERIMENT_ENABLE_JETTY12_FOR_JAVA"), "true")));
207212
} else if (Objects.equals(runtimeId, "java21")) {
208213
if (Boolean.parseBoolean(System.getProperty("appengine.use.jetty121", "false"))) {
209214
System.setProperty("appengine.use.EE11", "true");

0 commit comments

Comments
 (0)