commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1090070 - /commons/proper/net/trunk/src/main/java/org/apache/commons/net/DatagramSocketClient.java
Date Fri, 08 Apr 2011 00:33:32 GMT
Author: sebb
Date: Fri Apr  8 00:33:32 2011
New Revision: 1090070

URL: http://svn.apache.org/viewvc?rev=1090070&view=rev
Log:
Protect against potential NPE

Modified:
    commons/proper/net/trunk/src/main/java/org/apache/commons/net/DatagramSocketClient.java

Modified: commons/proper/net/trunk/src/main/java/org/apache/commons/net/DatagramSocketClient.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/org/apache/commons/net/DatagramSocketClient.java?rev=1090070&r1=1090069&r2=1090070&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/org/apache/commons/net/DatagramSocketClient.java
(original)
+++ commons/proper/net/trunk/src/main/java/org/apache/commons/net/DatagramSocketClient.java
Fri Apr  8 00:33:32 2011
@@ -154,7 +154,9 @@ public abstract class DatagramSocketClie
      ***/
     public void close()
     {
-        _socket_.close();
+        if (_socket_ != null) {
+            _socket_.close();
+        }
         _socket_ = null;
         _isOpen_ = false;
     }



Mime
View raw message