1 | package fr.sii.ogham.core.id.generator; | |
2 | ||
3 | import static java.nio.charset.StandardCharsets.UTF_8; | |
4 | ||
5 | import java.util.UUID; | |
6 | ||
7 | /** | |
8 | * Generates a {@link UUID} from the provided name. | |
9 | * | |
10 | * @author Aurélien Baudet | |
11 | * | |
12 | */ | |
13 | public class UUIDGenerator implements IdGenerator { | |
14 | ||
15 | @Override | |
16 | public String generate(String name) { | |
17 |
1
1. generate : replaced return value with "" for fr/sii/ogham/core/id/generator/UUIDGenerator::generate → NO_COVERAGE |
return UUID.nameUUIDFromBytes(name.getBytes(UTF_8)).toString(); |
18 | } | |
19 | ||
20 | } | |
Mutations | ||
17 |
1.1 |