From: Artur Signell Date: Thu, 25 Jun 2009 14:35:58 +0000 (+0000) Subject: Fixed obvious NPE in file upload X-Git-Tag: 6.7.0.beta1~2704 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4cde33c1f65aa1c75e4dd06df612ba8fe895e310;p=vaadin-framework.git Fixed obvious NPE in file upload svn changeset:8243/svn branch:6.0 --- diff --git a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java index 6c74f4d4db..dc83e26e9b 100644 --- a/src/com/vaadin/terminal/gwt/server/CommunicationManager.java +++ b/src/com/vaadin/terminal/gwt/server/CommunicationManager.java @@ -166,14 +166,14 @@ public class CommunicationManager implements Paintable.RepaintRequestListener, final String pid = name.split("_")[0]; final Upload uploadComponent = (Upload) idPaintableMap .get(pid); - if (uploadComponent.isReadOnly()) { - throw new FileUploadException( - "Warning: ignored file upload because upload component is set as read-only"); - } if (uploadComponent == null) { throw new FileUploadException( "Upload component not found"); } + if (uploadComponent.isReadOnly()) { + throw new FileUploadException( + "Warning: ignored file upload because upload component is set as read-only"); + } synchronized (application) { // put upload component into receiving state uploadComponent.startUpload();