Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4565

Use ModelNode.TRUE, ModelNode.FALSE, ModelNode.ZERO and ModelNode.ZERO_LONG

    Details

      Description

      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-core -type f -name "*.java" -exec grep -i "new ModelNode(false)" -l {} \; -exec sed -i "" 's/new ModelNode(false)/ModelNode.FALSE/g' {} \;

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  brian.stansberry Brian Stansberry
                  Reporter:
                  brian.stansberry Brian Stansberry
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: