pinpoint-apm/pinpoint · warning · IllegalArgumentException

invalid null pair parameterType:

Error message

invalid null pair parameterType:

What it means

mergeParameterVariableNameDescription requires BOTH arrays to be non-null (a valid pair) or BOTH null. If exactly one is null (or one is null while the other is not), the method cannot merge them and throws IllegalArgumentException listing both arrays.

Source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/util/ApiUtils.java:57

            }
            if (parameterType.length == 0) {
                return EMPTY_ARRAY;
            }
            StringBuilder sb = new StringBuilder(64);
            sb.append('(');
            int end = parameterType.length - 1;
            for (int i = 0; i < parameterType.length; i++) {
                sb.append(parameterType[i]);
                sb.append(' ');
                sb.append(variableName[i]);
                if (i < end) {
                    sb.append(", ");
                }
            }
            sb.append(')');
            return sb.toString();
        }
        throw new IllegalArgumentException("invalid null pair parameterType:" + Arrays.toString(parameterType) + ", variableName:" + Arrays.toString(variableName));
    }

    public static String mergeApiDescriptor(String className, String methodName, String parameterDescriptor) {
        StringBuilder buffer = new StringBuilder(256);
        buffer.append(className);
        buffer.append('.');
        buffer.append(methodName);
        buffer.append(parameterDescriptor);
        return buffer.toString();
    }
}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Pass both arrays non-null with equal lengths, or both null
  2. When variable names are unavailable, pass null for BOTH arguments or build a types-only descriptor via another API
  3. Normalize metadata providers to return empty arrays instead of null

Example fix

// before
ApiUtils.mergeParameterVariableNameDescription(parameterTypes, null); // throws when parameterTypes != null
// after
String[] variableNames = (parameterTypes == null) ? null : new String[parameterTypes.length];
ApiUtils.mergeParameterVariableNameDescription(parameterTypes, variableNames);
Defensive patterns

Strategy: validation

Validate before calling

if ((parameterType == null) != (variableName == null)) { throw new IllegalStateException("both or neither must be null"); }

Try / catch

try { desc = ApiUtils.mergeParameterVariableNameDescription(types, names); } catch (IllegalArgumentException e) { desc = buildTypesOnlyDescriptor(types); }

Prevention

When it happens

Trigger: Calling mergeParameterVariableNameDescription with one array null and the other non-null, e.g. types parsed from a descriptor but variable names unavailable (or vice versa) passed as null instead of an empty array with matching semantics.

Common situations: Plugins that pass null variableName when debug info is absent while still supplying parameterType; inconsistent metadata providers returning null instead of empty arrays.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/147859075c3e7bca. Report an issue: GitHub.