DirCacheEditor: Cleanup DeleteTree constructor
Neaten up formatting and avoid strings, which prevents the need for NLS comment tags. Instead check the last character using char literal, and append a char literal instead of a string. Change-Id: Ib68e017769a1f5c03200354a805769d585a48c8b
This commit is contained in:
parent
110d3ca595
commit
ef757a7e12
|
@ -274,10 +274,11 @@ public static final class DeleteTree extends PathEdit {
|
|||
* only the subtree's contents are matched by the command.
|
||||
* The special case "" (not "/"!) deletes all entries.
|
||||
*/
|
||||
public DeleteTree(final String entryPath) {
|
||||
super(
|
||||
(entryPath.endsWith("/") || entryPath.length() == 0) ? entryPath //$NON-NLS-1$
|
||||
: entryPath + "/"); //$NON-NLS-1$
|
||||
public DeleteTree(String entryPath) {
|
||||
super(entryPath.isEmpty()
|
||||
|| entryPath.charAt(entryPath.length() - 1) == '/'
|
||||
? entryPath
|
||||
: entryPath + '/');
|
||||
}
|
||||
|
||||
public void apply(final DirCacheEntry ent) {
|
||||
|
|
Loading…
Reference in New Issue