Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2401

NullPointerException thrown by UploadedFileImpl.delete() when a zero-byte file is uploaded

    Details

      Description

      Steps to Reproduce:

      1. Deploy the showcase-portlet

      2. Visit the Validation Usage for alloy:inputFile

      3. Select a zero-byte length file for upload

      4. Click the Submit button

      If the bug is fixed then a FacesMessage will be displayed to the user.

      Otherwise, if the bug still exists, then the following stacktrace will appear in the server log:

      java.lang.NullPointerException
      	at java.io.File.<init>(File.java:277)
      	at com.liferay.faces.util.model.internal.UploadedFileImpl.delete(UploadedFileImpl.java:66)
      	at com.liferay.faces.alloy.component.inputfile.InputFile.handleInvalidFile(InputFile.java:110)
      	at com.liferay.faces.alloy.component.inputfile.InputFile.validateValue(InputFile.java:96)
      	at javax.faces.component.UIInput.validate(UIInput.java:971)
      	at javax.faces.component.UIInput.executeValidate(UIInput.java:1237)
      	at javax.faces.component.UIInput.processValidators(UIInput.java:702)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIForm.processValidators(UIForm.java:253)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1216)
      	at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1164)
      	at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
      	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      

        Attachments

          Activity

            People

            • Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-3.2.5-ga6
                liferay-faces-4.2.5-ga6