Skip to content

Commit c6f8977

Browse files
author
Stephen Colebourne
committed
IO-95 - Remove throws IOException from methods
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/io/trunk@462832 13f79535-47bb-0310-9956-ffa450edef68
1 parent 15cdfdb commit c6f8977

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

src/java/org/apache/commons/io/output/NullWriter.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
*/
1717
package org.apache.commons.io.output;
1818

19-
import java.io.IOException;
2019
import java.io.Writer;
2120

2221
/**
2322
* This {@link Writer} writes all data to the famous <b>/dev/null</b>.
2423
* <p>
25-
* This {@link Writer} has no destination (file/socket etc.) and all
24+
* This <code>Writer</code> has no destination (file/socket etc.) and all
2625
* characters written to it are ignored and lost.
2726
*
2827
* @version $Id$
@@ -36,37 +35,37 @@ public NullWriter() {
3635
}
3736

3837
/** @see java.io.Writer#write(int) */
39-
public void write(int idx) throws IOException {
38+
public void write(int idx) {
4039
//to /dev/null
4140
}
4241

4342
/** @see java.io.Writer#write(char[]) */
44-
public void write(char[] chr) throws IOException {
43+
public void write(char[] chr) {
4544
//to /dev/null
4645
}
4746

4847
/** @see java.io.Writer#write(char[], int, int) */
49-
public void write(char[] chr, int st, int end) throws IOException {
48+
public void write(char[] chr, int st, int end) {
5049
//to /dev/null
5150
}
5251

5352
/** @see java.io.Writer#write(String) */
54-
public void write(String str) throws IOException {
53+
public void write(String str) {
5554
//to /dev/null
5655
}
5756

5857
/** @see java.io.Writer#write(String, int, int) */
59-
public void write(String str, int st, int end) throws IOException {
58+
public void write(String str, int st, int end) {
6059
//to /dev/null
6160
}
6261

6362
/** @see java.io.Writer#flush() */
64-
public void flush() throws IOException {
63+
public void flush() {
6564
//to /dev/null
6665
}
6766

6867
/** @see java.io.Writer#close() */
69-
public void close() throws IOException {
68+
public void close() {
7069
//to /dev/null
7170
}
7271

src/test/org/apache/commons/io/output/NullWriterTest.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,21 @@
1616
*/
1717
package org.apache.commons.io.output;
1818

19-
20-
import java.io.IOException;
21-
2219
import junit.framework.TestCase;
2320

24-
2521
/**
2622
* Really not a lot to do here, but checking that no
2723
* Exceptions are thrown.
2824
*
2925
* @version $Revision$
3026
*/
31-
3227
public class NullWriterTest extends TestCase {
3328

3429
public NullWriterTest(String name) {
3530
super(name);
3631
}
3732

38-
public void testNull() throws IOException {
33+
public void testNull() {
3934
char[] chars = new char[] {'A', 'B', 'C'};
4035
NullWriter writer = new NullWriter();
4136
writer.write(1);

0 commit comments

Comments
 (0)