class SymbolicLinkHelper implements ISystemFileCommandsHelper {

  public static String readSymbolicLink(String link) {
    if (nonNull(link)) {
      try {
        Path linkPath = Paths.get(link);
        if (nonNull(linkPath)) {
          Path pathObject = Files.readSymbolicLink(linkPath);
          if (nonNull(pathObject)) {
            return pathObject.toString();
          }
        }
      // p4ic4idea: Do not catch throwable unless you're really careful
      //} catch (Throwable thr) {
      } catch (Exception thr) {
        Log.error("Unexpected exception invoking method: %s", thr.getLocalizedMessage());
        Log.exception(thr);
      }
    }

    return null;
  }

}