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

NullPointerException thrown by InputFile.validateValue(FacesContext,Object) 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. Upload a file that is zero bytes in length

      4. Click the Submit button

      If the bug is fixed, then a FacesMessage will be displayed in the browser.

      Otherwise, if the bug still exists, then the following error will appear in the console log:

      java.lang.NullPointerException
      	at java.lang.String.contains(String.java:2076)
      	at com.liferay.faces.alloy.component.inputfile.InputFile.validateValue(InputFile.java:90)
      	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)
      	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      	at com.liferay.faces.bridge.internal.BridgePhaseActionImpl.execute(BridgePhaseActionImpl.java:93)
      

        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