Skip to content

Commit 25cb993

Browse files
committed
Remove unneeded if/else block for validating SHA-1
1 parent 0706e9c commit 25cb993

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

app/src/main/java/com/github/mobile/core/commit/CommitUtils.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,7 @@ public static String abbreviate(final String sha) {
8181
* @return true if valid, false otherwise
8282
*/
8383
public static boolean isValidCommit(final String sha) {
84-
if (!TextUtils.isEmpty(sha))
85-
return sha.matches("[a-fA-F0-9]+");
86-
else
87-
return false;
84+
return !TextUtils.isEmpty(sha) && sha.matches("[a-fA-F0-9]+");
8885
}
8986

9087
/**

0 commit comments

Comments
 (0)