Skip to content

Commit

Permalink
fixed bugs reported by sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
albogdano committed Mar 19, 2020
1 parent de0866d commit 50a2954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Expand Up @@ -150,7 +150,7 @@ private void setAnonymity(Profile authUser, String anonParam) {

private void setDarkMode(Profile authUser, String darkParam, HttpServletRequest req, HttpServletResponse res) {
if ("true".equalsIgnoreCase(darkParam)) {
HttpUtils.setRawCookie("dark-mode", "1", req, res, false, (int) TimeUnit.DAYS.toSeconds(2 * 365));
HttpUtils.setRawCookie("dark-mode", "1", req, res, false, (int) TimeUnit.DAYS.toSeconds(2 * 365L));
} else {
HttpUtils.removeStateParam("dark-mode", req, res);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Expand Up @@ -1038,6 +1038,7 @@ public <P extends ParaObject> P populate(HttpServletRequest req, P pobj, String.
}
} catch (IOException ex) {
logger.error(null, ex);
data = Collections.emptyMap();
}
} else {
for (String param : paramName) {
Expand Down

0 comments on commit 50a2954

Please sign in to comment.