Re: [Actionframework-users] parameter passing bug
Status: Inactive
Brought to you by:
ptoman
From: Armando R. <ar...@ho...> - 2003-04-15 14:59:23
|
Dear all, Jakub Cerny wrote: > If I use Integer variables, everything is OK. Maybe related to this bug: Test.xml -------- <component name="Test" class="Test" persistence="application"> <action name="/action" method="method (int parameter)"> <input-variable name="parameter" value="-1" if="!$parameter"/> <on-return value="*" show-template="test.vm"> <output-variable name="parameter" value="$parameter"/> </on-return> </action> </component> Test.java --------- public class Test{ public int method(int parameter){ return parameter; } } This throws a NullPointerException when you send 'parameter' in the request, but it works fine if you don't (when <input-variable> is evaluated). Everything goes alright if you use 'Integer' instead of 'int'. If you leave out <input-variable>, result is as expected: MissingParameterException when 'parameter' is not present and OK otherwise. Best regards, Armando -- Armando Ramos http://www.hola.com |