Skip to content

Commit 44cdc05

Browse files
committed
fix java version
1 parent 1d2f52f commit 44cdc05

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

common/src/main/java/dev/felnull/fnjl/util/FNURLUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.net.HttpURLConnection;
1313
import java.net.MalformedURLException;
1414
import java.net.URL;
15+
import java.util.HashMap;
1516
import java.util.Map;
1617
import java.util.Objects;
1718
import java.util.concurrent.CompletableFuture;
@@ -77,7 +78,7 @@ public static HttpURLConnection getConnection(@NotNull URL url, @NotNull Map<Str
7778
*/
7879
@NotNull
7980
public static HttpURLConnection getConnection(@NotNull URL url) throws IOException {
80-
return getConnection(url, Map.of());
81+
return getConnection(url, new HashMap<>());
8182
}
8283

8384
/**

settings.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ rootProject.name = 'FelNullJavaLibrary'
33
include("common")
44
include("natives")
55

6+
if (JavaVersion.current().ordinal() + 1 != 8)
7+
throw new IllegalStateException("Java8使ってくれよな~頼むよ~")
8+

0 commit comments

Comments
 (0)