Apache Commons logo Apache Commons Net™ logo

Migration How-To

This how-to lists the migration steps for moving between versions of Apache Commons Net.

Commons Net 3.x to Commons Net 3.5

Version 3.5 is binary compatible with previous 3.x versions and 2.0. There should be no changes required to existing binary code.

Version 3.5 is source compatible with 3.4. However, version 3.4 is not source compatible with 3.3.

The interface NtpV3Packet has been updated to add 3 new methods. Adding methods to an interface does not affect binary compatibility The clirr report shows which methods have been added. (note that the report does not distinguish between source and binary incompatibility) Code that uses the interface will need to be updated and recompiled. However code that uses the implementation class NtpV3Impl will continue to work as before.

Commons Net 2.x to Commons Net 3.0

Version 3.0 is binary compatible with version 2.0. There should be no changes required to existing binary code.

However, version 3.0 is not source compatible with 2.0.

Several obsolete/unused constants have been removed.
(Such changes do not affect binary code, because compilers are required to localise constants).
The clirr report shows which constants have been removed. If any source code happens to be using one of these constants, then the source will have to be updated.

Also, some throws clauses have been removed from methods which did not actually throw them.
Throws clauses are not part of method signatures, so do not affect binary compatibility.
The following public methods no longer throw IOException:

  • TelnetClient#addOptionHandler(TelnetOptionHandler)
  • TelnetClient#deleteOptionHandler(int)
Source code using these methods will need to be updated.

Commons Net 1.4.x to Commons Net 2.0

Version 2.0 requires a JDK 5.0+ runtime. It has also been tested on JDK 6.0. There should be no changes required to existing client code.

NetComponents 1.3.8 to Commons Net 1.x

This version is a drop in replacement for NetComponents. Only package names have changed.

  1. Change all occurrences of com.oroinc.net.* to org.apache.commons.net.*
  2. Change all occurrences of com.oroinc.io.* to org.apache.commons.net.io.*
  3. Change all occurrences of com.oroinc.util.* to org.apache.commons.net.util.*