Simplify MagicBranch.isMagicBranch()

Change-Id: If622e65ac38b71e8e63d92714c303d6884048a58
This commit is contained in:
Shawn Pearce
2013-02-27 16:10:35 -08:00
parent 54a6addc0a
commit 9baff9d299

View File

@@ -46,12 +46,9 @@ public final class MagicBranch {
/** Checks if the supplied ref name is a magic branch */
public static boolean isMagicBranch(String refName) {
if (refName.startsWith(NEW_DRAFT_CHANGE) ||
refName.startsWith(NEW_PUBLISH_CHANGE) ||
refName.startsWith(NEW_CHANGE)) {
return true;
}
return false;
return refName.startsWith(NEW_DRAFT_CHANGE)
|| refName.startsWith(NEW_PUBLISH_CHANGE)
|| refName.startsWith(NEW_CHANGE);
}
/** Returns the ref name prefix for a magic branch, <code>null</code> if the branch is not magic */