docs: protected void setParameters(int type, List<org.zaproxy.zap.model.NameValuePair> parameters) {
          if (parameters == null) {
              throw new IllegalArgumentException("Parameter parameters must not be null.");
          }
  
          int size = parameters.isEmpty() ? 1 : parameters.size();
          listParam = new ArrayList<>(size);
          originalNames = new ArrayList<>(size);
  
          Map<String, MutableInt> arraysMap = new HashMap<>();
          int i = 0;
          for (org.zaproxy.zap.model.NameValuePair parameter : parameters) {
              String originalName = nonNullString(parameter.getName());
              originalNames.add(originalName);
              String name = isParamArray(originalName) ? getArrayName(originalName, arraysMap) : originalName;
              listParam.add(new NameValuePair(type, name, nonNullString(parameter.getValue()), i));
              i++;
          }
          if (i == 0 && addQueryParam) {
              String param = "query";
          	// No query params, lets add one just to make sure
              listParam.add(new NameValuePair(type, param, param, i));
              originalNames.add(param);
          }
      }