我有一个界面
public interface LdapConnectionFactory {
LdapConnectionWrapper getConnectionWrapper() throws LDAPException;
}
LdapConnectionFactoryImpl
以及实现该getConnectionWrapper()
方法的实现类。
public class LdapConnectionFactoryImpl implements LdapConnectionFactory {
...
public LdapConnectionWrapper getConnectionWrapper() throws LDAPException {
...
}
}
当我运行 checkstyle 时,它会将错误标记getConnectionWrapper()
为 - 方法“getConnectionWrapper”不是为扩展而设计的 - 需要是抽象的、最终的或空的。有什么建议吗?谢谢。