Skip to content

Conversation

@nizhikov
Copy link
Contributor

The array of user objects can't be deserialized on the java side.

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached 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.

@nizhikov nizhikov changed the title IGNITE-13897 .Net: Service can't assign correct type to passed array parameters IGNITE-13897 .NET: Service can't assign correct type to passed array parameters Dec 26, 2020
@nizhikov
Copy link
Contributor Author

Hello @ptupitsyn

For now, we have an issue - user type arrays deserialize to Object[] on the java side during service invocation.
I fixed it in the PR.

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);
Copy link
Contributor

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!

Copy link
Contributor

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];

Copy link
Contributor

@ivandasch ivandasch left a 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

Copy link
Contributor

@ivandasch ivandasch left a 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.

@nizhikov
Copy link
Contributor Author

@ivandasch

It seems, that the case if type is defined in .NET only, is now broken.

Thanks. Now it's fixed.

https://ci.ignite.apache.org/viewLog.html?buildId=5809430&buildTypeId=IgniteTests24Java8_RunAllNet

@ivandasch
Copy link
Contributor

ivandasch commented Dec 28, 2020

@ivandasch

It seems, that the case if type is defined in .NET only, is now broken.

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);
Copy link
Contributor

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];

@nizhikov nizhikov merged commit c2204cd into master Dec 29, 2020
shishkovilja pushed a commit to shishkovilja/ignite that referenced this pull request Jan 18, 2021
shishkovilja added a commit to shishkovilja/ignite that referenced this pull request Jan 18, 2021
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)
@nizhikov nizhikov deleted the IGNITE-13897 branch March 19, 2021 13:24
shishkovilja pushed a commit to shishkovilja/ignite that referenced this pull request Apr 23, 2021
shishkovilja added a commit to shishkovilja/ignite that referenced this pull request Apr 23, 2021
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)
Sega76 pushed a commit to Sega76/ignite that referenced this pull request Jan 16, 2022
Sega76 pushed a commit to Sega76/ignite that referenced this pull request Jan 16, 2022
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)
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

Successfully merging this pull request may close these issues.

3 participants