New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)
** CID 64485: Arguments in wrong order (SWAPPED_ARGUMENTS)
________________________________________________________________________________________________________
*** CID 64485: Arguments in wrong order (SWAPPED_ARGUMENTS)
/prism/src/main/java/org/apache/falcon/security/FalconAuditFilter.java: 71 in org.apache.falcon.security.FalconAuditFilter.recordAudit(javax.servlet.http.HttpServletRequest, java.lang.String)()
65 final String fromAddress = httpRequest.getRemoteAddr();
66 final String whatURL = Servlets.getRequestURL(httpRequest);
67 final String whatAddrs = httpRequest.getLocalAddr();
68
69 LOG.debug("Audit: {}/{} performed request {} ({}) at time {}",
70 who, fromAddress, whatURL, whatAddrs, whenISO9601);
>>> CID 64485: Arguments in wrong order (SWAPPED_ARGUMENTS)
>>> The positions of arguments in the call to "audit" do not match the ordering of the parameters:
* "fromHost" is passed to "remoteAddress"
* "fromAddress" is passed to "remoteHost"
71 GenericAlert.audit(who, fromHost, fromAddress, whatURL, whatAddrs, whenISO9601);
72 }
73
74 private String getUserFromRequest(HttpServletRequest httpRequest) {
75 try {
76 // get the authenticated user