if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true);  Map params = parser.parse(cd, ';'); if (params.containsKey("filename")) { fileName = (String) params.get("filename"); if (fileName != null) { fileName = fileName.trim(); } else {   fileName = "";
if (cd != null) { cd = cd.toLowerCase(); if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) { ParameterParser parser = new ParameterParser(); parser.setLowerCaseNames(true);  Map params = parser.parse(cd, ';'); if (params.containsKey("filename")) { fileName = (String) params.get("filename"); if (fileName != null) { fileName = fileName.trim(); } else {   fileName = ""; }
    protected String getFileName(Map /* String, String */ headers) {        String fileName = null;        String cd = getHeader(headers, CONTENT_DISPOSITION);        if (cd.startsWith(FORM_DATA) || cd.startsWith(ATTACHMENT)) {            ParameterParser parser = new ParameterParser();            parser.setLowerCaseNames(true);            // Parameter parser can handle null input            Map params = parser.parse(cd, ';');            if (params.containsKey("filename")) {                fileName = (String) params.get("filename");                if (fileName != null) {                    fileName = fileName.trim();                } else {                    // Even if there is no value, the parameter is present, so                    // we return an empty file name rather than no file name.                    fileName = "";                }            }        }        return fileName;    }