Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-1436

Replace usages of getParameterTypes().length with getParameterCount()

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Done
    • None
    • master
    • None
    • None

    Description

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

      Targets
          Occurrences of 'getParameterTypes().length' in Project
      Found Occurrences in Project  (6 usages found)
          Unclassified  (6 usages found)
              ironjacamar-arquillian-embedded  (1 usage found)
                  org.jboss.jca.arquillian.embedded  (1 usage found)
                      EmbeddedJCAEnricher.java  (1 usage found)
                          resolve(Method)  (1 usage found)
                              69 return new Object[method.getParameterTypes().length];
              ironjacamar-as  (1 usage found)
                  org.jboss.jca.as.rarinfo  (1 usage found)
                      Main.java  (1 usage found)
                          getIntrospectedProperties(String, URLClassLoader)  (1 usage found)
                              1278 if (m.getName().startsWith("set") && m.getParameterTypes().length == 1
              ironjacamar-core-impl  (2 usages found)
                  org.jboss.jca.core.rar  (1 usage found)
                      SimpleResourceAdapterRepository.java  (1 usage found)
                          introspectActivationSpec(Class<?>)  (1 usage found)
                              514 if (m.getName().startsWith("set") && m.getParameterTypes().length == 1)
                  org.jboss.jca.core.util  (1 usage found)
                      Injection.java  (1 usage found)
                          findMethod(Class<?>, String, String)  (1 usage found)
                              202 if (methodName.equals(method.getName()) && method.getParameterTypes().length == 1)
              ironjacamar-deployers-common  (1 usage found)
                  org.jboss.jca.deployers.common  (1 usage found)
                      AbstractDsDeployer.java  (1 usage found)
                          injectValue(Object, String, Object)  (1 usage found)
                              1357 if (m.getName().equals(methodName) && m.getParameterTypes().length == 1)
              ironjacamar-jdbc  (1 usage found)
                  org.jboss.jca.adapters.jdbc.util  (1 usage found)
                      Injection.java  (1 usage found)
                          findMethod(Class<?>, String, String)  (1 usage found)
                              202 if (methodName.equals(method.getName()) && method.getParameterTypes().length == 1)
      

      Attachments

        Issue Links

          Activity

            People

              tadamski@redhat.com Tomasz Adamski
              clara0 Clara Fang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: