Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-420

Replace getParameterTypes().length with getParameterCount()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Minor Minor
    • 4.0.19
    • None
    • Parser/Type Checker
    • None

      getParameterTypes().length is inefficient because it creates an array clone, while getParameterCount() directly returns the length

      agent/src/main/java/org/jboss/byteman/rule/expression/MethodExpression.java:                                method.getParameterTypes().length == arity) {
      agent/src/main/java/org/jboss/byteman/rule/expression/NewExpression.java:                if (constructor.getParameterTypes().length == arity) {
      agent/src/main/java/org/jboss/byteman/rule/expression/ThrowExpression.java:            if (constructor.getParameterTypes().length == arity) {
      

       

              rhn-engineering-adinn Andrew Dinn
              clara0 Clara Fang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: