Exemplo n.º 1
0
 /**
  * Parse to a ProtocolHashedVersion from a given string version/base64-hash combination.
  *
  * @param startVersion the starting version
  * @param base64Hash the base64 hash
  * @throws IllegalArgumentException on bad data
  * @return a parsed protobuf object
  */
 private static ProtocolHashedVersion parseFromUnsafe(String startVersion, String base64Hash)
     throws IllegalArgumentException {
   return ProtocolHashedVersion.newBuilder()
       .setVersion(Long.parseLong(startVersion))
       .setHistoryHash(Base64Util.decode(base64Hash))
       .build();
 }