docs: protected MetadataViewKey deriveViewKey(FacesContext facesContext,
                      UIViewRoot root)
      {
          MetadataViewKey viewKey; 
          if (!facesContext.getResourceLibraryContracts().isEmpty())
          {
              String[] contracts = new String[facesContext.getResourceLibraryContracts().size()];
              contracts = facesContext.getResourceLibraryContracts().toArray(contracts);
              viewKey = new MetadataViewKeyImpl(root.getViewId(), root.getRenderKitId(), root.getLocale(), contracts);
          }
          else
          {
              viewKey = new MetadataViewKeyImpl(root.getViewId(), root.getRenderKitId(), root.getLocale());
          }
          return viewKey;
      }