java: type annotation @org.jspecify.annotations.Nullable is not expected here
(to annotate a qualified type, write ....__AttributeEnum.@org.jspecify.annotations.Nullable ....__AttributeEnum.__OfString)
Я получил ошибку в следующем коде. [code] public @Nullable String getWhatever() { return whatever; }
public void setWhatever(@Nullable final String whatever) { this.whatever = whatever; }
public @Nullable E getWhateverAsEnum(final Class enumClass) { return Optional.ofNullable(getWhatever()) .map(v -> __AttributeEnumUtils.valueOfAttributeValue(enumClass, v)) .orElse(null); }
public void setWhateverFromEnum(@Nullable final __AttributeEnum.__OfString enumValue) { ^^^^^^^^^ setWhatever( Optional.ofNullable(enumValue) .map(__AttributeEnum.__OfString::attributeValue) .orElse(null) ); } [/code] [img]https://i.sstatic.net/82uV4jxT.png[/img] [code]java: type annotation @org.jspecify.annotations.Nullable is not expected here (to annotate a qualified type, write ....__AttributeEnum.@org.jspecify.annotations.Nullable ....__AttributeEnum.__OfString) [/code] Что между ними не так? Как я могу это исправить?