Package com.google.gerrit.server.patch
Class FilePathAdapter
- java.lang.Object
-
- com.google.gerrit.server.patch.FilePathAdapter
-
public class FilePathAdapter extends Object
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
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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 Detail
-
getOldPath
public 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.
-
-