diff --git a/core/src/test/java/hudson/FilePathTest.java b/core/src/test/java/hudson/FilePathTest.java
index 99e0dda844..09cf44312e 100644
--- a/core/src/test/java/hudson/FilePathTest.java
+++ b/core/src/test/java/hudson/FilePathTest.java
@@ -269,7 +269,7 @@ public class FilePathTest {
d.zip(NullOutputStream.NULL_OUTPUT_STREAM,"**/*");
}
- @Test public void normalization() throws Exception {
+ @Test public void normalization() {
compare("abc/def\\ghi","abc/def\\ghi"); // allow mixed separators
{// basic '.' trimming
diff --git a/core/src/test/java/hudson/FunctionsTest.java b/core/src/test/java/hudson/FunctionsTest.java
index 9b4efeaadb..9447d01a49 100644
--- a/core/src/test/java/hudson/FunctionsTest.java
+++ b/core/src/test/java/hudson/FunctionsTest.java
@@ -98,7 +98,7 @@ public class FunctionsTest {
@Test
@PrepareForTest(Stapler.class)
- public void testGetActionUrl_absolutePath() throws Exception{
+ public void testGetActionUrl_absolutePath() {
String contextPath = "/jenkins";
StaplerRequest req = createMockRequest(contextPath);
String[] paths = {
@@ -115,7 +115,7 @@ public class FunctionsTest {
@Test
@PrepareForTest(Stapler.class)
- public void testGetActionUrl_relativePath() throws Exception{
+ public void testGetActionUrl_relativePath() {
String contextPath = "/jenkins";
String itUrl = "iturl/";
StaplerRequest req = createMockRequest(contextPath);
@@ -134,7 +134,7 @@ public class FunctionsTest {
@Test
@PrepareForTest({Stapler.class, Jenkins.class})
- public void testGetRelativeLinkTo_JobContainedInView() throws Exception{
+ public void testGetRelativeLinkTo_JobContainedInView() {
Jenkins j = createMockJenkins();
ItemGroup parent = j;
String contextPath = "/jenkins";
@@ -153,7 +153,7 @@ public class FunctionsTest {
@Test
@PrepareForTest({Stapler.class, Jenkins.class})
- public void testGetRelativeLinkTo_JobFromComputer() throws Exception{
+ public void testGetRelativeLinkTo_JobFromComputer() {
Jenkins j = createMockJenkins();
ItemGroup parent = j;
String contextPath = "/jenkins";
@@ -170,7 +170,7 @@ public class FunctionsTest {
@Ignore("too expensive to make it correct")
@Test
@PrepareForTest({Stapler.class, Jenkins.class})
- public void testGetRelativeLinkTo_JobNotContainedInView() throws Exception{
+ public void testGetRelativeLinkTo_JobNotContainedInView() {
Jenkins j = createMockJenkins();
ItemGroup parent = j;
String contextPath = "/jenkins";
@@ -190,7 +190,7 @@ public class FunctionsTest {
@Test
@PrepareForTest({Stapler.class,Jenkins.class})
- public void testGetRelativeLinkTo_JobContainedInViewWithinItemGroup() throws Exception{
+ public void testGetRelativeLinkTo_JobContainedInViewWithinItemGroup() {
Jenkins j = createMockJenkins();
TopLevelItemAndItemGroup parent = mock(TopLevelItemAndItemGroup.class);
when(parent.getShortUrl()).thenReturn("parent/");
@@ -210,7 +210,7 @@ public class FunctionsTest {
@Issue("JENKINS-17713")
@PrepareForTest({Stapler.class, Jenkins.class})
- @Test public void getRelativeLinkTo_MavenModules() throws Exception {
+ @Test public void getRelativeLinkTo_MavenModules() {
Jenkins j = createMockJenkins();
StaplerRequest req = createMockRequest("/jenkins");
mockStatic(Stapler.class);
@@ -286,7 +286,7 @@ public class FunctionsTest {
@Test
@PrepareForTest(Stapler.class)
- public void testGetActionUrl_unparseable() throws Exception{
+ public void testGetActionUrl_unparseable() {
assertNull(Functions.getActionUrl(null, createMockAction("http://example.net/stuff?something=^woohoo")));
}
@@ -351,7 +351,7 @@ public class FunctionsTest {
}
@Issue("JENKINS-20800")
- @Test public void printLogRecordHtml() throws Exception {
+ @Test public void printLogRecordHtml() {
LogRecord lr = new LogRecord(Level.INFO, "Bad input ");
lr.setLoggerName("test");
assertEquals("Bad input <xml/>\n", Functions.printLogRecordHtml(lr, null)[3]);
diff --git a/core/src/test/java/hudson/LauncherTest.java b/core/src/test/java/hudson/LauncherTest.java
index 4cae16e04e..79c2f6e9e0 100644
--- a/core/src/test/java/hudson/LauncherTest.java
+++ b/core/src/test/java/hudson/LauncherTest.java
@@ -102,7 +102,7 @@ public class LauncherTest {
}
@Issue("JENKINS-18368")
- @Test public void decoratedByEnvMaintainsIsUnix() throws Exception {
+ @Test public void decoratedByEnvMaintainsIsUnix() {
ByteArrayOutputStream output = new ByteArrayOutputStream();
TaskListener listener = new StreamBuildListener(output);
Launcher remoteLauncher = new Launcher.RemoteLauncher(listener, FilePath.localChannel, false);
@@ -114,7 +114,7 @@ public class LauncherTest {
}
@Issue("JENKINS-18368")
- @Test public void decoratedByPrefixMaintainsIsUnix() throws Exception {
+ @Test public void decoratedByPrefixMaintainsIsUnix() {
ByteArrayOutputStream output = new ByteArrayOutputStream();
TaskListener listener = new StreamBuildListener(output);
Launcher remoteLauncher = new Launcher.RemoteLauncher(listener, FilePath.localChannel, false);
diff --git a/core/src/test/java/hudson/model/AbstractItemTest.java b/core/src/test/java/hudson/model/AbstractItemTest.java
index 7ecfd0b0f7..09894a1732 100644
--- a/core/src/test/java/hudson/model/AbstractItemTest.java
+++ b/core/src/test/java/hudson/model/AbstractItemTest.java
@@ -56,7 +56,7 @@ public class AbstractItemTest {
}
@Test
- public void testSearchNameIsName() throws Exception {
+ public void testSearchNameIsName() {
final String name = "the item name jlrtlekjtekrjkjr";
StubAbstractItem i = new StubAbstractItem();
i.doSetName(name);
diff --git a/core/src/test/java/hudson/model/FingerprintTest.java b/core/src/test/java/hudson/model/FingerprintTest.java
index 47a553acea..bc96838e2a 100644
--- a/core/src/test/java/hudson/model/FingerprintTest.java
+++ b/core/src/test/java/hudson/model/FingerprintTest.java
@@ -496,7 +496,7 @@ public class FingerprintTest {
return msg.isEmpty();
}
else {
- return msg.isEmpty() ? false : e.getMessage().contains(msg);
+ return !msg.isEmpty() && e.getMessage().contains(msg);
}
}
}
diff --git a/core/src/test/java/hudson/model/TestUserIdMapper.java b/core/src/test/java/hudson/model/TestUserIdMapper.java
index 52a845c1cf..37ba45f1ef 100644
--- a/core/src/test/java/hudson/model/TestUserIdMapper.java
+++ b/core/src/test/java/hudson/model/TestUserIdMapper.java
@@ -10,7 +10,7 @@ class TestUserIdMapper extends UserIdMapper {
private File usersDirectory;
private IdStrategy idStrategy;
- TestUserIdMapper(File usersDirectory, IdStrategy idStrategy) throws IOException {
+ TestUserIdMapper(File usersDirectory, IdStrategy idStrategy) {
this.usersDirectory = usersDirectory;
this.idStrategy = idStrategy;
}
diff --git a/core/src/test/java/hudson/model/UserIdMapperTest.java b/core/src/test/java/hudson/model/UserIdMapperTest.java
index e705279496..94e1844be3 100644
--- a/core/src/test/java/hudson/model/UserIdMapperTest.java
+++ b/core/src/test/java/hudson/model/UserIdMapperTest.java
@@ -295,7 +295,7 @@ public class UserIdMapperTest {
}
@Test
- public void testXmlFileCorrupted() throws IOException {
+ public void testXmlFileCorrupted() {
assertThrows(IOException.class, () -> createUserIdMapper(IdStrategy.CASE_INSENSITIVE));
}
diff --git a/core/src/test/java/hudson/model/ViewTest.java b/core/src/test/java/hudson/model/ViewTest.java
index 21e2fdc635..37cced163f 100644
--- a/core/src/test/java/hudson/model/ViewTest.java
+++ b/core/src/test/java/hudson/model/ViewTest.java
@@ -83,7 +83,7 @@ public class ViewTest {
* Get all items recursively when View implements ViewGroup at the same time
*/
@Test
- public void getAllItems() throws Exception {
+ public void getAllItems() {
final View leftView = Mockito.mock(View.class);
final View rightView = Mockito.mock(View.class);
@@ -254,7 +254,7 @@ public class ViewTest {
}
@Override
- public Item doCreateItem(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
+ public Item doCreateItem(StaplerRequest req, StaplerResponse rsp) {
return null;
}
}
diff --git a/core/src/test/java/hudson/model/listeners/SCMListenerTest.java b/core/src/test/java/hudson/model/listeners/SCMListenerTest.java
index 3b7142b314..59e95d3ca3 100644
--- a/core/src/test/java/hudson/model/listeners/SCMListenerTest.java
+++ b/core/src/test/java/hudson/model/listeners/SCMListenerTest.java
@@ -74,13 +74,13 @@ public class SCMListenerTest {
}
private static class L1 extends L {
- @Override public void onChangeLogParsed(AbstractBuild,?> build, BuildListener listener, ChangeLogSet> changelog) throws Exception {
+ @Override public void onChangeLogParsed(AbstractBuild,?> build, BuildListener listener, ChangeLogSet> changelog) {
cnt++;
}
}
private static class L2 extends L {
- @Override public void onChangeLogParsed(Run,?> build, SCM scm, TaskListener listener, ChangeLogSet> changelog) throws Exception {
+ @Override public void onChangeLogParsed(Run,?> build, SCM scm, TaskListener listener, ChangeLogSet> changelog) {
cnt++;
}
}
@@ -92,4 +92,4 @@ public class SCMListenerTest {
}
}
-}
\ No newline at end of file
+}
diff --git a/core/src/test/java/hudson/scheduler/CronTabTest.java b/core/src/test/java/hudson/scheduler/CronTabTest.java
index 6406a6a040..c812b4c651 100644
--- a/core/src/test/java/hudson/scheduler/CronTabTest.java
+++ b/core/src/test/java/hudson/scheduler/CronTabTest.java
@@ -288,7 +288,7 @@ public class CronTabTest {
new CronTab("H(0-59) H(0-23) H(1-31) H(1-12) H(0-7)");
}
- @Test public void rangeBoundsCheckFailHour() throws Exception {
+ @Test public void rangeBoundsCheckFailHour() {
try {
new CronTab("H H(12-24) * * *");
fail();
@@ -297,7 +297,7 @@ public class CronTabTest {
}
}
- @Test public void rangeBoundsCheckFailMinute() throws Exception {
+ @Test public void rangeBoundsCheckFailMinute() {
try {
new CronTab("H(33-66) * * * *");
fail();
diff --git a/core/src/test/java/hudson/util/DescribableListTest.java b/core/src/test/java/hudson/util/DescribableListTest.java
index 021a88935c..c6a67b99e6 100644
--- a/core/src/test/java/hudson/util/DescribableListTest.java
+++ b/core/src/test/java/hudson/util/DescribableListTest.java
@@ -35,7 +35,7 @@ public class DescribableListTest {
@Issue("JENKINS-49054")
@Test
- public void exceptionDuringUnmarshalling() throws Exception {
+ public void exceptionDuringUnmarshalling() {
Data data = new Data();
data.list.add(new Datum(1));
data.list.add(new Datum(2));
diff --git a/core/src/test/java/hudson/util/GraphTest.java b/core/src/test/java/hudson/util/GraphTest.java
index 4f2df6c942..76c78d578e 100644
--- a/core/src/test/java/hudson/util/GraphTest.java
+++ b/core/src/test/java/hudson/util/GraphTest.java
@@ -34,7 +34,7 @@ public class GraphTest {
public static final int DEFAULT_H = 300;
@Test
- public void testDimensions() throws Exception {
+ public void testDimensions() {
final Dimension keep = Graph.safeDimension(Graph.MAX_AREA/1_000, 1000, DEFAULT_W, DEFAULT_H);
Assert.assertEquals(Graph.MAX_AREA/1_000, keep.width);
Assert.assertEquals(1_000, keep.height);
diff --git a/core/src/test/java/hudson/util/MultipartFormDataParserTest.java b/core/src/test/java/hudson/util/MultipartFormDataParserTest.java
index 3cf0de27f9..92e8b226d8 100644
--- a/core/src/test/java/hudson/util/MultipartFormDataParserTest.java
+++ b/core/src/test/java/hudson/util/MultipartFormDataParserTest.java
@@ -32,7 +32,7 @@ import org.junit.Test;
public class MultipartFormDataParserTest {
@Test
- public void testIsMultipart() throws Exception {
+ public void testIsMultipart() {
Assert.assertFalse("Wrongly identified \"multipart/form-data\"", MultipartFormDataParser.isMultiPartForm(null));
Assert.assertFalse("Wrongly identified \"multipart/form-data\"", MultipartFormDataParser.isMultiPartForm("blah"));
diff --git a/core/src/test/java/hudson/util/RetrierTest.java b/core/src/test/java/hudson/util/RetrierTest.java
index 4110994369..a13519e1e7 100644
--- a/core/src/test/java/hudson/util/RetrierTest.java
+++ b/core/src/test/java/hudson/util/RetrierTest.java
@@ -47,7 +47,7 @@ public class RetrierTest {
// Begin the process
Boolean finalResult = r.start();
- Assert.assertTrue(finalResult == null ? false : finalResult);
+ Assert.assertTrue(finalResult != null && finalResult);
String text = Messages.Retrier_Success(ACTION, SUCCESSFUL_ATTEMPT);
assertTrue(String.format("The log should contain '%s'", text), handler.getView().stream().anyMatch(m -> m.getMessage().contains(text)));
@@ -100,7 +100,7 @@ public class RetrierTest {
Assert.assertTrue(timeElapsed >= SLEEP);
// Check result is true
- Assert.assertTrue(finalResult == null ? false : finalResult);
+ Assert.assertTrue(finalResult != null && finalResult);
// Check the log tell us the sleep time
String text = Messages.Retrier_Sleeping(SLEEP, ACTION);
@@ -142,7 +142,7 @@ public class RetrierTest {
// Begin the process
Boolean finalResult = r.start();
- Assert.assertFalse(finalResult == null ? false : finalResult);
+ Assert.assertFalse(finalResult != null && finalResult);
String text = Messages.Retrier_NoSuccess(ACTION, ATTEMPTS);
assertTrue(String.format("The log should contain '%s'", text), handler.getView().stream().anyMatch(m -> m.getMessage().contains(text)));
@@ -221,7 +221,7 @@ public class RetrierTest {
// Begin the process catching the allowed exception
Boolean finalResult = r.start();
- Assert.assertTrue(finalResult == null ? false : finalResult);
+ Assert.assertTrue(finalResult != null && finalResult);
// The action was a success
String textSuccess = Messages.Retrier_Success(ACTION, ATTEMPTS);
@@ -265,7 +265,7 @@ public class RetrierTest {
// Begin the process catching the allowed exception
Boolean finalResult = r.start();
- Assert.assertTrue(finalResult == null ? false : finalResult);
+ Assert.assertTrue(finalResult != null && finalResult);
// The action was a success
String textSuccess = Messages.Retrier_Success(ACTION, ATTEMPTS);
diff --git a/core/src/test/java/hudson/util/RobustReflectionConverterTest.java b/core/src/test/java/hudson/util/RobustReflectionConverterTest.java
index 531f8a2005..022eb820f2 100644
--- a/core/src/test/java/hudson/util/RobustReflectionConverterTest.java
+++ b/core/src/test/java/hudson/util/RobustReflectionConverterTest.java
@@ -70,7 +70,7 @@ public class RobustReflectionConverterTest {
}
@Test
- public void classOwnership() throws Exception {
+ public void classOwnership() {
XStream xs = new XStream2(new XStream2.ClassOwnership() {
@Override public String ownerOf(Class> clazz) {
Owner o = clazz.getAnnotation(Owner.class);
diff --git a/core/src/test/java/hudson/util/SecretUtilTest.java b/core/src/test/java/hudson/util/SecretUtilTest.java
index 9dcf90d5ce..6d076c36fb 100644
--- a/core/src/test/java/hudson/util/SecretUtilTest.java
+++ b/core/src/test/java/hudson/util/SecretUtilTest.java
@@ -8,7 +8,7 @@ public class SecretUtilTest {
@Issue("JENKINS-47500")
@Test
- public void decrypt() throws Exception {
+ public void decrypt() {
String data = "{}";
try {
@@ -23,7 +23,7 @@ public class SecretUtilTest {
@Issue("JENKINS-47500")
@Test
- public void decryptJustSpace() throws Exception {
+ public void decryptJustSpace() {
String data = " ";
try {
@@ -37,7 +37,7 @@ public class SecretUtilTest {
@Issue("JENKINS-47500")
@Test
- public void decryptWithSpace() throws Exception {
+ public void decryptWithSpace() {
String data = "{ }";
try {
@@ -51,7 +51,7 @@ public class SecretUtilTest {
@Issue("JENKINS-47500")
@Test
- public void decryptWithSpaces() throws Exception {
+ public void decryptWithSpaces() {
String data = "{ }";
try {
diff --git a/core/src/test/java/jenkins/model/JenkinsLocationConfigurationTest.java b/core/src/test/java/jenkins/model/JenkinsLocationConfigurationTest.java
index e736c11274..37644a1a03 100644
--- a/core/src/test/java/jenkins/model/JenkinsLocationConfigurationTest.java
+++ b/core/src/test/java/jenkins/model/JenkinsLocationConfigurationTest.java
@@ -45,7 +45,7 @@ public class JenkinsLocationConfigurationTest {
config = mock(JenkinsLocationConfiguration.class, Mockito.CALLS_REAL_METHODS);
Answer mockVoid = new Answer() {
@Override
- public String answer(InvocationOnMock invocation) throws Throwable {
+ public String answer(InvocationOnMock invocation) {
return "stub";
}
};
diff --git a/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java b/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java
index bc07b308be..3bab317834 100644
--- a/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java
+++ b/core/src/test/java/jenkins/model/lazy/AbstractLazyLoadRunMapTest.java
@@ -244,7 +244,7 @@ public class AbstractLazyLoadRunMapTest {
}
@Test
- public void eagerLoading() throws IOException {
+ public void eagerLoading() {
Map.Entry[] b = a.entrySet().toArray(new Map.Entry[3]);
((Build)b[0].getValue()).asserts(5);
((Build)b[1].getValue()).asserts(3);
diff --git a/core/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerTest.java b/core/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerTest.java
index 9a975481c2..f55d459602 100644
--- a/core/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerTest.java
+++ b/core/src/test/java/jenkins/security/RedactSecretJsonInErrorMessageSanitizerTest.java
@@ -41,7 +41,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void simpleWithSecret() throws Exception {
+ public void simpleWithSecret() {
assertRedaction(
"{'a': 'secret', 'b': 'other', '$redact': 'a'}",
"{'a': '[value redacted]', 'b': 'other', '$redact': 'a'}"
@@ -49,7 +49,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void singleWithRedactedInArray() throws Exception {
+ public void singleWithRedactedInArray() {
assertRedaction(
"{'a': 'secret', 'b': 'other', '$redact': ['a']}",
"{'a': '[value redacted]', 'b': 'other', '$redact': ['a']}"
@@ -57,7 +57,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void objectRedactedAcceptedButNotProcessed() throws Exception {
+ public void objectRedactedAcceptedButNotProcessed() {
assertRedaction(
"{'a': 'secret', 'b': 'other', '$redact': {'a': 'a'}}",
"{'a': 'secret', 'b': 'other', '$redact': {'a': 'a'}}"
@@ -65,7 +65,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void weirdValuesInRedactedAcceptedButNotProcessed() throws Exception {
+ public void weirdValuesInRedactedAcceptedButNotProcessed() {
assertRedaction(
"{'a': 'secret', 'b': 'other', '$redact': [null, true, false, 1, 2, 'a']}",
"{'a': '[value redacted]', 'b': 'other', '$redact': [null, true, false, 1, 2, 'a']}"
@@ -73,7 +73,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void ensureTrueAndOneAsStringAreSupportedAsRedactedKey() throws Exception {
+ public void ensureTrueAndOneAsStringAreSupportedAsRedactedKey() {
//only null is not supported, as passing 'null' is considered as null
assertRedaction(
"{'true': 'secret1', '1': 'secret3', 'b': 'other', '$redact': ['true', '1']}",
@@ -82,7 +82,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void redactFullBranch() throws Exception {
+ public void redactFullBranch() {
assertRedaction(
"{'a': {'s1': 'secret1', 's2': 'secret2', 's3': [1,2,3]}, 'b': [4,5,6], 'c': 'other', '$redact': ['a', 'b']}",
"{'a': '[value redacted]', 'b': '[value redacted]', 'c': 'other', '$redact': ['a', 'b']}"
@@ -98,7 +98,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void redactedKeyWithoutCorrespondences() throws Exception {
+ public void redactedKeyWithoutCorrespondences() {
assertRedaction(
"{'a1': 'secret1', 'a2': 'secret2', 'b': 'other', '$redact': ['a0', 'a1', 'a2', 'a3']}",
"{'a1': '[value redacted]', 'a2': '[value redacted]', 'b': 'other', '$redact': ['a0', 'a1', 'a2', 'a3']}"
@@ -114,7 +114,7 @@ public class RedactSecretJsonInErrorMessageSanitizerTest {
}
@Test
- public void noInteractionBetweenLevels() throws Exception {
+ public void noInteractionBetweenLevels() {
assertRedaction(
"{'a': 'secret', 'b': 'other', 'c': 'other', '$redact': 'a', 'sub': {'a': 'other', 'b': 'secret', 'c': 'other', '$redact': 'b'}}",
"{'a': '[value redacted]', 'b': 'other', 'c': 'other', '$redact': 'a', 'sub': {'a': 'other', 'b': '[value redacted]', 'c': 'other', '$redact': 'b'}}"
diff --git a/core/src/test/java/jenkins/util/VirtualFileTest.java b/core/src/test/java/jenkins/util/VirtualFileTest.java
index f27aba212b..ebaa58d099 100644
--- a/core/src/test/java/jenkins/util/VirtualFileTest.java
+++ b/core/src/test/java/jenkins/util/VirtualFileTest.java
@@ -1617,7 +1617,7 @@ public class VirtualFileTest {
}
@Override
- public boolean isDescendant(String childRelativePath) throws IOException {
+ public boolean isDescendant(String childRelativePath) {
return true;
}
diff --git a/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java b/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java
index 5fd6e93984..977de95412 100644
--- a/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java
+++ b/core/src/test/java/jenkins/widgets/HistoryPageFilterTest.java
@@ -340,7 +340,7 @@ public class HistoryPageFilterTest {
@Test
@Issue("JENKINS-40718")
- public void should_search_builds_by_build_variables() throws IOException {
+ public void should_search_builds_by_build_variables() {
Iterable runs = Arrays.asList(
new MockBuild(2).withBuildVariables(Collections.singletonMap("env", "dummyEnv")),
new MockBuild(1).withBuildVariables(Collections.singletonMap("env", "otherEnv")));
@@ -507,7 +507,7 @@ public class HistoryPageFilterTest {
return parameterValues;
}
- MockBuild withSensitiveBuildParameters(String paramName, String paramValue) throws IOException {
+ MockBuild withSensitiveBuildParameters(String paramName, String paramValue) {
addAction(new ParametersAction(Collections.singletonList(createSensitiveStringParameterValue(paramName, paramValue)),
Collections.singletonList(paramName)));
return this;
diff --git a/core/src/test/java/jenkins/xml/XMLUtilsTest.java b/core/src/test/java/jenkins/xml/XMLUtilsTest.java
index a9ed1b892b..661a17e75e 100644
--- a/core/src/test/java/jenkins/xml/XMLUtilsTest.java
+++ b/core/src/test/java/jenkins/xml/XMLUtilsTest.java
@@ -117,7 +117,7 @@ public class XMLUtilsTest {
}
@Test
- public void testParse_with_XXE() throws IOException, XPathExpressionException {
+ public void testParse_with_XXE() throws IOException {
try {
final String xml = "\n" +
" FieldUtils.setProtectedFieldValue("bogus", sut, "whatever"));
}