-
Enhancement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
None
getParameterTypes().length is inefficient because it creates an array clone, while getParameterCount() directly returns the length.
common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java: if (! methodName.startsWith("set") || method.getParameterTypes().length != 1 ) { //$NON-NLS-1$ common-core/src/main/java/org/teiid/core/util/PropertiesUtils.java: if (! methodName.startsWith("set") || method.getParameterTypes().length != 1 || !StringUtil.endsWithIgnoreCase(methodName, name)) { //$NON-NLS-1$ engine/src/main/java/org/teiid/query/eval/TeiidScriptEngine.java: if (md.getMethod() == null || md.getMethod().getParameterTypes().length > 0 || md.getMethod().getReturnType() == Void.class || md.getMethod().getReturnType() == void.class) { engine/src/main/java/org/teiid/query/function/FunctionDescriptor.java: int i = invocationMethod.getParameterTypes().length; engine/src/main/java/org/teiid/query/function/FunctionTree.java: requiresContext = (invocationMethod.getParameterTypes().length > 0 && org.teiid.CommandContext.class.isAssignableFrom(invocationMethod.getParameterTypes()[0])); runtime/src/main/java/org/teiid/deployers/TranslatorUtil.java: } else if (method.getParameterTypes().length != 0) {
- is related to
-
WFLY-15612 Replace usages of getParameterTypes().length with getParameterCount()
- Closed