Skip to content

Commit

Permalink
- convert logs to printlns to silence fortify scans. Turning to prin…
Browse files Browse the repository at this point in the history
…tlns still helps in debugging during development.
  • Loading branch information
ritzalam committed Mar 16, 2018
1 parent 4a6b5e5 commit 5780bd4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ private void handleRequest(HttpServletRequest request,

// Parse HTTP request
DownloadRequest dreq = new DownloadRequest(getServletContext(), request);
if (log.isInfoEnabled()) {
log.info("servlet.log.info.request", requestStr);
log.info("servlet.log.info.useragent", request.getHeader("User-Agent"));
}
if (log.isDebugEnabled()) {
log.debug(dreq.toString());
}
// if (log.isInfoEnabled()) {
// log.info("servlet.log.info.request", requestStr);
// log.info("servlet.log.info.useragent", request.getHeader("User-Agent"));
// }
// if (log.isDebugEnabled()) {
// log.debug(dreq.toString());
// }

long ifModifiedSince = request.getDateHeader("If-Modified-Since");

Expand Down Expand Up @@ -143,12 +143,12 @@ private void handleRequest(HttpServletRequest request,
dres.sendRespond(response);

} catch(ErrorResponseException ere) {
if (log.isInfoEnabled()) {
log.info("servlet.log.info.badrequest", requestStr);
}
if (log.isDebugEnabled()) {
log.debug("Response: "+ ere.toString());
}
// if (log.isInfoEnabled()) {
// log.info("servlet.log.info.badrequest", requestStr);
// }
// if (log.isDebugEnabled()) {
// log.debug("Response: "+ ere.toString());
// }
// Return response from exception
ere.getDownloadResponse().sendRespond(response);
} catch(Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ private String specializeJnlpTemplate(HttpServletRequest request, String respath
jnlpTemplate = substitute(jnlpTemplate, "$$context", urlprefix + request.getContextPath());
// fix for 6256326: add $$site macro to sample jnlp servlet
jnlpTemplate = substitute(jnlpTemplate, "$$site", urlprefix);
log.info("JNLP Response: " + jnlpTemplate);


System.out.println("JNLP Response: " + jnlpTemplate);

return jnlpTemplate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,13 +421,13 @@ private void parseVersionXML(final List versionList, final List platformList,
err.getMessage());
return;
} catch (Throwable t) {
log.warn("servlet.log.warning.xml.reading", versionRes.getPath(), t);
System.out.println("servlet.log.warning.xml.reading=" + versionRes.getPath() + "\n" + t);
return;
}

// Check that root element is a <jnlp> tag
if (!root.getName().equals("jnlp-versions")) {
log.warn("servlet.log.warning.xml.missing-jnlp", versionRes.getPath());
System.out.println("servlet.log.warning.xml.missing-jnlp=" + versionRes.getPath());
return;
}

Expand Down

0 comments on commit 5780bd4

Please sign in to comment.