commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37985] New: - unit tests fail for commons-net-1.4.1 with NullPointerException
Date Wed, 21 Dec 2005 06:07:04 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37985>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37985

           Summary: unit tests fail for commons-net-1.4.1 with
                    NullPointerException
           Product: Commons
           Version: unspecified
          Platform: PC
               URL: https://bugs.gentoo.org/show_bug.cgi?id=116226
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: nichoj@gentoo.org


I'm working on updating the commons-net package for Gentoo to the most recent
version, 1.4.1, and ran into a problem running the unit tests:

    [junit] Testsuite: org.apache.commons.net.time.TimeTCPClientTest
    [junit] Tests run: 2, Failures: 0, Errors: 1, Time elapsed: 1.093 sec

    [junit] Testcase: testInitial took 0.009 sec
    [junit] Testcase: testCompareTimes took 1.074 sec
    [junit]     Caused an ERROR
    [junit] null
    [junit] java.lang.NullPointerException
    [junit]     at
org.apache.commons.net.SocketClient.disconnect(SocketClient.java:266)
    [junit]     at
org.apache.commons.net.time.TimeTCPClientTest.testCompareTimes(TimeTCPClientTest.java:133)


Upon further investigation into SocketClient, I found that disconnect() tried to
close a few objects, without checking that they weren't null. Adding a simple
check for null is enough to get the tests to pass.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message