cucumber-jvm
cucumber-jvm copied to clipboard
Scan UuidGenerator implementations without starting them
The ideal solution would be to have the UuidGenerator return a supplier instance that keeps the state internally.
public interface UuidGenerator {
Supplier<UUID> supplier();
}
And then have the UuidGeneratorServiceLoader return that supplier only for the selected generator. Fortunately the UuidGenerator is experimental so I don't feel too bad about breaking the contract. But I'd rather avoid doing that on a patch version.
Originally posted by @mpkorstanje in https://github.com/cucumber/cucumber-jvm/issues/2931#issuecomment-2402922990