Commit bebcee53 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed java's listeners' stubs that return a value

parent 9be191f7
...@@ -310,6 +310,7 @@ class JavaTranslator(object): ...@@ -310,6 +310,7 @@ class JavaTranslator(object):
methodDict['return'] = self.translate_type(_method.returnType, isReturn=True) methodDict['return'] = self.translate_type(_method.returnType, isReturn=True)
methodDict['return_native'] = self.translate_type(_method.returnType, native=True, isReturn=True) methodDict['return_native'] = self.translate_type(_method.returnType, native=True, isReturn=True)
methodDict['return_keyword'] = '' if methodDict['return'] == 'void' else 'return ' methodDict['return_keyword'] = '' if methodDict['return'] == 'void' else 'return '
methodDict['hasReturn'] = not methodDict['return'] == 'void'
methodDict['convertInputClassArrayToLongArray'] = False methodDict['convertInputClassArrayToLongArray'] = False
......
...@@ -28,6 +28,9 @@ public class {{classNameStub}} implements {{className}} { ...@@ -28,6 +28,9 @@ public class {{classNameStub}} implements {{className}} {
@Override @Override
public {{return}} {{name}}({{params}}){{#exception}} throws CoreException{{/exception}} { public {{return}} {{name}}({{params}}){{#exception}} throws CoreException{{/exception}} {
// Auto-generated method stub // Auto-generated method stub
{{#hasReturn}}
{{#classCast}}return null;{{/classCast}}
{{/hasReturn}}
} }
{{/methods}} {{/methods}}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment