IIRC, FTP встроен к.NET, (Система. Сеть. FtpWebRequest), и в прошлый раз, когда я смотрел (несколько лет назад, по общему признанию) я не мог найти свободный SSH / блоки SFTP. Это, возможно, изменилось, все же.
Я не уверен, что Fiundbug может справиться со следующей аннотацией, но если вы хотите аннотировать весь пакет с помощью «NonNull», вы можете использовать:
@ParametersAreNonnullByDefault
/**
* This annotation can be applied to a package, class or method to indicate that
* the method parameters in that element are nonnull by default unless there is:
* <ul>
* <li>An explicit nullness annotation
* <li>The method overrides a method in a superclass (in which case the
* annotation of the corresponding parameter in the superclass applies)
* <li> there is a default parameter annotation applied to a more tightly nested
* element.
* </ul>
*
*/
@Documented
@Nonnull
@TypeQualifierDefault(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface ParametersAreNonnullByDefault {
}
См. Также эту статью .
Примечание: по крайней мере, эта аннотация присутствует в некоторых тестовых примерах FindBugs .