Skip to content

Commit 2a66d97

Browse files
committed
fix: throw exception + refactor
1 parent 9afad6d commit 2a66d97

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

dao-factory/src/main/java/com/iluwatar/daofactory/DAOFactoryProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public static DAOFactory getDataSource(DataSourceType dataSourceType) {
5656
case H2 -> new H2DataSourceFactory();
5757
case MONGO -> new MongoDataSourceFactory();
5858
case FLAT_FILE -> new FlatFileDataSourceFactory();
59+
default -> throw new IllegalArgumentException("Unsupported data source type");
5960
};
6061
}
6162
}

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
<module>converter</module>
108108
<module>curiously-recurring-template-pattern</module>
109109
<module>currying</module>
110+
<module>dao-factory</module>
110111
<module>data-access-object</module>
111112
<module>data-bus</module>
112113
<module>data-locality</module>
@@ -246,7 +247,7 @@
246247
<module>visitor</module>
247248
<module>backpressure</module>
248249
<module>actor-model</module>
249-
<module>dao-factory</module>
250+
250251
</modules>
251252
<repositories>
252253
<repository>

0 commit comments

Comments
 (0)