]
Brian Stansberry moved WFLY-12285 to WFCORE-4565:
-------------------------------------------------
Project: WildFly Core (was: WildFly)
Key: WFCORE-4565 (was: WFLY-12285)
Component/s: Management
(was: Management)
Use ModelNode.TRUE, ModelNode.FALSE, ModelNode.ZERO and
ModelNode.ZERO_LONG
---------------------------------------------------------------------------
Key: WFCORE-4565
URL:
https://issues.jboss.org/browse/WFCORE-4565
Project: WildFly Core
Issue Type: Enhancement
Components: Management
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Major
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' {} \;