Vladsz83 commented on code in PR #12878:
URL: https://github.com/apache/ignite/pull/12878#discussion_r2932095933
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/DiscoveryMessageFactory.java:
##########
@@ -132,23 +132,21 @@
import
org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryServerOnlyCustomEventMessageSerializer;
import
org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessage;
import
org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessageSerializer;
-import org.jetbrains.annotations.Nullable;
+import org.jetbrains.annotations.NotNull;
/** Message factory for discovery messages. */
public class DiscoveryMessageFactory implements MessageFactoryProvider {
/** Custom data marshaller. */
- private final @Nullable Marshaller cstDataMarshall;
+ private final @NotNull Marshaller cstDataMarshall;
/** Class loader for the custom data marshalling. */
- private final @Nullable ClassLoader cstDataMarshallClsLdr;
+ private final @NotNull ClassLoader cstDataMarshallClsLdr;
/**
* @param cstDataMarshall Custom data marshaller.
* @param cstDataMarshallClsLdr Class loader for the custom data
marshalling.
*/
- public DiscoveryMessageFactory(@Nullable Marshaller cstDataMarshall,
@Nullable ClassLoader cstDataMarshallClsLdr) {
- assert cstDataMarshall == null && cstDataMarshallClsLdr == null ||
cstDataMarshall != null && cstDataMarshallClsLdr != null;
-
+ public DiscoveryMessageFactory(@NotNull Marshaller cstDataMarshall,
@NotNull ClassLoader cstDataMarshallClsLdr) {
Review Comment:
I see. But usually, we do not use @NotNull at all. Not-null go as is. And
@Nullable if can be null.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]