The BytesUtil.bytesEqual parameters use both the Jetbrains @NotNull
and the OpenHFT @NotNull
annotation the same parameter:
public static boolean bytesEqual(
@org.jetbrains.annotations.NotNull @NotNull RandomDataInput a, long offset,
@org.jetbrains.annotations.NotNull @NotNull RandomDataInput second, long secondOffset, long len)
throws BufferUnderflowException {
which appears redundant -- is there any reason for using both? The two annotations are (currently) defined as:
package net.openhft.chronicle.core.annotation;
@Documented
@Retention(CLASS)
@Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE})
public @interface NotNull {
}
and
package org.jetbrains.annotations;
@Documented
@Retention(CLASS)
@Target({METHOD, FIELD, PARAMETER, LOCAL_VARIABLE})
public @interface NotNull {
String value() default "";
}
so Jetbrains @NotNull
provides a default empty string value otherwise the two annotations are the same...so why specify both?