summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py10
-rw-r--r--src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py22
2 files changed, 17 insertions, 15 deletions
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py
index ac096a7163d..9aaa4c645f0 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_callback_facade_gen.py
@@ -222,11 +222,12 @@ public final class CallbackJVpp${plugin_name}FacadeCallback implements $plugin_p
@Override
@SuppressWarnings("unchecked")
- public void onControlPingReply($base_package.$dto_package.ControlPingReply reply) {
+ public void onControlPingReply(final $base_package.$dto_package.ControlPingReply reply) {
$base_package.$callback_package.ControlPingCallback callback;
+ final int replyId = reply.context;
synchronized(requests) {
- callback = ($base_package.$callback_package.ControlPingCallback) requests.remove(reply.context);
+ callback = ($base_package.$callback_package.ControlPingCallback) requests.remove(replyId);
}
if(callback != null) {
@@ -241,11 +242,12 @@ $methods
jvpp_facade_callback_method_template = Template("""
@Override
@SuppressWarnings("unchecked")
- public void on$callback_dto($plugin_package.$dto_package.$callback_dto reply) {
+ public void on$callback_dto(final $plugin_package.$dto_package.$callback_dto reply) {
$plugin_package.$callback_package.$callback callback;
+ final int replyId = reply.context;
synchronized(requests) {
- callback = ($plugin_package.$callback_package.$callback) requests.remove(reply.context);
+ callback = ($plugin_package.$callback_package.$callback) requests.remove(replyId);
}
if(callback != null) {
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py
index 26b31e226db..07947e30673 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_future_facade_gen.py
@@ -59,11 +59,12 @@ public final class FutureJVpp${plugin_name}FacadeCallback implements $plugin_pac
@Override
@SuppressWarnings("unchecked")
- public void onControlPingReply($base_package.$dto_package.ControlPingReply reply) {
+ public void onControlPingReply(final $base_package.$dto_package.ControlPingReply reply) {
final java.util.concurrent.CompletableFuture<$base_package.$dto_package.JVppReply<?>> completableFuture;
+ final int replyId = reply.context;
synchronized(requests) {
- completableFuture = (java.util.concurrent.CompletableFuture<$base_package.$dto_package.JVppReply<?>>) requests.get(reply.context);
+ completableFuture = (java.util.concurrent.CompletableFuture<$base_package.$dto_package.JVppReply<?>>) requests.get(replyId);
}
if(completableFuture != null) {
@@ -77,9 +78,8 @@ public final class FutureJVpp${plugin_name}FacadeCallback implements $plugin_pac
} else {
completableFuture.complete(reply);
}
-
synchronized(requests) {
- requests.remove(reply.context);
+ requests.remove(replyId);
}
}
}
@@ -91,18 +91,18 @@ $methods
jvpp_facade_callback_method_template = Template("""
@Override
@SuppressWarnings("unchecked")
- public void on$callback_dto($plugin_package.$dto_package.$callback_dto reply) {
+ public void on$callback_dto(final $plugin_package.$dto_package.$callback_dto reply) {
final java.util.concurrent.CompletableFuture<$base_package.$dto_package.JVppReply<?>> completableFuture;
-
+ final int replyId = reply.context;
synchronized(requests) {
- completableFuture = (java.util.concurrent.CompletableFuture<$base_package.$dto_package.JVppReply<?>>) requests.get(reply.context);
+ completableFuture = (java.util.concurrent.CompletableFuture<$base_package.$dto_package.JVppReply<?>>) requests.get(replyId);
}
if(completableFuture != null) {
completableFuture.complete(reply);
synchronized(requests) {
- requests.remove(reply.context);
+ requests.remove(replyId);
}
}
}
@@ -118,11 +118,11 @@ jvpp_facade_callback_notification_method_template = Template("""
jvpp_facade_details_callback_method_template = Template("""
@Override
@SuppressWarnings("unchecked")
- public void on$callback_dto($plugin_package.$dto_package.$callback_dto reply) {
+ public void on$callback_dto(final $plugin_package.$dto_package.$callback_dto reply) {
final $base_package.$future_package.AbstractFutureJVppInvoker.CompletableDumpFuture<$plugin_package.$dto_package.$callback_dto_reply_dump> completableFuture;
-
+ final int replyId = reply.context;
synchronized(requests) {
- completableFuture = ($base_package.$future_package.AbstractFutureJVppInvoker.CompletableDumpFuture<$plugin_package.$dto_package.$callback_dto_reply_dump>) requests.get(reply.context);
+ completableFuture = ($base_package.$future_package.AbstractFutureJVppInvoker.CompletableDumpFuture<$plugin_package.$dto_package.$callback_dto_reply_dump>) requests.get(replyId);
}
if(completableFuture != null) {