[ 
https://issues.apache.org/jira/browse/IGNITE-3682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947590#comment-15947590
 ] 

Andrey Gura commented on IGNITE-3682:
-------------------------------------

[~daradurvs]

Hi, I've reviewed pull request and have some comments:

* {{GridAbsClosureNoOperation}} class. Please rename it. First of all "Abs" 
prefix should be removed because this class isn't abstract. The second, "Grid" 
prefix is legacy and should be removed also. I think good name for this class 
is "NoOpClosure"
* {{GridAbsClosurePrint}} class and {{GridFunc.println()}} method should be 
removed. {{GridFunc.println()}} method has only one usage in 
{{GridIndexingSpiAbstractSelfTest.testLongQueries}} test that doesn't use 
returned value yet.
* {{GridAbsClosureRunnableWrapper}} class and {{GridFunc.as}} method should be 
removed because this method doesn't have any usages.
* {{GridAbsClosureWrapper}} class and {{GridFunc.curry}} method should be 
removed because this method doesn't have any usages.
* {{GridIteratorAdapterClosurePredicatesWrapper}} class should be renamed to 
something shorter. E.g. {{TransformFilteringItefator}}. Also use short cuts for 
variables like {{iterator}} (corret name is {{iter}}). See code styles.
* {{GridIteratorAdapterWrapper}} class should be renamed accordingly to it 
purpose. E.g. {{FlatIterator}}. {{iterable}} field could be converted to a 
local variable. {{iterator}} field should be renamed to {{iter}}.
* {{GridIteratorOverInnerCollectionsAdapter}} class should be renamed 
accordingly to it purpose. Moreover it very similar to 
{{GridIteratorAdapterWrapper}} class with only diffrence in input parameter: 
{{Iterable}} of {{Iterable}}'s vs {{Iterable}} of {{Iterator}}'s. But we always 
can get {{Iterator}} from {{Iterable}}. Try to remove one of them.
* {{GridSerializableCollectionPredicateWrapper}} class should be renamed to 
something shorter. E.g. {{CollectionView}}. Just add javadoc that will clarify 
that it private predicate that used only in {{GridFunc.view}} method. 
{{collection}} field and parameter should be renamed to {{col}}.
* {{GridSerializableCollectionWrapper}} class should be renamed to something 
shorter. E.g. {{FlatCollectionWrapper}}.
* {{GridSerializableListReadOnlyWithTransformation}} class and 
{{GridFunc.viewListReadOnly}} method should be removed because this method 
doesn't have any usages.
* {{GridSerializableMapPredicatesTransformerWrapper}} class should be renamed 
accordingly to it purpose. E.g. {{MapView}}.
* {{GridSerializableMapPredicatesWrapper}} class should be renamed accordingly 
to it purpose. E.g. {{MapView}}. {{entryPredicate}} field should be renamed to 
{{entryPred}}.

Please look at all newly created classe once again and make changes similar to 
described above.



> GridFunc: move all inner anonymous classes to separate top-level classes.
> -------------------------------------------------------------------------
>
>                 Key: IGNITE-3682
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3682
>             Project: Ignite
>          Issue Type: Task
>          Components: general
>    Affects Versions: 1.6
>            Reporter: Vladimir Ozerov
>            Assignee: Vyacheslav Daradur
>              Labels: important
>             Fix For: 2.0
>
>
> Otherwise almost any change to class {{GridFunc}} will lead to serialization 
> issues because we have no control over inner class names.
> E.g. if removed single anonymous class, another anonymous class might change 
> it's name from {{GridFunc$4}} to {{GridFunc$3}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to