The HtmlRenderer class uses the following annotations:
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
From a purely stylistic standpoint, when possible we should seek to use pure Java annotations. Equivalent functionality is provided by the Validation API.
The dependency on JetBrains' library will leak into code that implements extensions, such as:
public class BlockExtension implements HtmlRenderer.HtmlRendererExtension {
public static class IdAttributeProvider implements AttributeProvider {
private static AttributeProviderFactory createFactory() {
return new IndependentAttributeProviderFactory() {
@Override
public @NotNull AttributeProvider apply(
@NotNull final LinkResolverContext context ) {
return new IdAttributeProvider();
...
Please consider using javax.validation.constraints.NotNull and other annotations from the javax package, instead, if possible.
See also: https://stackoverflow.com/a/42695253/59087
The
HtmlRendererclass uses the following annotations:From a purely stylistic standpoint, when possible we should seek to use pure Java annotations. Equivalent functionality is provided by the Validation API.
The dependency on JetBrains' library will leak into code that implements extensions, such as:
Please consider using
javax.validation.constraints.NotNulland other annotations from thejavaxpackage, instead, if possible.See also: https://stackoverflow.com/a/42695253/59087