Skip to content

Commit

Permalink
add a Mendel experiment to enable HttpConnector for Java. This experi…
Browse files Browse the repository at this point in the history
…ment will be used to gradually roll out the use of HttpConnector for Java.

PiperOrigin-RevId: 656036977
Change-Id: I9fb29e78ebab3a5dc350e9f5a72ef2221e8c66f1
  • Loading branch information
ludoch authored and gae-java-bot committed Jul 25, 2024
1 parent 909a585 commit c01caa7
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Objects;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down Expand Up @@ -66,6 +67,10 @@ public final class AppEngineWebXmlInitialParse {
}

public void handleRuntimeProperties() {
// See if the Mendel experiment to enable HttpConnector is set automatically via env var:
if (Objects.equals(System.getenv("EXPERIMENT_ENABLE_HTTP_CONNECTOR_FOR_JAVA"), "true")) {
System.setProperty("appengine.use.HttpConnector", "true");
}
try (final InputStream stream = new FileInputStream(file)) {
final XMLEventReader reader = XMLInputFactory.newInstance().createXMLEventReader(stream);
while (reader.hasNext()) {
Expand Down

0 comments on commit c01caa7

Please sign in to comment.