Skip to content

Commit a9017d1

Browse files
achaparronikki-pru
authored andcommitted
LPD-48789 porlet preferences with values that are considered null are not accounted for
1 parent 5664ff8 commit a9017d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

portal-kernel/src/com/liferay/portal/kernel/upgrade/BasePortletPreferencesUpgradeProcess.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,7 +722,9 @@ private void _upgradePortletPreferenceValues(
722722
String largeValue = null;
723723
String smallValue = null;
724724

725-
if (value.length() > smallValueMaxLength) {
725+
if ((value != null) &&
726+
(value.length() > smallValueMaxLength)) {
727+
726728
largeValue = value;
727729
}
728730
else {
@@ -745,7 +747,9 @@ private void _upgradePortletPreferenceValues(
745747
String largeValue = null;
746748
String smallValue = null;
747749

748-
if (value.length() > smallValueMaxLength) {
750+
if ((value != null) &&
751+
(value.length() > smallValueMaxLength)) {
752+
749753
largeValue = value;
750754
}
751755
else {

0 commit comments

Comments
 (0)