fixed PR format

This commit is contained in:
jianghang.loujh
2023-07-28 13:20:56 +08:00
parent b8c2a757a0
commit 97aa441bca
11 changed files with 62 additions and 67 deletions

View File

@@ -1,12 +1,6 @@
package com.alibaba.otter.canal.parse.inbound.mysql.rds;
import io.netty.handler.codec.http.HttpResponseStatus;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.*;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedList;
@@ -41,6 +35,8 @@ import org.slf4j.LoggerFactory;
import com.alibaba.otter.canal.parse.exception.CanalParseException;
import com.alibaba.otter.canal.parse.inbound.mysql.rds.data.BinlogFile;
import io.netty.handler.codec.http.HttpResponseStatus;
/**
* @author chengjin.lyf on 2018/8/7 下午3:10
* @since 1.0.25
@@ -212,7 +208,7 @@ public class BinlogDownloadQueue {
InputStream is = response.getEntity().getContent();
boolean isChunked = response.getEntity().isChunked();
Header contentLengthHeader = response.getFirstHeader("Content-Length");
long totalSize = isChunked || contentLengthHeader == null ? 0 : Long.parseLong(contentLengthHeader.getValue());
long totalSize = (isChunked || contentLengthHeader == null) ? 0 : Long.parseLong(contentLengthHeader.getValue());
if (response.getFirstHeader("Content-Disposition") != null) {
fileName = response.getFirstHeader("Content-Disposition").getValue();
fileName = StringUtils.substringAfter(fileName, "filename=");