Package com.google.gerrit.server.patch
Class FilePathAdapter
java.lang.Object
com.google.gerrit.server.patch.FilePathAdapter
Adapter for old/new paths of the new diff cache to the old diff cache representation. This is
needed for backward compatibility with all old diff cache callers.
TODO(ghareeb): It's better to revisit this logic and update all diff cache callers to use the new diff cache output directly.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
getNewPath
(Optional<String> oldName, Optional<String> newName, Patch.ChangeType changeType) Converts the new file path of the new diff cache output to the old diff cache representation.static String
getOldPath
(Optional<String> oldName, Patch.ChangeType changeType) Converts the old file path of the new diff cache output to the old diff cache representation.
-
Method Details
-
getOldPath
Converts the old file path of the new diff cache output to the old diff cache representation. -
getNewPath
public static String getNewPath(Optional<String> oldName, Optional<String> newName, Patch.ChangeType changeType) Converts the new file path of the new diff cache output to the old diff cache representation.
-