Skip to content

Commit 3f301df

Browse files
committed
Removed unnecessary DataDictionary.Exception class
1 parent 500c9e9 commit 3f301df

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

quickfixj-core/src/main/java/quickfix/DataDictionary.java

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ private static <K, V> void copyMap(Map<K, V> lhs, Map<K, V> rhs) {
550550
copy = (Collection<V>) value.getClass().newInstance();
551551
} catch (final RuntimeException e) {
552552
throw e;
553-
} catch (final java.lang.Exception e) {
553+
} catch (final Exception e) {
554554
throw new RuntimeException(e);
555555
}
556556
copyCollection(copy, (Collection<V>) value);
@@ -817,12 +817,12 @@ private void read(String location) throws ConfigError {
817817
final InputStream inputStream = FileUtil.open(getClass(), location, URL, FILESYSTEM,
818818
CONTEXT_RESOURCE, CLASSLOADER_RESOURCE);
819819
if (inputStream == null) {
820-
throw new DataDictionary.Exception("Could not find data dictionary: " + location);
820+
throw new ConfigError("Could not find data dictionary: " + location);
821821
}
822822

823823
try {
824824
load(inputStream);
825-
} catch (final java.lang.Exception e) {
825+
} catch (final Exception e) {
826826
throw new ConfigError(location + ": " + e.getMessage(), e);
827827
} finally {
828828
try {
@@ -1183,20 +1183,6 @@ private String getAttribute(Node node, String name, String defaultValue) {
11831183
return defaultValue;
11841184
}
11851185

1186-
/**
1187-
* Data dictionary-related exception.
1188-
*/
1189-
public static class Exception extends RuntimeException {
1190-
1191-
public Exception(Throwable cause) {
1192-
super(cause);
1193-
}
1194-
1195-
public Exception(String message) {
1196-
super(message);
1197-
}
1198-
}
1199-
12001186
private static final class IntStringPair {
12011187
private final int intValue;
12021188

quickfixj-core/src/test/java/quickfix/DefaultSessionFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private void createSessionAndAssertDictionaryNotFound() throws ConfigError {
134134
try {
135135
factory.create(sessionID, settings);
136136
fail("no data dictionary exception");
137-
} catch (DataDictionary.Exception e) {
137+
} catch (ConfigError e) {
138138
assertTrue("exception message not matched, expected: " + "... Could not find data ..."
139139
+ ", got: " + e.getMessage(),
140140
e.getMessage().contains("Could not find data"));

0 commit comments

Comments
 (0)