jodd-servlet/src/main/java/jodd/servlet/ServletUtil.java
public static String[] prepareParameters(
		final String[] paramValues,
		final boolean treatEmptyParamsAsNull,
		final boolean ignoreEmptyRequestParams) {

		if (treatEmptyParamsAsNull || ignoreEmptyRequestParams) {
			int emptyCount = 0;
			int total = paramValues.length;
			for (int i = 0; i < paramValues.length; i++) {
				String paramValue = paramValues[i];
				if (paramValue == null) {
					emptyCount++;
					continue;
				}
				if (paramValue.length() == 0) {
					emptyCount++;
					if (treatEmptyParamsAsNull) {
						paramValue = null;
					}
				}
				paramValues[i] = paramValue;
			}
			if ((ignoreEmptyRequestParams) && (emptyCount == total)) {
				return null;
			}
		}
		return paramValues;
	}
public static String[] prepareParameters(
		final String[] paramValues,
		final boolean treatEmptyParamsAsNull,
		final boolean ignoreEmptyRequestParams) {

		if (treatEmptyParamsAsNull || ignoreEmptyRequestParams) {
			int emptyCount = 0;
			int total = paramValues.length;
			for (int i = 0; i < paramValues.length; i++) {
				String paramValue = paramValues[i];
				if (paramValue == null) {
					emptyCount++;
					continue;
				}
				if (paramValue.length() == 0) {
					emptyCount++;
					if (treatEmptyParamsAsNull) {
						paramValue = null;
					}
				}
				paramValues[i] = paramValue;
			}
			if ((ignoreEmptyRequestParams) && (emptyCount == total)) {
				return null;
			}
		}
		return paramValues;
	}
Prepares parameters for further processing.
@param paramValues	string array of param values
@param treatEmptyParamsAsNull	empty parameters should be treated as <code>null</code>
@param ignoreEmptyRequestParams	if all parameters are empty, return <code>null</code>