Hi,

The authority error is an easy fix. In your file:

C:\projects\ftpserver\core\src\main\java\org\apache\ftpserver\usermanager\BaseUs
er.java

There is a method at the end of the class, change it to look like this:

                These are the changes  ---> v  v
                                            v  v
                                            v  v

   public Authority[] getAuthorities(Class<? extends Authority> clazz) {
        List<Authority> selected = new ArrayList<Authority>();

        for (int i = 0; i < authorities.length; i++) {
            if (authorities[i].getClass().equals(clazz)) {
                selected.add(authorities[i]);
            }
        }

        return selected.toArray(new Authority[0]);
   }

Just add the '? extends' in the parameter field.

Once that is done, try to rebuild, it should be okay.

Andy Thomson


Edgar Poce wrote:
Hi

 I'm trying to embed ftpserver in a test case but I wasn't able to get
a working version.
 I tried to download ftpserver but the link is broken[1]. Then I
followed the build instructions[2] but I get the following exception
during compilation.

C:\projects\ftpserver\core\src\main\java\org\apache\ftpserver\usermanager\BaseUs
er.java:[46,0] org.apache.ftpserver.usermanager.BaseUser is not abstract and doe
s not override abstract method getAuthorities(java.lang.Class<? extends org.apac
he.ftpserver.ftplet.Authority>) in org.apache.ftpserver.ftplet.User

Any idea about how can I compile it or download the binaries?

thanks in advance,
edgar

[1] http://mina.apache.org/ftpserver-downloads.html
[2] http://mina.apache.org/building-ftpserver.html

Reply via email to