aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-04-27 11:34:03 +0000
committerJonatan Kronqvist <jonatan.kronqvist@itmill.com>2011-04-27 11:34:03 +0000
commitb98ddbb34a1a28dc8fd80b077c28084380590a71 (patch)
tree013d4b0aa63300a70134960947f61a351a7aa03e /src/com/vaadin
parent9d4104bd1b9f132aebad45eb983eb7f5b961c3ae (diff)
downloadvaadin-framework-b98ddbb34a1a28dc8fd80b077c28084380590a71.tar.gz
vaadin-framework-b98ddbb34a1a28dc8fd80b077c28084380590a71.zip
Null pointer checks added to the fix for #6697 based on review
svn changeset:18496/svn branch:6.6
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/ui/Table.java32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/com/vaadin/ui/Table.java b/src/com/vaadin/ui/Table.java
index b14df2cdaa..4d4293e655 100644
--- a/src/com/vaadin/ui/Table.java
+++ b/src/com/vaadin/ui/Table.java
@@ -2236,21 +2236,21 @@ public class Table extends AbstractSelect implements Action.Container,
Object propertyId = null;
if (cid != null) {
propertyId = columnIdMap.get(cid.toString());
- }
- Object prev = variables.get("columnResizeEventPrev");
- int previousWidth = -1;
- if (prev != null) {
- previousWidth = Integer.valueOf(prev.toString());
- }
+ Object prev = variables.get("columnResizeEventPrev");
+ int previousWidth = -1;
+ if (prev != null) {
+ previousWidth = Integer.valueOf(prev.toString());
+ }
- Object curr = variables.get("columnResizeEventCurr");
- int currentWidth = -1;
- if (curr != null) {
- currentWidth = Integer.valueOf(curr.toString());
- }
+ Object curr = variables.get("columnResizeEventCurr");
+ int currentWidth = -1;
+ if (curr != null) {
+ currentWidth = Integer.valueOf(curr.toString());
+ }
- fireColumnResizeEvent(propertyId, previousWidth, currentWidth);
+ fireColumnResizeEvent(propertyId, previousWidth, currentWidth);
+ }
}
private void handleMultipleColumnResizeEvents(Map<String, Object> variables) {
@@ -2258,10 +2258,12 @@ public class Table extends AbstractSelect implements Action.Container,
for (String str : events) {
String[] eventDetails = str.split(":");
Object propertyId = columnIdMap.get(eventDetails[0]);
- int curWidth = Integer.valueOf(eventDetails[1]);
- int prevWidth = getColumnWidth(propertyId);
+ if (propertyId != null) {
+ int curWidth = Integer.valueOf(eventDetails[1]);
+ int prevWidth = getColumnWidth(propertyId);
- fireColumnResizeEvent(propertyId, prevWidth, curWidth);
+ fireColumnResizeEvent(propertyId, prevWidth, curWidth);
+ }
}
}