summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Kast <julian@livio.com>2020-10-13 16:44:12 -0400
committerJulian Kast <julian@livio.com>2020-10-13 16:44:12 -0400
commit672b71b55a2aadda19c8deb8dc7b0fbb454646a0 (patch)
tree646998109fcb6a6f91e7c498931c77bcd7bee895
parentf23e35792b66f0db00788251a2af76f728f53724 (diff)
downloadsdl_android-RPC-Chainable-Generator.tar.gz
Added missing return statement to RPC settersRPC-Chainable-Generator
-rw-r--r--generator/templates/function_template.java1
-rw-r--r--generator/templates/struct_template.java1
2 files changed, 2 insertions, 0 deletions
diff --git a/generator/templates/function_template.java b/generator/templates/function_template.java
index 4372114d4..96ac7cf99 100644
--- a/generator/templates/function_template.java
+++ b/generator/templates/function_template.java
@@ -33,6 +33,7 @@
{%- endif %}
public {{class_name}} set{{p.title}}({% if p.mandatory %}@NonNull {% endif %}{{p.return_type}} {{p.last}}) {
setParameters({{p.key}}, {{p.last}});
+ return this;
}
/**
diff --git a/generator/templates/struct_template.java b/generator/templates/struct_template.java
index f8424934e..5fcca3ba9 100644
--- a/generator/templates/struct_template.java
+++ b/generator/templates/struct_template.java
@@ -29,6 +29,7 @@
{%- endif %}
public {{class_name}} set{{p.title}}({% if p.mandatory %}@NonNull {% endif %}{{p.return_type}} {{p.last}}) {
setValue({{p.key}}, {{p.last}});
+ return this;
}
/**