[
https://issues.apache.org/jira/browse/TUSCANY-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518654
]
Adriano Crestani commented on TUSCANY-1465:
-------------------------------------------
- On ReadCommandImpl.setResultDescriptor(List) you are storing the list
directly, however I think the list should be copied(also the elements), because
the way it is the user can modify the Command's ResultDescriptor List or the
ResultDescriptor itself anywhere else on users'code without notify the Command.
- The ResultDescriptorSorter.sortList(List) is returning 3 different ways:
1. When the List parameter is null, the method returns null. I think
it's ok
2. When the List is empty, the method returns the same List object
3. Otherwise, it's returning a new List object containing the
ResultDescriptors sorted by the index
I think on 2 the List returned should be a new empty List and not the parameter
List. OR the 3 could return the same List but with the objects sorted. I think
it's important to define the method logic, if it will always return the same
List passed on parameter or return a new List.
- Why ResultDescriptor cannot be made Comparable?
- Is there any reason not to name the method List
Command.set/getResultDescriptor to set/getResultDescriptors? Because it returns
a List of ResultDescriptors, and not a single one.
Maybe we could use some pattern here, as addResultDescriptor(ResultDescriptor),
removeResultDescriptor(ResultDescriptor), and getResultDescriptor(int).
- Why the ResultDescriptor Lists paremeters and returns cannot be defined as
List<ResultDescriptor>?
I applied the patch on my trunk and it passed on all mvn tests, I think it`s
ok. I just want to know your thougths about my questions above : )
Regards,
Adriano Crestani
> Allow passing ResultDescriptor for dynamic Commands
> ---------------------------------------------------
>
> Key: TUSCANY-1465
> URL: https://issues.apache.org/jira/browse/TUSCANY-1465
> Project: Tuscany
> Issue Type: Bug
> Components: Java DAS RDB
> Affects Versions: Java-DAS-Next
> Reporter: Amita Vadhavkar
> Assignee: Amita Vadhavkar
> Fix For: Java-DAS-Next
>
> Attachments: 1465.patch
>
>
> http://www.mail-archive.com/[email protected]/msg19886.html
> Action for the issue discussed in above mail.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]