Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dummy value for Jetty 9 logging system property when using Jetty 12. #100

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package com.google.apphosting.runtime.jetty;

import static java.nio.charset.StandardCharsets.UTF_8;

import com.google.apphosting.base.AppVersionKey;
import com.google.apphosting.base.protos.AppinfoPb;
import com.google.apphosting.base.protos.RuntimePb.UPRequest;
Expand All @@ -32,19 +30,22 @@
import com.google.apphosting.utils.config.AppEngineConfigException;
import com.google.apphosting.utils.config.AppYaml;
import com.google.common.flogger.GoogleLogger;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.concurrent.ExecutionException;
import org.eclipse.jetty.http.CookieCompliance;
import org.eclipse.jetty.http.UriCompliance;
import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.VirtualThreads;
import org.eclipse.jetty.util.thread.QueuedThreadPool;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.concurrent.ExecutionException;

import static java.nio.charset.StandardCharsets.UTF_8;

/**
* This is an implementation of ServletEngineAdapter that uses the third-party Jetty servlet engine.
*
Expand All @@ -66,6 +67,10 @@ public class JettyServletEngineAdapter implements ServletEngineAdapter {
private AppVersionKey lastAppVersionKey;

static {
// Set legacy system property to dummy value because external libraries (google-auth-library-java)
// test if this value is null to decide whether it is Java 7 runtime.
System.setProperty("org.eclipse.jetty.util.log.class", "DEPRECATED");

// Remove internal URLs.
System.setProperty("java.vendor.url", "");
System.setProperty("java.vendor.url.bug", "");
Expand Down