Skip to content

Commit e5f3799

Browse files
Cleanup tests
Co-authored-by: Moderne <team@moderne.io>
1 parent d4008b5 commit e5f3799

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed

src/test/java/org/apache/maven/shared/filtering/AbstractInterpolatorFilterReaderLineEndingTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package org.apache.maven.shared.filtering;
2020

21-
import java.io.IOException;
2221
import java.io.Reader;
2322
import java.io.StringReader;
2423

@@ -107,7 +106,7 @@ void customDelimiters() throws Exception {
107106

108107
// MSHARED-235: reader exceeds readAheadLimit
109108
@Test
110-
void markInvalid() throws IOException {
109+
void markInvalid() throws Exception {
111110
try (Reader reader = getAtReader(new StringReader("@\").replace(p,\"]\").replace(q,\""), interpolator, "\\")) {
112111
assertEquals("@\").replace(p,\"]\").replace(q,\"", IOUtils.toString(reader));
113112
}

src/test/java/org/apache/maven/shared/filtering/BoundedReaderTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
package org.apache.maven.shared.filtering;
2020

2121
import java.io.BufferedReader;
22-
import java.io.IOException;
2322
import java.io.Reader;
2423
import java.io.StringReader;
2524

@@ -32,7 +31,7 @@ class BoundedReaderTest {
3231
private final Reader sr = new BufferedReader(new StringReader("01234567890"));
3332

3433
@Test
35-
void readTillEnd() throws IOException {
34+
void readTillEnd() throws Exception {
3635
try (BoundedReader mr = new BoundedReader(sr, 3)) {
3736
mr.mark(3);
3837
mr.read();
@@ -43,7 +42,7 @@ void readTillEnd() throws IOException {
4342
}
4443

4544
@Test
46-
void readMulti() throws IOException {
45+
void readMulti() throws Exception {
4746
char[] cbuf = new char[4];
4847
for (int i = 0; i < cbuf.length; i++) {
4948
cbuf[i] = 'X';
@@ -61,7 +60,7 @@ void readMulti() throws IOException {
6160
}
6261

6362
@Test
64-
void readMultiWithOffset() throws IOException {
63+
void readMultiWithOffset() throws Exception {
6564

6665
char[] cbuf = new char[4];
6766
for (int i = 0; i < cbuf.length; i++) {
@@ -80,7 +79,7 @@ void readMultiWithOffset() throws IOException {
8079
}
8180

8281
@Test
83-
void resetWorks() throws IOException {
82+
void resetWorks() throws Exception {
8483
try (BoundedReader mr = new BoundedReader(sr, 3)) {
8584
mr.read();
8685
mr.read();
@@ -94,7 +93,7 @@ void resetWorks() throws IOException {
9493
}
9594

9695
@Test
97-
void skipTest() throws IOException {
96+
void skipTest() throws Exception {
9897
try (BoundedReader mr = new BoundedReader(sr, 3)) {
9998
mr.skip(2);
10099
mr.read();

src/test/java/org/apache/maven/shared/filtering/DefaultMavenFileFilterTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import javax.inject.Inject;
2222

2323
import java.io.File;
24-
import java.io.IOException;
2524
import java.io.Reader;
2625
import java.io.StringReader;
2726
import java.nio.file.Files;
@@ -158,7 +157,7 @@ void lineWithSingleAtAndExpression() throws Exception {
158157
}
159158

160159
@Test
161-
void testInterpolatorCustomizer() throws MavenFilteringException, IOException {
160+
void interpolatorCustomizer() throws Exception {
162161
AbstractMavenFilteringRequest req = new AbstractMavenFilteringRequest();
163162
req.setInterpolatorCustomizer(i -> {
164163
i.addValueSource(new AbstractValueSource(false) {

src/test/java/org/apache/maven/shared/filtering/InvalidMarkTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.apache.commons.io.FileUtils;
2727
import org.apache.maven.model.Resource;
2828
import org.codehaus.plexus.testing.PlexusTest;
29+
import org.junit.jupiter.api.Assertions;
2930
import org.junit.jupiter.api.BeforeEach;
3031
import org.junit.jupiter.api.Test;
3132

src/test/java/org/apache/maven/shared/filtering/PropertyUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ void loadPropertiesFile() throws Exception {
104104
* @throws IOException if problem writing file
105105
*/
106106
@Test
107-
void circularReferences() throws IOException {
107+
void circularReferences() throws Exception {
108108
File circularProperties = File.createTempFile("circular", ".properties");
109109
circularProperties.deleteOnExit();
110110

@@ -125,7 +125,7 @@ void circularReferences() throws IOException {
125125
* @throws IOException if problem writing file
126126
*/
127127
@Test
128-
void circularReferences3Vars() throws IOException {
128+
void circularReferences3Vars() throws Exception {
129129
File circularProperties = File.createTempFile("circular", ".properties");
130130
circularProperties.deleteOnExit();
131131

0 commit comments

Comments
 (0)