Skip to content

Commit e7ad290

Browse files
committed
fix: code can now actually be run with JDK 8
1 parent 1584256 commit e7ad290

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/org/codejive/jpm/json/AppInfo.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.io.Writer;
88
import java.nio.file.Files;
99
import java.nio.file.Path;
10+
import java.nio.file.Paths;
1011
import java.util.Map;
1112
import java.util.TreeMap;
1213

@@ -40,7 +41,7 @@ public String[] getDependencyGAVs() {
4041
* @throws IOException if an error occurred while reading or parsing the file
4142
*/
4243
public static AppInfo read() throws IOException {
43-
Path prjJson = Path.of(APP_INFO_FILE);
44+
Path prjJson = Paths.get(APP_INFO_FILE);
4445
AppInfo appInfo = new AppInfo();
4546
if (Files.isRegularFile(prjJson)) {
4647
try (Reader in = Files.newBufferedReader(prjJson)) {
@@ -65,7 +66,7 @@ public static AppInfo read() throws IOException {
6566
* @throws IOException if an error occurred while writing the file
6667
*/
6768
public static void write(AppInfo appInfo) throws IOException {
68-
Path prjJson = Path.of(APP_INFO_FILE);
69+
Path prjJson = Paths.get(APP_INFO_FILE);
6970
try (Writer out = Files.newBufferedWriter(prjJson)) {
7071
Gson parser = new GsonBuilder().setPrettyPrinting().create();
7172
// WARNING awful code ahead

0 commit comments

Comments
 (0)