diff options
author | Dyorgio Nascimento <dyorgio@gmail.com> | 2020-04-02 10:01:41 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 16:01:41 +0300 |
commit | 52013fc6c6ccc0891df79b7fa2c7cce1b9a4f036 (patch) | |
tree | 8b41f2e0c6afb7e97db43d6160fe17acee363f50 | |
parent | f4dc8b29525019f9d4a79e712d64a0e2bede4587 (diff) | |
download | vaadin-framework-52013fc6c6ccc0891df79b7fa2c7cce1b9a4f036.tar.gz vaadin-framework-52013fc6c6ccc0891df79b7fa2c7cce1b9a4f036.zip |
Fix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797)
Fixes #11806
-rw-r--r-- | server/src/main/java/com/vaadin/ui/ConnectorTracker.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java index b2cb185e0a..b8f0ecde95 100644 --- a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java @@ -878,10 +878,12 @@ public class ConnectorTracker implements Serializable { } Map<String, StreamVariable> nameToStreamVar = pidToNameToStreamVariable .get(connectorId); - StreamVariable streamVar = nameToStreamVar.remove(variableName); - streamVariableToSeckey.remove(streamVar); - if (nameToStreamVar.isEmpty()) { - pidToNameToStreamVariable.remove(connectorId); + if (nameToStreamVar != null) { + StreamVariable streamVar = nameToStreamVar.remove(variableName); + streamVariableToSeckey.remove(streamVar); + if (nameToStreamVar.isEmpty()) { + pidToNameToStreamVariable.remove(connectorId); + } } } |