Re: [1/4] cayenne git commit: CAY-2057

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1/4] cayenne git commit: CAY-2057

Andrus Adamchik

> On Apr 14, 2017, at 1:08 AM, [hidden email] wrote:
>
> /**
> - * Orders a given list of objects, using a List of Orderings applied
> - * according the default iteration order of the Orderings list. I.e. each
> - * Ordering with lower index is more significant than any other Ordering
> - * with higher index. List being ordered is modified in place.
> - *
> + * Return the sorted list of objects.
> * @since 4.0
> */
> public static <E> List<E> orderedList(Collection<E> objects, List<? extends Ordering> orderings) {

Hmm.. this Javadoc change doesn't look right. The old Javadoc was correct except for the last sentence (this method is not modifying the list in place). The new Javadoc is not helpful at all.

Andrus
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1/4] cayenne git commit: CAY-2057

Nikita Timofeev
Hi Andrus,

Yes it was bad and fixed immediately in the next commit:
https://github.com/apache/cayenne/commit/67c947e0b8a702cab023032ae0a721d13ac7abbf

On Fri, Apr 14, 2017 at 2:53 PM, Andrus Adamchik <[hidden email]> wrote:

>
>> On Apr 14, 2017, at 1:08 AM, [hidden email] wrote:
>>
>>       /**
>> -      * Orders a given list of objects, using a List of Orderings applied
>> -      * according the default iteration order of the Orderings list. I.e. each
>> -      * Ordering with lower index is more significant than any other Ordering
>> -      * with higher index. List being ordered is modified in place.
>> -      *
>> +      * Return the sorted list of objects.
>>        * @since 4.0
>>        */
>>       public static <E> List<E> orderedList(Collection<E> objects, List<? extends Ordering> orderings) {
>
> Hmm.. this Javadoc change doesn't look right. The old Javadoc was correct except for the last sentence (this method is not modifying the list in place). The new Javadoc is not helpful at all.
>
> Andrus



--
Best regards,
Nikita Timofeev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [1/4] cayenne git commit: CAY-2057

Andrus Adamchik
Ah, sorry. Didn't check the full history.

Andrus

> On Apr 17, 2017, at 3:06 AM, Nikita Timofeev <[hidden email]> wrote:
>
> Hi Andrus,
>
> Yes it was bad and fixed immediately in the next commit:
> https://github.com/apache/cayenne/commit/67c947e0b8a702cab023032ae0a721d13ac7abbf
>
> On Fri, Apr 14, 2017 at 2:53 PM, Andrus Adamchik <[hidden email]> wrote:
>>
>>> On Apr 14, 2017, at 1:08 AM, [hidden email] wrote:
>>>
>>>      /**
>>> -      * Orders a given list of objects, using a List of Orderings applied
>>> -      * according the default iteration order of the Orderings list. I.e. each
>>> -      * Ordering with lower index is more significant than any other Ordering
>>> -      * with higher index. List being ordered is modified in place.
>>> -      *
>>> +      * Return the sorted list of objects.
>>>       * @since 4.0
>>>       */
>>>      public static <E> List<E> orderedList(Collection<E> objects, List<? extends Ordering> orderings) {
>>
>> Hmm.. this Javadoc change doesn't look right. The old Javadoc was correct except for the last sentence (this method is not modifying the list in place). The new Javadoc is not helpful at all.
>>
>> Andrus
>
>
>
> --
> Best regards,
> Nikita Timofeev

Loading...