Skip to content

Commit 79d15ca

Browse files
nikitakovaliov92ars18wrw
authored andcommitted
Remove redundant throws statements
DEVSIX-3458
1 parent bf600ea commit 79d15ca

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

src/main/java/com/itextpdf/rups/io/TextAreaOutputStream.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ public class TextAreaOutputStream extends OutputStream {
6161
* Constructs a TextAreaOutputStream.
6262
*
6363
* @param text the text area to which we want to write.
64-
* @throws IOException an exception
6564
*/
66-
public TextAreaOutputStream(JTextArea text) throws IOException {
65+
public TextAreaOutputStream(JTextArea text) {
6766
this.text = text;
6867
clear();
6968
}
@@ -79,7 +78,7 @@ public void clear() {
7978
* @see java.io.OutputStream#write(int)
8079
*/
8180
@Override
82-
public void write(int i) throws IOException {
81+
public void write(int i) {
8382
byte[] b = {(byte) i};
8483
write(b, 0, 1);
8584
}
@@ -88,7 +87,7 @@ public void write(int i) throws IOException {
8887
* @see java.io.OutputStream#write(byte[], int, int)
8988
*/
9089
@Override
91-
public void write(byte[] b, int off, int len) throws IOException {
90+
public void write(byte[] b, int off, int len) {
9291
String snippet = new String(b, off, len, StandardCharsets.UTF_8);
9392
text.append(snippet);
9493
}

src/main/java/com/itextpdf/rups/model/XfaFile.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void writeTo(OutputStream os) throws IOException {
108108

109109
// Prevents XXE attacks
110110
private static class SafeEmptyEntityResolver implements EntityResolver {
111-
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
111+
public InputSource resolveEntity(String publicId, String systemId) {
112112
return new InputSource(new StringReader(""));
113113
}
114114
}

src/main/java/com/itextpdf/rups/view/Console.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,17 @@ static class ConsoleOutputStream extends OutputStream {
171171
}
172172

173173
@Override
174-
public void write(final int b) throws IOException {
174+
public void write(final int b) {
175175
Console.getInstance().updateTextPane(String.valueOf((char) b), type);
176176
}
177177

178178
@Override
179-
public void write(byte[] b, int off, int len) throws IOException {
179+
public void write(byte[] b, int off, int len) {
180180
Console.getInstance().updateTextPane(new String(b, off, len), type);
181181
}
182182

183183
@Override
184-
public void write(byte[] b) throws IOException {
184+
public void write(byte[] b) {
185185
write(b, 0, b.length);
186186
}
187187
}

src/main/java/com/itextpdf/rups/view/DebugView.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,17 @@ public void run() {
110110

111111
static class DebugOutputStream extends OutputStream {
112112
@Override
113-
public void write(final int b) throws IOException {
113+
public void write(final int b) {
114114
DebugView.getInstance().updateTextPane(String.valueOf((char) b));
115115
}
116116

117117
@Override
118-
public void write(byte[] b, int off, int len) throws IOException {
118+
public void write(byte[] b, int off, int len) {
119119
DebugView.getInstance().updateTextPane(new String(b, off, len));
120120
}
121121

122122
@Override
123-
public void write(byte[] b) throws IOException {
123+
public void write(byte[] b) {
124124
write(b, 0, b.length);
125125
}
126126
}

0 commit comments

Comments
 (0)