v1.0.15.2 — fix launcher 'no packs available' (NPE uri is null in sendBounded)

This commit is contained in:
SashegDev
2026-08-13 14:09:22 +00:00
parent 421fb04ab5
commit 26e0280d84
3 changed files with 10 additions and 4 deletions
@@ -309,7 +309,7 @@ public class ZHttpClient {
* The request-level .timeout(Duration) bounds the actual network I/O. * The request-level .timeout(Duration) bounds the actual network I/O.
*/ */
private static <T> HttpResponse<T> sendBounded(HttpRequest request, HttpResponse.BodyHandler<T> handler, long timeoutSeconds) throws IOException, InterruptedException { private static <T> HttpResponse<T> sendBounded(HttpRequest request, HttpResponse.BodyHandler<T> handler, long timeoutSeconds) throws IOException, InterruptedException {
HttpRequest timed = request.newBuilder() HttpRequest timed = HttpRequest.newBuilder(request, (name, value) -> true)
.timeout(Duration.ofSeconds(timeoutSeconds)) .timeout(Duration.ofSeconds(timeoutSeconds))
.build(); .build();
return client.send(timed, handler); return client.send(timed, handler);
@@ -119,8 +119,14 @@ class ForgeInstallIntegrationTest {
List<String> command = builder.build(options); List<String> command = builder.build(options);
// === JVM args checks === // === JVM args checks ===
assertFalse(command.contains("-cp"), // Real Forge version.json (1.20.1-47.x) has no -cp, so the launcher adds it
"Forge must NOT have -cp (causes split-package)"); assertTrue(command.contains("-cp"),
"Launcher must add -cp for Forge (version.json has none)");
int cpIdx = command.indexOf("-cp");
assertTrue(cpIdx + 1 < command.size(), "-cp must have a value");
String classpath = command.get(cpIdx + 1);
assertNotNull(classpath, "-cp value must not be null");
assertFalse(classpath.contains("${classpath}"), "-cp must not contain unresolved ${classpath} placeholder");
// Find -Djava.library.path (added manually, not from forge child) // Find -Djava.library.path (added manually, not from forge child)
String libPath = null; String libPath = null;
+1 -1
View File
@@ -19,7 +19,7 @@
<properties> <properties>
<revision>1.0.15</revision> <revision>1.0.15</revision>
<hotfix>1</hotfix> <hotfix>2</hotfix>
<maven.compiler.source>21</maven.compiler.source> <maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target> <maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>