[jboss-jira] [JBoss JIRA] (WFLY-12285) Use ModelNode.TRUE, ModelNode.FALSE, ModelNode.ZERO and ModelNode.ZERO_LONG
Brian Stansberry (Jira)
issues at jboss.org
Sat Jul 13 09:50:00 EDT 2019
Brian Stansberry created WFLY-12285:
---------------------------------------
Summary: Use ModelNode.TRUE, ModelNode.FALSE, ModelNode.ZERO and ModelNode.ZERO_LONG
Key: WFLY-12285
URL: https://issues.jboss.org/browse/WFLY-12285
Project: WildFly
Issue Type: Enhancement
Components: Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
ModelNode declares constants ModelNode.TRUE, ModelNode.FALSE, ModelNode.ZERO and ModelNode.ZERO_LONG. Save memory and a bit of runtime cost by using these instead of the hundreds of 'new ModelNode(true)' etc.
This kind of thing does the trick for me:
find ~/dev/wildfly/wildfly -type f -name "*.java" -exec grep -i "new ModelNode(false)" -l {} \; -exec sed -i "" 's/new ModelNode(false)/ModelNode.FALSE/g' {} \;
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list