From 2bd196c77722984445aeed858a0b315726e8dd36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Mino?= Date: Mon, 17 May 2021 00:27:54 +0200 Subject: [PATCH] Polish ProtobufMessageBuilderRandomizer --- .../protobuf/ProtobufMessageBuilderRandomizer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/io/github/murdos/easyrandom/protobuf/ProtobufMessageBuilderRandomizer.java b/src/main/java/io/github/murdos/easyrandom/protobuf/ProtobufMessageBuilderRandomizer.java index 1d0af01..4d71a24 100644 --- a/src/main/java/io/github/murdos/easyrandom/protobuf/ProtobufMessageBuilderRandomizer.java +++ b/src/main/java/io/github/murdos/easyrandom/protobuf/ProtobufMessageBuilderRandomizer.java @@ -20,6 +20,9 @@ import org.jeasy.random.EasyRandomParameters; import org.jeasy.random.api.Randomizer; +/** + * Generate a random Protobuf {@link Message.Builder}. + */ public class ProtobufMessageBuilderRandomizer implements Randomizer { private final ProtobufMessageRandomizer protobufMessageRandomizer; @@ -37,6 +40,7 @@ public ProtobufMessageBuilderRandomizer( ); } + @SuppressWarnings("unchecked") private static Class retrieveMessageClassFromBuilderClass(Class messageBuilderClass) { return (Class) messageBuilderClass.getEnclosingClass(); } @@ -45,4 +49,8 @@ private static Class retrieveMessageClassFromBuilderClass(Class