-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WFCORE-14 - add operations for manipulating list & map attributes #206
Conversation
Windows Build 232 outcome was FAILURE using a merge of e147eb8 Build problems:Failed tests detected Failed tests
|
Linux Build 487 outcome was FAILURE using a merge of e147eb8 Build problems:Failed tests detected Failed tests
|
Linux Build 488 outcome was FAILURE using a merge of e147eb8 Build problems:Failed tests detected Failed tests
|
Windows Build 233 outcome was FAILURE using a merge of e147eb8 Build problems:Failed tests detected Failed tests
|
public void updateModel(final OperationContext context, ModelNode model, ListAttributeDefinition attributeDefinition, ModelNode listAttribute) throws OperationFailedException { | ||
ModelNode value = VALUE.resolveModelAttribute(context, model); | ||
ModelNode index = INDEX.resolveModelAttribute(context, model); | ||
List<ModelNode> res = new LinkedList<>(listAttribute.asList()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An ArrayList
should perform better here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really sure about it, with arraylist it would mean copying array over on every remove.
for get operation arraylist is no brainier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A LinkedList
will use Collection.toArray()
then create a new LinkedList.Node
for each entry in the list. An ArrayList
just copies the array with Collection.toArray()
. Anyway, probably not a big deal. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah missed that one, we are stuck with array creation in any case :)
*/ | ||
public class ListOperations { | ||
|
||
public static final OperationDefinition LIST_ADD_DEFINITION = new SimpleOperationDefinitionBuilder("list-add", new NonResolvingResourceDescriptionResolver()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need descriptions, not NonResolvingResourceDescriptionResolver.
Linux Build 578 outcome was FAILURE using a merge of 1ba9b2f Build problems:Failed tests detected Failed tests
|
retest this please |
WFCORE-14 - add operations for manipulating list & map attributes
[WFCORE-1442] Remove -XX:MaxMetaspaceSize=256m
initial version, i want do do some more cleanup of apis for easier manipulating on side of write/read attribute handlers