Merge pull request #1765 from sochotnicky/generate-proper-uuid

Generate proper UUID strings for new tasks
pull/1768/head
Alex Baker 2 years ago committed by GitHub
commit 65e05b85b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,15 +3,8 @@ package com.todoroo.astrid.helper;
import java.util.UUID;
public class UUIDHelper {
private static final long MIN_UUID = 100000000;
/** @return a pair consisting of the newly generated uuid and the corresponding proof text */
/** @return a newly generated uuid */
public static String newUUID() {
long uuid;
do {
uuid = UUID.randomUUID().getLeastSignificantBits() & 0x7fffffffffffffffL;
} while (uuid < MIN_UUID);
return Long.toString(uuid);
return UUID.randomUUID().toString();
}
}

Loading…
Cancel
Save