Hi Xpert.ivy hackers :-)

Found some fun behavior: In a Java-Step I read a parameter (in.senderId) from the editor.

class extends AbstractPiStepParameterSupport

long senderId= extractPropertyValueFromIvyScriptContext(SENDER_ID_PROPERTY, context);

This code throws an Exception:

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long

Now the fun part: senderId is loaded from a ivy dataclass. Where the field is defined as long.

When I use the following lines:

String senderId= extractPropertyValueFromIvyScriptContext(SENDER_ID_PROPERTY, context);

long senderId= Long.parseLong(senderIdAsString);

It works. But in both way's Java doesnt request any casting. Even when using the type long for the senderId.

In my opinion this must be a bug because I can recreate this behavior with any field defined as long in the data class and read over the editor.

Does anyone had this problem as well?

asked 20.11.2013 at 14:35

Daniel%20Oechslin's gravatar image

Daniel Oechslin
accept rate: 39%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 20.11.2013 at 14:35

Seen: 2,133 times

Last updated: 20.11.2013 at 14:35