private static String parseVersionId(String query) {
    if (query != null) {
      String[] params = VERSION_ID_PATTERN.split(query);
      for (String param : params) {
        if (param.startsWith("versionId=")) {
          return decode(param.substring(10));
        }
      }
    }
    return null;
  }
Attempts to parse a versionId parameter from the query
string.

@param query the query string to parse (possibly null)
@return the versionId (possibly null)
src/main/java/com/creactiviti/piper/taskhandler/s3/AmazonS3URI.java