Skip to content

Commit

Permalink
fix remaing warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Apache9 committed Sep 17, 2022
1 parent be568f5 commit 41f1ecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1475,18 +1475,12 @@ public static ServerInfo getServerInfo(final RpcController controller,
}
}

/**
* @see #buildGetServerInfoRequest()
*/
private static GetServerInfoRequest GET_SERVER_INFO_REQUEST =
GetServerInfoRequest.newBuilder().build();

/**
* Create a new GetServerInfoRequest
* @return a GetServerInfoRequest
*/
public static GetServerInfoRequest buildGetServerInfoRequest() {
return GET_SERVER_INFO_REQUEST;
return GetServerInfoRequest.getDefaultInstance();
}

public static ScanMetrics toScanMetrics(final byte[] bytes) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public static ByteString wrap(final byte[] array, int offset, int length) {
* of a {@code LiteralByteString}.
* @return byte[] representation
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "MS_EXPOSE_REP",
justification = "by design")
public static byte[] zeroCopyGetBytes(final ByteString buf) {
if (buf instanceof LiteralByteString) {
return ((LiteralByteString) buf).bytes;
Expand Down

0 comments on commit 41f1ecf

Please sign in to comment.