Skip to content

Commit e45fed5

Browse files
committed
Dropping unnecessary exceptions
1 parent a750a1c commit e45fed5

File tree

8 files changed

+34
-34
lines changed

8 files changed

+34
-34
lines changed

test/org/beanio/parser/bean/BeanParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public void testFixedLengthCollection() {
286286

287287
@Test
288288
@SuppressWarnings("rawtypes")
289-
public void testNestedBeans() throws IOException {
289+
public void testNestedBeans() {
290290
BeanReader in = factory.createReader("w10", new InputStreamReader(
291291
getClass().getResourceAsStream("w10_nestedBeans.txt")));
292292

test/org/beanio/parser/multiline/MultilineRecordTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void testRecordGroup() throws ParseException {
124124
}
125125

126126
@Test
127-
public void testNestedRecorGroup() throws ParseException {
127+
public void testNestedRecorGroup() {
128128
BeanReader in = factory.createReader("ml2", new InputStreamReader(
129129
getClass().getResourceAsStream("ml2.txt")));
130130

@@ -165,7 +165,7 @@ public void testNestedRecorGroup() throws ParseException {
165165

166166
@Test
167167
@SuppressWarnings("rawtypes")
168-
public void testNestedRecorGroupCollections() throws ParseException {
168+
public void testNestedRecorGroupCollections() {
169169
BeanReader in = factory.createReader("ml3", new InputStreamReader(
170170
getClass().getResourceAsStream("ml3.txt")));
171171

@@ -206,7 +206,7 @@ public void testNestedRecorGroupCollections() throws ParseException {
206206
}
207207

208208
@Test
209-
public void testRecordMap() throws ParseException {
209+
public void testRecordMap() {
210210
BeanReader in = factory.createReader("ml4", new InputStreamReader(
211211
getClass().getResourceAsStream("ml4.txt")));
212212

@@ -257,7 +257,7 @@ public void testRecordMap() throws ParseException {
257257
}
258258

259259
@Test
260-
public void testNestedRecorGroupNonCollection() throws ParseException {
260+
public void testNestedRecorGroupNonCollection() {
261261
BeanReader in = factory.createReader("ml5", new InputStreamReader(
262262
getClass().getResourceAsStream("ml5.txt")));
263263

@@ -286,7 +286,7 @@ public void testNestedRecorGroupNonCollection() throws ParseException {
286286
}
287287

288288
@Test
289-
public void testEmptyRecordList() throws ParseException {
289+
public void testEmptyRecordList() {
290290
BeanReader in = factory.createReader("ml6", new InputStreamReader(
291291
getClass().getResourceAsStream("ml6.txt")));
292292

@@ -306,7 +306,7 @@ public void testEmptyRecordList() throws ParseException {
306306
}
307307

308308
@Test
309-
public void testInlineRecordMap() throws ParseException {
309+
public void testInlineRecordMap() {
310310
BeanReader in = factory.createReader("ml7", new InputStreamReader(
311311
getClass().getResourceAsStream("ml7.txt")));
312312

test/org/beanio/parser/substitution/PropertySubstitutionParserTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void testRuntimeSubstitution() throws ParseException {
6060

6161
@Test
6262
@SuppressWarnings("rawtypes")
63-
public void testDefaultSubstitution() throws ParseException {
63+
public void testDefaultSubstitution() {
6464
Properties properties = new Properties();
6565
properties.setProperty("dateFormat", "yyyy-MM-dd");
6666

@@ -73,7 +73,7 @@ public void testDefaultSubstitution() throws ParseException {
7373
}
7474

7575
@Test(expected=BeanIOConfigurationException.class)
76-
public void testMissingProperty() throws ParseException {
76+
public void testMissingProperty() {
7777
factory.loadResource("org/beanio/parser/substitution/substitution_mapping.xml");
7878
}
7979
}

test/org/beanio/stream/CsvRecordParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public void testMarshal_CustomConfiguration() {
227227
}
228228

229229
@Test
230-
public void testMarshal_AlwaysQuote() throws IOException {
230+
public void testMarshal_AlwaysQuote() {
231231
CsvRecordParserFactory factory = new CsvRecordParserFactory();
232232
factory.setQuote('\'');
233233
factory.setEscape('\\');

test/org/beanio/stream/DelimitedRecordParserTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public void setUp() throws Exception {
3838
}
3939

4040
@Test
41-
public void testUnmarshal_Basic() throws IOException {
41+
public void testUnmarshal_Basic() {
4242
RecordUnmarshaller unmarshaller = factory.createUnmarshaller();
4343
String[] actual = (String[]) unmarshaller.unmarshal("1\t2\t33\t444\t");
4444

@@ -47,7 +47,7 @@ public void testUnmarshal_Basic() throws IOException {
4747
}
4848

4949
@Test
50-
public void testUnmarshal_EscapeDisabled() throws IOException {
50+
public void testUnmarshal_EscapeDisabled() {
5151
factory.setEscape(null);
5252

5353
RecordUnmarshaller unmarshaller = factory.createUnmarshaller();
@@ -57,7 +57,7 @@ public void testUnmarshal_EscapeDisabled() throws IOException {
5757
}
5858

5959
@Test
60-
public void testUnmarshal_EscapeEscape() throws IOException {
60+
public void testUnmarshal_EscapeEscape() {
6161
factory.setEscape('\\');
6262

6363
RecordUnmarshaller unmarshaller = factory.createUnmarshaller();
@@ -67,7 +67,7 @@ public void testUnmarshal_EscapeEscape() throws IOException {
6767
}
6868

6969
@Test
70-
public void testUnmarshal_EscapeDelimiter() throws IOException {
70+
public void testUnmarshal_EscapeDelimiter() {
7171
factory.setEscape('\\');
7272

7373
RecordUnmarshaller unmarshaller = factory.createUnmarshaller();
@@ -77,7 +77,7 @@ public void testUnmarshal_EscapeDelimiter() throws IOException {
7777
}
7878

7979
@Test
80-
public void testUnmarshal_EscapeOther() throws IOException {
80+
public void testUnmarshal_EscapeOther() {
8181
factory.setEscape('\\');
8282

8383
RecordUnmarshaller unmarshaller = factory.createUnmarshaller();
@@ -87,7 +87,7 @@ public void testUnmarshal_EscapeOther() throws IOException {
8787
}
8888

8989
@Test
90-
public void testUnmarshal_CustomDelimiter() throws IOException {
90+
public void testUnmarshal_CustomDelimiter() {
9191
factory.setDelimiter(',');
9292

9393
RecordUnmarshaller unmarshaller = factory.createUnmarshaller();
@@ -111,14 +111,14 @@ public void testMarshal_DelimiterIsEscape() {
111111
}
112112

113113
@Test
114-
public void testMarshal_DefaultConfiguration() throws IOException {
114+
public void testMarshal_DefaultConfiguration() {
115115
RecordMarshaller marshaller = factory.createMarshaller();
116116
String record = marshaller.marshal(new String[] { "value1", "value\t2" });
117117
assertEquals("value1\tvalue\t2", record);
118118
}
119119

120120
@Test
121-
public void testMarshal_CustomDelimiter() throws IOException {
121+
public void testMarshal_CustomDelimiter() {
122122
factory.setDelimiter(',');
123123

124124
RecordMarshaller marshaller = factory.createMarshaller();
@@ -127,7 +127,7 @@ public void testMarshal_CustomDelimiter() throws IOException {
127127
}
128128

129129
@Test
130-
public void testMarshal_CustomDelimiterAndEscape() throws IOException {
130+
public void testMarshal_CustomDelimiterAndEscape() {
131131
factory.setDelimiter(',');
132132
factory.setEscape('\\');
133133

@@ -137,14 +137,14 @@ public void testMarshal_CustomDelimiterAndEscape() throws IOException {
137137
}
138138

139139
@Test
140-
public void testMarshal_DefaultFactoryConfiguration() throws IOException {
140+
public void testMarshal_DefaultFactoryConfiguration() {
141141
RecordMarshaller marshaller = factory.createMarshaller();
142142
String record = marshaller.marshal(new String[] { "value1", "value\t2" });
143143
assertEquals("value1\tvalue\t2", record);
144144
}
145145

146146
@Test
147-
public void testMarshal_CustomFactoryConfiguration() throws IOException {
147+
public void testMarshal_CustomFactoryConfiguration() {
148148
factory.setDelimiter(',');
149149
factory.setEscape('\\');
150150
factory.setRecordTerminator("");

test/org/beanio/stream/JsonReaderTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public void test_escapedString() throws IOException {
183183

184184
@Test
185185
@SuppressWarnings("rawtypes")
186-
public void test_mixedArray() throws IOException {
186+
public void test_mixedArray() {
187187
JsonRecordUnmarshaller u = new JsonRecordUnmarshaller();
188188

189189
Map map = u.unmarshal(
@@ -197,49 +197,49 @@ public void test_mixedArray() throws IOException {
197197
}
198198

199199
@Test
200-
public void test_missingObject() throws IOException {
200+
public void test_missingObject() {
201201
assertError(null, "Expected '{' near position 1");
202202
assertError("", "Expected '{' near position 1");
203203
assertError(" ", "Expected '{' near position 1");
204204
}
205205

206206
@Test
207-
public void test_missingQuotes() throws IOException {
207+
public void test_missingQuotes() {
208208
assertError("{ field : \"value\" }", "Expected string or '}' near position 3");
209209
}
210210

211211
@Test
212-
public void test_missingCommaInObject() throws IOException {
212+
public void test_missingCommaInObject() {
213213
assertError("{ \"f1\" : \"value\" \"f2\" : \"value2\" }", "Expected ',' or '}' near position 18");
214214
}
215215

216216
@Test
217-
public void test_missingCommaInArray() throws IOException {
217+
public void test_missingCommaInArray() {
218218
assertError("{ \"array\" : [ 10 20 ] }", "Expected ',' near position 18");
219219
}
220220

221221
@Test
222-
public void test_invalidValue() throws IOException {
222+
public void test_invalidValue() {
223223
assertError("{ \"number\" : a }", "Cannot parse 'a' into a JSON string, number or boolean near position 15");
224224
}
225225

226226
@Test
227-
public void test_missingCloseObject() throws IOException {
227+
public void test_missingCloseObject() {
228228
assertError("{ \"number\" : 10", "Expected ',' or '}' near position 15");
229229
}
230230

231231
@Test
232-
public void test_missingCloseArray() throws IOException {
232+
public void test_missingCloseArray() {
233233
assertError("{ \"number\" : [ 10", "Expected ',' or ']' near position 17");
234234
}
235235

236236
@Test
237-
public void test_missingCloseString() throws IOException {
237+
public void test_missingCloseString() {
238238
assertError("{ \"number", "Expected '\"' near position 9");
239239
}
240240

241241
@Test
242-
public void test_missingColon() throws IOException {
242+
public void test_missingColon() {
243243
assertError("{ \"number\" 10 }", "Expected ':' near position 12");
244244
}
245245

test/org/beanio/types/CharacterTypeHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void testParseInvalid() throws TypeConversionException {
4242
}
4343

4444
@Test
45-
public void testFormat() throws TypeConversionException {
45+
public void testFormat() {
4646
CharacterTypeHandler handler = new CharacterTypeHandler();
4747
assertEquals("V", handler.format(Character.valueOf('V')));
4848
assertEquals("", handler.format(""));

test/org/beanio/types/XmlBooleanTypeHandlerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public void testParse() throws TypeConversionException {
4141
}
4242

4343
@Test
44-
public void testTextualFormat() throws TypeConversionException {
44+
public void testTextualFormat() {
4545
XmlBooleanTypeHandler handler = new XmlBooleanTypeHandler();
4646
assertFalse(handler.isNumericFormatEnabled());
4747
assertNull(handler.format(null));
@@ -50,7 +50,7 @@ public void testTextualFormat() throws TypeConversionException {
5050
}
5151

5252
@Test
53-
public void testNumericFormat() throws TypeConversionException {
53+
public void testNumericFormat() {
5454
XmlBooleanTypeHandler handler = new XmlBooleanTypeHandler();
5555
handler.setNumericFormatEnabled(true);
5656
assertTrue(handler.isNumericFormatEnabled());

0 commit comments

Comments
 (0)