All tryToClose() methods should check for null arguments.

This commit is contained in:
akwizgran
2014-04-04 18:56:55 +01:00
parent 75f13f53a0
commit e260aac3d2
4 changed files with 10 additions and 6 deletions

View File

@@ -339,7 +339,7 @@ class BluetoothPlugin implements DuplexPlugin {
private void tryToClose(StreamConnection s) {
try {
s.close();
if(s != null) s.close();
} catch(IOException e) {
if(LOG.isLoggable(WARNING)) LOG.log(WARNING, e.toString(), e);
}