Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arguments are changed to null when passed to a parameter type other than Integer, String, Double or Long #5

Closed
ombre42 opened this issue Sep 19, 2012 · 4 comments

Comments

@ombre42
Copy link

ombre42 commented Sep 19, 2012

If you have a keyword declared
@RobotKeyword
public void foo(Object bar) ...
bar will be null no matter what is passed in. This is because ArgumentConverter.convertToType returns null if the parameter type is not Integer, String, Double or Long.
Note also that Boolean, Byte, Short, and Float are not handled either. These are all mentioned in the Robot Framework guide, but there is no mention in the wiki for argument types.
Upgrading from 0.9.1 to 1.0.1 caused 60 acceptance tests to fail for jrobotremoteserver :(

@jussimalinen
Copy link
Member

Hum, but on old 0.9.1 those types worked? How odd. I have reproduced the behavior and I also have a fix, but I think I should try to understand how has this worked earlier.

@jussimalinen
Copy link
Member

This fixes the issue for now 281639b

When I have some more time I should check if we could rely on Robot doing the conversions for us...

@pekkaklarck
Copy link
Member

Letting Robot to handle this would require adding getArgumentType method to
dynamic API. That's definitely doable.

Sent from my mobile.
3.12.2012 16.00 "Jussi Malinen" notifications@github.com kirjoitti:

This fixes the issue for now 281639bhttps://github.com/robotframework/JavalibCore/commit/281639b2b2d02d178f6a6a74f6d69e5b74108e8d

When I have some more time I should check if we could rely on Robot doing
the conversions for us...


Reply to this email directly or view it on GitHubhttps://github.com//issues/5#issuecomment-10953557.

@ombre42
Copy link
Author

ombre42 commented Dec 3, 2012

Thanks Jussi. I rebuilt using 1.0.3 and the tests that failed using 1.0.1 are passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants