Skip to content

Commit

Permalink
fix httpclient
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed Jul 31, 2024
1 parent 909a2ee commit 6f64332
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 18 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package xyz.wagyourtail.jvmdg.j21.stub.java_net_http;

import xyz.wagyourtail.jvmdg.version.Stub;

import java.net.http.HttpClient;

public class J_N_H_HttpClient {

@Stub
public static void close(HttpClient client) {
// no-op
// TODO: figure out if we should do something
}

@Stub
public static boolean isTerminated(HttpClient client) {
return false;
}

@Stub
public static void shutdown(HttpClient client) {
// no-op
}

@Stub
public static void shutdownNow(HttpClient client) {
// no-op
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import org.objectweb.asm.Opcodes;
import xyz.wagyourtail.jvmdg.j20.stub.java_base.*;
import xyz.wagyourtail.jvmdg.j20.stub.java_net_http.J_N_H_HttpClient;
import xyz.wagyourtail.jvmdg.version.VersionProvider;

public class Java20Downgrader extends VersionProvider {
Expand Down Expand Up @@ -31,9 +30,6 @@ public void init() {
stub(J_U_R_Matcher.class);
// SSLParameters

// -- java.net.http --
stub(J_N_H_HttpClient.class);

// -- java.compiler --
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.objectweb.asm.Opcodes;
import xyz.wagyourtail.jvmdg.j21.stub.java_base.*;
import xyz.wagyourtail.jvmdg.j21.stub.java_net_http.J_N_H_HttpClient;
import xyz.wagyourtail.jvmdg.version.VersionProvider;

public class Java21Downgrader extends VersionProvider {
Expand Down Expand Up @@ -54,5 +55,8 @@ public void init() {
// SwingUtilities3
// AccessibleHTML$HTMLAccessibleContext

// -- java.net.http --
stub(J_N_H_HttpClient.class);

}
}

0 comments on commit 6f64332

Please sign in to comment.