HBASE-9232 Fix javadoc warning and a few findbugs items
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1514309 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1fe8c622c9
commit
58ee2bbf24
|
@ -466,6 +466,8 @@ public class RpcClient {
|
|||
* It is up to the user code to check this status.
|
||||
* @param call to add
|
||||
*/
|
||||
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NN_NAKED_NOTIFY",
|
||||
justification="Notify because new call available for processing")
|
||||
protected synchronized void addCall(Call call) {
|
||||
// If the connection is about to close, we manage this as if the call was already added
|
||||
// to the connection calls list. If not, the connection creations are serialized, as
|
||||
|
@ -1149,6 +1151,8 @@ public class RpcClient {
|
|||
cleanupCalls(0);
|
||||
}
|
||||
|
||||
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NN_NAKED_NOTIFY",
|
||||
justification="Notify because timedout")
|
||||
protected void cleanupCalls(long rpcTimeout) {
|
||||
Iterator<Entry<Integer, Call>> itor = calls.entrySet().iterator();
|
||||
while (itor.hasNext()) {
|
||||
|
@ -1184,9 +1188,7 @@ public class RpcClient {
|
|||
}
|
||||
if (!shouldCloseConnection.get()) {
|
||||
closeException = null;
|
||||
if (socket != null) {
|
||||
socket.setSoTimeout((int) rpcTimeout);
|
||||
}
|
||||
setSocketTimeout(socket, (int) rpcTimeout);
|
||||
}
|
||||
} catch (SocketException e) {
|
||||
LOG.debug("Couldn't lower timeout, which may result in longer than expected calls");
|
||||
|
@ -1194,6 +1196,14 @@ public class RpcClient {
|
|||
}
|
||||
}
|
||||
|
||||
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="IS2_INCONSISTENT_SYNC",
|
||||
justification="Presume sync not needed setting socket timeout")
|
||||
private static void setSocketTimeout(final Socket socket, final int rpcTimeout)
|
||||
throws java.net.SocketException {
|
||||
if (socket == null) return;
|
||||
socket.setSoTimeout(rpcTimeout);
|
||||
}
|
||||
|
||||
/**
|
||||
* Client-side call timeout
|
||||
*/
|
||||
|
|
|
@ -310,6 +310,8 @@ public class TablePermission extends Permission {
|
|||
}
|
||||
|
||||
@Override
|
||||
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_NULL_ON_SOME_PATH",
|
||||
justification="Passed on construction except on constructor not to be used")
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof TablePermission)) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue