[ 
https://issues.apache.org/jira/browse/IGNITE-28944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ilya Shishkov updated IGNITE-28944:
-----------------------------------
    Description: 
1) Currently {{#equals}} and {{#hashCode}} will be broken if you use different 
collection types:
{code:java}
set.setCachePermissions(Map.of("cache", List.of(CACHE_PUT));
{code}
will have different hashCode with such permission set:
{code:java}
set.setCachePermissions(Map.of("cache", Set.of(CACHE_PUT));
{code}

2) By default in message framework field with type {{Collection}} is backed by 
{{ArrayList}} during deserialization. If we wan to use {{Set}}, we should 
change type parameter as shown below:
{code:java}
Map<String, Set<SecurityPermission>> taskPermissions;
{code}

  was:
Also, currently we can not serialize such fields:

{code:java}
/** */
@Order(0)
Map<String, Collection<TransactionIsolation>> enumMap;

/** */
@Order(1)
Collection<TransactionIsolation> enumCol;
{code}

It will be fixed too.


> SecurityBasicPermissionSet equals and hashCode is broken, when different 
> collections are used
> ---------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-28944
>                 URL: https://issues.apache.org/jira/browse/IGNITE-28944
>             Project: Ignite
>          Issue Type: Task
>            Reporter: Ilya Shishkov
>            Assignee: Ilya Shishkov
>            Priority: Minor
>              Labels: IEP-132, ise
>             Fix For: 2.19
>
>
> 1) Currently {{#equals}} and {{#hashCode}} will be broken if you use 
> different collection types:
> {code:java}
> set.setCachePermissions(Map.of("cache", List.of(CACHE_PUT));
> {code}
> will have different hashCode with such permission set:
> {code:java}
> set.setCachePermissions(Map.of("cache", Set.of(CACHE_PUT));
> {code}
> 2) By default in message framework field with type {{Collection}} is backed 
> by {{ArrayList}} during deserialization. If we wan to use {{Set}}, we should 
> change type parameter as shown below:
> {code:java}
> Map<String, Set<SecurityPermission>> taskPermissions;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to