integration-faces/src/main/java/org/ocpsoft/rewrite/faces/FacesExpressionLanguageProvider.java
private FacesContext getFacesContext()
   {
      FacesContext facesContext = FacesContext.getCurrentInstance();
      if (facesContext == null) {
         throw new IllegalArgumentException(
                  "FacesContext.getCurrentInstance() returned null. EL expressions can only be evaluated in the JSF lifecycle. "
                           + "You should use PhaseAction and PhaseBinding to perform a deferred operation instead.");
      }
      return facesContext;
   }
private FacesContext getFacesContext()
   {
      FacesContext facesContext = FacesContext.getCurrentInstance();
      if (facesContext == null) {
         throw new IllegalArgumentException(
                  "FacesContext.getCurrentInstance() returned null. EL expressions can only be evaluated in the JSF lifecycle. "
                           + "You should use PhaseAction and PhaseBinding to perform a deferred operation instead.");
      }
      return facesContext;
   }
Obtains the {@link FacesContext} using {@link FacesContext#getCurrentInstance()}. This method will throw an
{@link IllegalArgumentException} if the {@link FacesContext} is not available.