Skip to content

Commit b40fe11

Browse files
dantewangbrianchandotcom
authored andcommitted
LPS-144246 SF, flip to be consistent
1 parent d9108a1 commit b40fe11

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

portal-kernel/src/com/liferay/portal/kernel/util/SessionClicks.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,21 @@ public static void put(
148148
}
149149

150150
private static boolean _isValidKeyValue(String key, String value) {
151-
if ((key.length() > _SESSION_CLICKS_MAX_SIZE_TERMS) ||
152-
(value.length() > _SESSION_CLICKS_MAX_SIZE_TERMS)) {
153-
154-
if (_log.isWarnEnabled()) {
155-
_log.warn(
156-
StringBundler.concat(
157-
"Session clicks has attempted to exceed the maximum ",
158-
"size allowed for keys or values with {key=", key,
159-
", value=", value, "}"));
160-
}
151+
if ((key.length() <= _SESSION_CLICKS_MAX_SIZE_TERMS) &&
152+
(value.length() <= _SESSION_CLICKS_MAX_SIZE_TERMS)) {
161153

162-
return false;
154+
return true;
163155
}
164156

165-
return true;
157+
if (_log.isWarnEnabled()) {
158+
_log.warn(
159+
StringBundler.concat(
160+
"Session clicks has attempted to exceed the maximum size ",
161+
"allowed for keys or values with {key=", key, ", value=",
162+
value, "}"));
163+
}
164+
165+
return false;
166166
}
167167

168168
private static boolean _isValidSize(int size, String key, String value) {

0 commit comments

Comments
 (0)