code: final void changeRelativePath(String pathName, String relativePath, boolean check) throws OperationFailedException {
          PathEntry pathEntry = findPathEntry(pathName);
          synchronized (pathEntries) {
              if (check && relativePath != null && pathEntries.get(relativePath) == null) {
                  // TODO per method signature and usage in PathWriteAttributeHandler this should throw OFE.
                  // But leave it for now as a better way to deal with this is to have capabilities for paths
                  // and use capability resolution to detect invalid references
                  throw ControllerLogger.ROOT_LOGGER.pathEntryNotFound(pathName);
              }
              if (pathEntry.getRelativeTo() != null) {
                  Set<String> dependents = dependenctRelativePaths.get(pathEntry.getRelativeTo());
                  dependents.remove(pathEntry.getName());
              }
              pathEntry.setRelativeTo(relativePath);
              pathEntry.setPathResolver(relativePath == null ? absoluteResolver : relativeResolver);
              addDependent(pathEntry.getName(), pathEntry.getRelativeTo());
          }
          triggerCallbacksForEvent(pathEntry, Event.UPDATED);
      }
docs: Updates the {@link PathEntry#getRelativeTo() relative to} value for an entry and sends an
  {@link org.jboss.as.controller.services.path.PathManager.Event#UPDATED}
  notification to any registered
  {@linkplain org.jboss.as.controller.services.path.PathManager.Callback#pathEvent(Event, PathEntry) callbacks}.
  @param pathName the logical name of the path within the model. Cannot be {@code null}
  @param relativePath the new name of the path this path is relative to. If {@code null} this is an absolute path
  @param check {@code true} if a check for the existence of an entry for the new {@code relativePath} value
  should be performed
  @throws OperationFailedException if {@code check} is {@code true} and no path exists whose name matches {@code relativePath}