summaryrefslogtreecommitdiffstats
path: root/vpp-api/java
diff options
context:
space:
mode:
Diffstat (limited to 'vpp-api/java')
-rw-r--r--vpp-api/java/jvpp/gen/jvpp_c_gen.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/vpp-api/java/jvpp/gen/jvpp_c_gen.py b/vpp-api/java/jvpp/gen/jvpp_c_gen.py
index 4d0ea0b51d1..1796ac1719b 100644
--- a/vpp-api/java/jvpp/gen/jvpp_c_gen.py
+++ b/vpp-api/java/jvpp/gen/jvpp_c_gen.py
@@ -412,6 +412,11 @@ def generate_msg_handlers(func_list, inputfile):
c_name = t[2]
field_length = t[3][0]
+ if jni_type.endswith('Array') and field_length == '0':
+ raise Exception('Variable array \'%s\' defined in message \'%s\' '
+ 'should have defined length (e.g. \'%s[%s_length]\''
+ % (c_name, handler_name, c_name, c_name))
+
# check if we are processing variable length array
if t[3][1]:
length_var_name = t[3][0]