Hello (my first post to the list),
I am evaluating the status of the MINA/FtpServer projects. Is the
project in good order ?
Are the projects known to work on Windows ? Win7 64bit JRE6 ? I am
also using Eclipse Helios SR2 and have the trees checked out from SVN:
https://svn.apache.org/repos/asf/mina/ftpserver/trunk (r1369117)
https://svn.apache.org/repos/asf/mina/branches/2.0 (r1369395)
The unit tests for FtpServer are not working in the development setup above.
When using "mvn test" (from eclipse) on ftpserver-core I am seeing many
failures (30+ test file failures)
If I right click the whole ftpserver-core project (using Run As -> JUnit
Test) it finds 656 tests and only 7 fail.
This is unusual, maven unit testing usually works better for a project
but the Eclipse, Run As JUnit fails.
When I investigated one of these failures:
The cause (of ftpserver-core unit test ActiveModeReplyTest failing)
I traced one matter down to the method:
Object
org.apache.mina.core.session.DefaultIoSessionData.getAttribute(IoSession,Object,Object)
At the end it returns the value of
ConcurrentHashMap<Object,Object>#putIfAbsent(key, defaultValue);
But the default return value is the old value (or null). But the caller
is expecting an existing (not-null value) or the default value to be
returned.
There maybe other methods that need a similar change.
The symptom (of ftpserver-core unit test ActiveModeReplyTest failing) :
The code in the FtpServer project the method:
int org.apache.ftpserver.impl.FtpIoSession#getMaxIdleTime();
was generating a NullPointerException, because a null was being returned
and then cast into a primitive 'int' type. The null was the previous
value for the attribute from the Map (since it did not exist).
There are many other failures.
Darryl