Skip to content

Commit ce3d938

Browse files
authored
#142 Use UncheckedIOException rather than IllegalStateException (#145)
This improves consistency with other use of UncheckedIOException
1 parent 6e6a586 commit ce3d938

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

avaje-config/src/main/java/io/avaje/config/InitialLoadContext.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
import io.avaje.config.CoreEntry.CoreMap;
44

5-
import java.io.File;
6-
import java.io.FileInputStream;
7-
import java.io.FileNotFoundException;
8-
import java.io.InputStream;
5+
import java.io.*;
96
import java.lang.System.Logger.Level;
107
import java.util.ArrayList;
118
import java.util.LinkedHashSet;
@@ -99,7 +96,7 @@ InputStream resource(String resourcePath, InitialLoader.Source source) {
9996
loadedResources.add("file:" + resourcePath);
10097
loadedFiles.add(file);
10198
} catch (FileNotFoundException e) {
102-
throw new IllegalStateException(e);
99+
throw new UncheckedIOException(e);
103100
}
104101
}
105102
}

0 commit comments

Comments
 (0)