1
0
mirror of https://github.com/google/nomulus synced 2026-01-06 13:36:48 +00:00

Remove buildSrc (#2379)

We don't use the upload results feature (kokoro picks the results
artifacts directly and uploads them).

Keeping it around is a maintenance burden.

Also fixed a deprecation warning.
This commit is contained in:
Lai Jiang
2024-03-18 10:29:51 -04:00
committed by GitHub
parent 3a7c53d895
commit ff211fb4f9
22 changed files with 12 additions and 2068 deletions

View File

@@ -31,6 +31,8 @@ import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.http.HttpResponseStatus;
import java.net.MalformedURLException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import javax.inject.Inject;
import org.joda.time.Duration;
@@ -99,8 +101,8 @@ public class WebWhoisActionHandler extends ActionHandler {
// Obtain url to be redirected to
URL url;
try {
url = new URL(response.headers().get("Location"));
} catch (MalformedURLException e) {
url = new URI(response.headers().get("Location")).toURL();
} catch (MalformedURLException | URISyntaxException | IllegalArgumentException e) {
// in case of error, log it, and let ActionHandler's exceptionThrown method deal with it
throw new FailureException(
"Redirected Location was invalid. Given Location was: "

View File

@@ -172,7 +172,7 @@ class WebWhoisActionHandlerTest {
assertThat(future.isSuccess()).isFalse();
// Ensures that we fail as a result of a FailureException.
assertThat(future.cause() instanceof FailureException).isTrue();
assertThat(future.cause()).isInstanceOf(FailureException.class);
}
@Test