-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-13897 .NET: Service can't assign correct type to passed array parameters #8614
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
Conversation
|
Hello @ptupitsyn For now, we have an issue - user type arrays deserialize to Can you, please, take a look? |
| Object[] res = new Object[arr.length]; | ||
| Class<?> compType = arr.getClass().getComponentType(); | ||
|
|
||
| Object[] res = (Object[])Array.newInstance(compType, arr.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! It was strange, that here was untyped array. Great catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have a check for component type above, this can be changed back to Object[] res = new Object[arr.length];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
However there are some suspicious fails in TC
https://ci.ignite.apache.org/buildConfiguration/IgniteTests24Java8_PlatformNet/5807182
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems, that the case if type is defined in .NET only, is now broken.
See https://ci.ignite.apache.org/buildConfiguration/IgniteTests24Java8_PlatformNetCoreLinux/5807183
PlatformComputeBinarizable2 is defined only in .NET.
.../src/main/java/org/apache/ignite/internal/processors/platform/services/PlatformServices.java
Outdated
Show resolved
Hide resolved
...s/core/src/main/java/org/apache/ignite/internal/processors/platform/utils/PlatformUtils.java
Outdated
Show resolved
Hide resolved
Thanks. Now it's fixed. https://ci.ignite.apache.org/viewLog.html?buildId=5809430&buildTypeId=IgniteTests24Java8_RunAllNet |
Ok, thanks. I locally checked, it's ok. I approve PR, but lets wait for TC bot visa |
| Object[] res = new Object[arr.length]; | ||
| Class<?> compType = arr.getClass().getComponentType(); | ||
|
|
||
| Object[] res = (Object[])Array.newInstance(compType, arr.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have a check for component type above, this can be changed back to Object[] res = new Object[arr.length];
…parameters (apache#8614) (cherry picked from commit c2204cd)
Merge in OSPT/ignite from net_fixes_cherry_pick to master * commit 'd6a200fed13ae8834ef1f84f275d7ff7ba71d60a': IGN-2322: Compilation fix. IGNITE-13897 .NET: Service can't assign correct type to passed array parameters (apache#8614) IGNITE-13734 .NET: Register service return type on method invocation (apache#8602) IGNITE-12824 .NET: Add BinaryConfiguration.TimestampConverter (apache#8568) IGNITE-13865 Support DateTime as a key or value in .NET and Java (apache#8580) IGNITE-10075 .NET Avoid binary configurations of Ignite Java service params (apache#8509)
…parameters (apache#8614) (cherry picked from commit c2204cd)
Merge in OSPT/ignite from net_fixes_cherry_pick to master * commit 'd6a200fed13ae8834ef1f84f275d7ff7ba71d60a': IGN-2322: Compilation fix. IGNITE-13897 .NET: Service can't assign correct type to passed array parameters (apache#8614) IGNITE-13734 .NET: Register service return type on method invocation (apache#8602) IGNITE-12824 .NET: Add BinaryConfiguration.TimestampConverter (apache#8568) IGNITE-13865 Support DateTime as a key or value in .NET and Java (apache#8580) IGNITE-10075 .NET Avoid binary configurations of Ignite Java service params (apache#8509)
…parameters (apache#8614) (cherry picked from commit c2204cd)
Merge in OSPT/ignite from net_fixes_cherry_pick to master * commit 'd6a200fed13ae8834ef1f84f275d7ff7ba71d60a': IGN-2322: Compilation fix. IGNITE-13897 .NET: Service can't assign correct type to passed array parameters (apache#8614) IGNITE-13734 .NET: Register service return type on method invocation (apache#8602) IGNITE-12824 .NET: Add BinaryConfiguration.TimestampConverter (apache#8568) IGNITE-13865 Support DateTime as a key or value in .NET and Java (apache#8580) IGNITE-10075 .NET Avoid binary configurations of Ignite Java service params (apache#8509)
The array of user objects can't be deserialized on the java side.
The Contribution Checklist
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see TC.Bot: Check PR)Notes
If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.