code: @Override
      public UIViewRoot createView(FacesContext context, String viewId)
      {
          checkNull(viewId, "viewId");
          // we have to check for a possible debug request
          if (UIDebug.debugRequest(context))
          {
              // the current request is a debug request, so we don't need
              // to create a view, since the output has already been written
              // in UIDebug.debugRequest() and facesContext.responseComplete()
              // has been called.
              return null;
          }
          else
          {
              UIViewRoot root = super.createView(context, viewId);
              if (root != null)
              {
                  //Ensure calculateResourceLibraryContracts() can be decorated
                  ViewDeclarationLanguage vdl = context.getApplication().getViewHandler().
                      getViewDeclarationLanguage(context, viewId);
                  List<String> contracts = vdl.calculateResourceLibraryContracts(
                      context, root.getViewId() != null ? root.getViewId() : viewId);
                  context.setResourceLibraryContracts(contracts);
              }
              return root;
          }
      }
docs: {@inheritDoc}