@@ -1163,8 +1163,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
11631163 try {
11641164 // we have to call the method in the correct thread, so post a
11651165 // Callable to the controller and wait for the result to appear
1166- ThreadJob <Object > job = new ThreadJob <>(thread , () -> method .invokeMethodStatic (args ), suspensionStrategy );
1167- controller .postJobForThread (job );
1166+ InvokeJob <Object > job = new InvokeJob <>(thread , () -> method .invokeMethodStatic (args ), suspensionStrategy );
1167+ controller .postInvokeJobForThread (job );
11681168
11691169 // invocation of a method can cause events with possible thread suspension
11701170 // to happen, e.g. class prepare events for newly loaded classes
@@ -1175,8 +1175,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
11751175 public void run () {
11761176 CommandResult commandResult = new CommandResult (reply );
11771177 try {
1178- ThreadJob <?>.JobResult <?> result = job .getResult ();
1179- writeMethodResult (reply , context , result , thread , controller );
1178+ InvokeJob <?>.JobResult <?> result = job .getResult ();
1179+ writeMethodResult (reply , context , result );
11801180 } catch (Throwable t ) {
11811181 reply .errorCode (ErrorCodes .INTERNAL );
11821182 controller .severe (INVOKE_METHOD .class .getName () + ".createReply" , t );
@@ -1246,15 +1246,15 @@ static CommandResult createReply(Packet packet, DebuggerController controller) {
12461246 try {
12471247 // we have to call the constructor in the correct thread, so post a
12481248 // Callable to the controller and wait for the result to appear
1249- ThreadJob <?> job = new ThreadJob <>(thread , () -> {
1249+ InvokeJob <?> job = new InvokeJob <>(thread , () -> {
12501250 args [0 ] = context .allocateInstance (klass );
12511251 method .invokeMethodSpecial (args );
12521252 return args [0 ];
12531253 }, suspensionStrategy );
1254- controller .postJobForThread (job );
1255- ThreadJob <?>.JobResult <?> result = job .getResult ();
1254+ controller .postInvokeJobForThread (job );
1255+ InvokeJob <?>.JobResult <?> result = job .getResult ();
12561256
1257- writeMethodResult (reply , context , result , thread , controller );
1257+ writeMethodResult (reply , context , result );
12581258 } catch (Throwable t ) {
12591259 throw new RuntimeException ("not able to invoke static method through jdwp" , t );
12601260 }
@@ -1350,8 +1350,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
13501350 try {
13511351 // we have to call the method in the correct thread, so post a
13521352 // Callable to the controller and wait for the result to appear
1353- ThreadJob <Object > job = new ThreadJob <>(thread , () -> method .invokeMethodStatic (args ), suspensionStrategy );
1354- controller .postJobForThread (job );
1353+ InvokeJob <Object > job = new InvokeJob <>(thread , () -> method .invokeMethodStatic (args ), suspensionStrategy );
1354+ controller .postInvokeJobForThread (job );
13551355 // invocation of a method can cause events with possible thread suspension
13561356 // to happen, e.g. class prepare events for newly loaded classes
13571357 // to avoid blocking here, we fire up a new thread that will post
@@ -1361,8 +1361,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
13611361 public void run () {
13621362 CommandResult commandResult = new CommandResult (reply );
13631363 try {
1364- ThreadJob <?>.JobResult <?> result = job .getResult ();
1365- writeMethodResult (reply , context , result , thread , controller );
1364+ InvokeJob <?>.JobResult <?> result = job .getResult ();
1365+ writeMethodResult (reply , context , result );
13661366 } catch (Throwable t ) {
13671367 reply .errorCode (ErrorCodes .INTERNAL );
13681368 controller .severe (INVOKE_METHOD .class .getName () + "." + "createReply" , t );
@@ -1807,7 +1807,7 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
18071807 try {
18081808 // we have to call the method in the correct thread, so post a
18091809 // Callable to the controller and wait for the result to appear
1810- ThreadJob <Object > job = new ThreadJob <>(thread , () -> {
1810+ InvokeJob <Object > job = new InvokeJob <>(thread , () -> {
18111811 if (invokeNonvirtual ) {
18121812 return method .invokeMethodNonVirtual (args );
18131813 } else if (Modifier .isPrivate (method .getModifiers ())) {
@@ -1818,7 +1818,7 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
18181818 return method .invokeMethodVirtual (args );
18191819 }
18201820 }, suspensionStrategy );
1821- controller .postJobForThread (job );
1821+ controller .postInvokeJobForThread (job );
18221822 // invocation of a method can cause events with possible thread suspension
18231823 // to happen, e.g. class prepare events for newly loaded classes
18241824 // to avoid blocking here, we fire up a new thread that will post
@@ -1828,8 +1828,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
18281828 public void run () {
18291829 CommandResult commandResult = new CommandResult (reply );
18301830 try {
1831- ThreadJob <?>.JobResult <?> result = job .getResult ();
1832- writeMethodResult (reply , context , result , thread , controller );
1831+ InvokeJob <?>.JobResult <?> result = job .getResult ();
1832+ writeMethodResult (reply , context , result );
18331833 } catch (Throwable t ) {
18341834 reply .errorCode (ErrorCodes .INTERNAL );
18351835 controller .severe (INVOKE_METHOD .class .getName () + "." + "createReply" , t );
@@ -2393,11 +2393,11 @@ static CommandResult createReply(Packet packet, DebuggerController controller) {
23932393 }
23942394
23952395 // make sure owned monitors taken in frame are exited
2396- ThreadJob <Void > job = new ThreadJob <>(thread , () -> {
2396+ InvokeJob <Void > job = new InvokeJob <>(thread , () -> {
23972397 controller .getContext ().clearFrameMonitors (topFrame );
23982398 return null ;
23992399 });
2400- controller .postJobForThread (job );
2400+ controller .postInvokeJobForThread (job );
24012401 // don't return here before job completed
24022402 job .getResult ();
24032403
@@ -3042,7 +3042,7 @@ public static void writeValue(byte tag, Object value, PacketStream reply, boolea
30423042 }
30433043 }
30443044
3045- private static void writeMethodResult (PacketStream reply , JDWPContext context , ThreadJob <?>.JobResult <?> result , Object thread , DebuggerController controller ) {
3045+ private static void writeMethodResult (PacketStream reply , JDWPContext context , InvokeJob <?>.JobResult <?> result ) {
30463046 if (result .getException () != null ) {
30473047 reply .writeByte (TagConstants .OBJECT );
30483048 reply .writeLong (0 );
0 commit comments