Skip to content

Commit 63ec384

Browse files
javier-godoypaodb
authored andcommitted
refactor: call getter before loop
1 parent 9a23a12 commit 63ec384

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/flowingcode/vaadin/addons/gridhelpers/HeaderFooterStylesHelper.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,14 @@ private int getColumnIndex() {
135135
int j = -1;
136136

137137
CELL last = null;
138+
CELL target = getCell();
138139
for (Column<?> c : helper.getGrid().getColumns()) {
139140
if (c.isVisible()) {
140141
CELL curr = getCell(row, c);
141142
if (curr != last) {
142143
++j;
143144
last = curr;
144-
if (curr == getCell()) {
145+
if (curr == target) {
145146
break;
146147
}
147148
}

0 commit comments

Comments
 (0)