@@ -1163,8 +1163,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
1163
1163
try {
1164
1164
// we have to call the method in the correct thread, so post a
1165
1165
// 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 );
1168
1168
1169
1169
// invocation of a method can cause events with possible thread suspension
1170
1170
// to happen, e.g. class prepare events for newly loaded classes
@@ -1175,8 +1175,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
1175
1175
public void run () {
1176
1176
CommandResult commandResult = new CommandResult (reply );
1177
1177
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 );
1180
1180
} catch (Throwable t ) {
1181
1181
reply .errorCode (ErrorCodes .INTERNAL );
1182
1182
controller .severe (INVOKE_METHOD .class .getName () + ".createReply" , t );
@@ -1246,15 +1246,15 @@ static CommandResult createReply(Packet packet, DebuggerController controller) {
1246
1246
try {
1247
1247
// we have to call the constructor in the correct thread, so post a
1248
1248
// Callable to the controller and wait for the result to appear
1249
- ThreadJob <?> job = new ThreadJob <>(thread , () -> {
1249
+ InvokeJob <?> job = new InvokeJob <>(thread , () -> {
1250
1250
args [0 ] = context .allocateInstance (klass );
1251
1251
method .invokeMethodSpecial (args );
1252
1252
return args [0 ];
1253
1253
}, suspensionStrategy );
1254
- controller .postJobForThread (job );
1255
- ThreadJob <?>.JobResult <?> result = job .getResult ();
1254
+ controller .postInvokeJobForThread (job );
1255
+ InvokeJob <?>.JobResult <?> result = job .getResult ();
1256
1256
1257
- writeMethodResult (reply , context , result , thread , controller );
1257
+ writeMethodResult (reply , context , result );
1258
1258
} catch (Throwable t ) {
1259
1259
throw new RuntimeException ("not able to invoke static method through jdwp" , t );
1260
1260
}
@@ -1350,8 +1350,8 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
1350
1350
try {
1351
1351
// we have to call the method in the correct thread, so post a
1352
1352
// 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 );
1355
1355
// invocation of a method can cause events with possible thread suspension
1356
1356
// to happen, e.g. class prepare events for newly loaded classes
1357
1357
// 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
1361
1361
public void run () {
1362
1362
CommandResult commandResult = new CommandResult (reply );
1363
1363
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 );
1366
1366
} catch (Throwable t ) {
1367
1367
reply .errorCode (ErrorCodes .INTERNAL );
1368
1368
controller .severe (INVOKE_METHOD .class .getName () + "." + "createReply" , t );
@@ -1807,7 +1807,7 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
1807
1807
try {
1808
1808
// we have to call the method in the correct thread, so post a
1809
1809
// 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 , () -> {
1811
1811
if (invokeNonvirtual ) {
1812
1812
return method .invokeMethodNonVirtual (args );
1813
1813
} else if (Modifier .isPrivate (method .getModifiers ())) {
@@ -1818,7 +1818,7 @@ static CommandResult createReply(Packet packet, DebuggerController controller, D
1818
1818
return method .invokeMethodVirtual (args );
1819
1819
}
1820
1820
}, suspensionStrategy );
1821
- controller .postJobForThread (job );
1821
+ controller .postInvokeJobForThread (job );
1822
1822
// invocation of a method can cause events with possible thread suspension
1823
1823
// to happen, e.g. class prepare events for newly loaded classes
1824
1824
// 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
1828
1828
public void run () {
1829
1829
CommandResult commandResult = new CommandResult (reply );
1830
1830
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 );
1833
1833
} catch (Throwable t ) {
1834
1834
reply .errorCode (ErrorCodes .INTERNAL );
1835
1835
controller .severe (INVOKE_METHOD .class .getName () + "." + "createReply" , t );
@@ -2393,11 +2393,11 @@ static CommandResult createReply(Packet packet, DebuggerController controller) {
2393
2393
}
2394
2394
2395
2395
// make sure owned monitors taken in frame are exited
2396
- ThreadJob <Void > job = new ThreadJob <>(thread , () -> {
2396
+ InvokeJob <Void > job = new InvokeJob <>(thread , () -> {
2397
2397
controller .getContext ().clearFrameMonitors (topFrame );
2398
2398
return null ;
2399
2399
});
2400
- controller .postJobForThread (job );
2400
+ controller .postInvokeJobForThread (job );
2401
2401
// don't return here before job completed
2402
2402
job .getResult ();
2403
2403
@@ -3042,7 +3042,7 @@ public static void writeValue(byte tag, Object value, PacketStream reply, boolea
3042
3042
}
3043
3043
}
3044
3044
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 ) {
3046
3046
if (result .getException () != null ) {
3047
3047
reply .writeByte (TagConstants .OBJECT );
3048
3048
reply .writeLong (0 );
0 commit comments