Skip to content

Commit 990e391

Browse files
committed
Remove redundant throws in declarations
1 parent da2179a commit 990e391

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

commonmark/src/test/java/org/commonmark/internal/util/LineReaderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ private SlowStringReader(String s) {
100100
}
101101

102102
@Override
103-
public int read(char[] cbuf, int off, int len) throws IOException {
103+
public int read(char[] cbuf, int off, int len) {
104104
Objects.checkFromIndexSize(off, len, cbuf.length);
105105
if (len == 0) {
106106
return 0;
@@ -118,7 +118,7 @@ public int read(char[] cbuf, int off, int len) throws IOException {
118118
}
119119

120120
@Override
121-
public void close() throws IOException {
121+
public void close() {
122122
}
123123
}
124124
}

commonmark/src/test/java/org/commonmark/test/TextContentWriterTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public class TextContentWriterTest {
99

1010
@Test
11-
public void whitespace() throws Exception {
11+
public void whitespace() {
1212
StringBuilder stringBuilder = new StringBuilder();
1313
TextContentWriter writer = new TextContentWriter(stringBuilder);
1414
writer.write("foo");
@@ -18,7 +18,7 @@ public void whitespace() throws Exception {
1818
}
1919

2020
@Test
21-
public void colon() throws Exception {
21+
public void colon() {
2222
StringBuilder stringBuilder = new StringBuilder();
2323
TextContentWriter writer = new TextContentWriter(stringBuilder);
2424
writer.write("foo");
@@ -28,7 +28,7 @@ public void colon() throws Exception {
2828
}
2929

3030
@Test
31-
public void line() throws Exception {
31+
public void line() {
3232
StringBuilder stringBuilder = new StringBuilder();
3333
TextContentWriter writer = new TextContentWriter(stringBuilder);
3434
writer.write("foo");
@@ -38,15 +38,15 @@ public void line() throws Exception {
3838
}
3939

4040
@Test
41-
public void writeStripped() throws Exception {
41+
public void writeStripped() {
4242
StringBuilder stringBuilder = new StringBuilder();
4343
TextContentWriter writer = new TextContentWriter(stringBuilder);
4444
writer.writeStripped("foo\n bar");
4545
assertThat(stringBuilder.toString()).isEqualTo("foo bar");
4646
}
4747

4848
@Test
49-
public void write() throws Exception {
49+
public void write() {
5050
StringBuilder stringBuilder = new StringBuilder();
5151
TextContentWriter writer = new TextContentWriter(stringBuilder);
5252
writer.writeStripped("foo bar");

0 commit comments

Comments
 (0)