Sonar fixes
* use equals * inner assignment * local before return * unnecessary locals * catch and throw * uninstantiable with no statics * implement `Serializable` in `Comparator` to enable `TreeMap` serialization * exceptions as flow control
This commit is contained in:
committed by
Artem Bilan
parent
130e1bba31
commit
19b9944dd8
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.integration.test.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.DatagramSocket;
|
||||
import java.net.InetAddress;
|
||||
import java.net.ServerSocket;
|
||||
@@ -112,7 +113,8 @@ public final class SocketUtils {
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (@SuppressWarnings("unused") IOException e) {
|
||||
// empty
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +175,11 @@ public final class SocketUtils {
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (@SuppressWarnings("unused") IOException e) {
|
||||
// empty
|
||||
}
|
||||
catch (@SuppressWarnings("unused") InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user