Remove redundant throws declarations from internal APIs
Closes gh-31176
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -407,8 +407,7 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests {
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void whenJarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild)
|
||||
throws InterruptedException {
|
||||
void whenJarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild) {
|
||||
mavenBuild.project("jar-output-timestamp").execute((project) -> {
|
||||
File repackaged = new File(project, "target/jar-output-timestamp-0.0.1.BUILD-SNAPSHOT.jar");
|
||||
List<String> sortedLibs = Arrays.asList("BOOT-INF/lib/jakarta.servlet-api", "BOOT-INF/lib/spring-aop",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -113,8 +113,7 @@ class WarIntegrationTests extends AbstractArchiveIntegrationTests {
|
||||
}
|
||||
|
||||
@TestTemplate
|
||||
void whenWarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild)
|
||||
throws InterruptedException {
|
||||
void whenWarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild) {
|
||||
mavenBuild.project("war-output-timestamp").execute((project) -> {
|
||||
File repackaged = new File(project, "target/war-output-timestamp-0.0.1.BUILD-SNAPSHOT.war");
|
||||
List<String> sortedLibs = Arrays.asList(
|
||||
|
||||
@@ -188,7 +188,7 @@ public class StartMojo extends AbstractRunMojo {
|
||||
}
|
||||
}
|
||||
|
||||
private void waitForForkedSpringApplication() throws IOException, MojoFailureException, MojoExecutionException {
|
||||
private void waitForForkedSpringApplication() throws IOException, MojoExecutionException {
|
||||
try {
|
||||
getLog().debug("Connecting to local MBeanServer at port " + this.jmxPort);
|
||||
try (JMXConnector connector = execute(this.wait, this.maxAttempts, new CreateJmxConnector(this.jmxPort))) {
|
||||
@@ -210,7 +210,7 @@ public class StartMojo extends AbstractRunMojo {
|
||||
}
|
||||
|
||||
private void doWaitForSpringApplication(MBeanServerConnection connection)
|
||||
throws IOException, MojoExecutionException, MojoFailureException {
|
||||
throws MojoExecutionException, MojoFailureException {
|
||||
final SpringApplicationAdminClient client = new SpringApplicationAdminClient(connection, this.jmxName);
|
||||
try {
|
||||
execute(this.wait, this.maxAttempts, () -> (client.isReady() ? true : null));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
* Copyright 2012-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -111,14 +111,14 @@ public class StopMojo extends AbstractMojo {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void stopForkedProcess() throws IOException, MojoFailureException, MojoExecutionException {
|
||||
private void stopForkedProcess() throws IOException, MojoExecutionException {
|
||||
try (JMXConnector connector = SpringApplicationAdminClient.connect(this.jmxPort)) {
|
||||
MBeanServerConnection connection = connector.getMBeanServerConnection();
|
||||
doStop(connection);
|
||||
}
|
||||
}
|
||||
|
||||
private void stop() throws IOException, MojoFailureException, MojoExecutionException {
|
||||
private void stop() throws IOException, MojoExecutionException {
|
||||
doStop(ManagementFactory.getPlatformMBeanServer());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user