Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 19 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,32 @@
</properties>

<dependencies>
<!-- https://square.github.io/okhttp/#maven-and-jvm-projects -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.12.0</version>
<artifactId>okhttp-jvm</artifactId>
<version>5.1.0</version>
</dependency>
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>2.0.53</version>
<version>2.0.57</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
<version>2.0.17</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.22</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -48,7 +55,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.14.0</version>
<configuration>
<source>8</source>
<target>8</target>
Expand All @@ -58,7 +65,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<useReleaseProfile>false</useReleaseProfile>
Expand All @@ -69,7 +76,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -82,7 +89,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.1.0</version>
<configuration>
<docencoding>UTF-8</docencoding>
<encoding>UTF-8</encoding>
Expand All @@ -100,7 +107,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -124,7 +131,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.14.0</version>
<configuration>
<source>8</source>
<target>8</target>
Expand All @@ -134,7 +141,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ public class ExceptionUtils {

/**
* 获取实际错误原因
*
* @param e 异常
* @return cause
*/
public static Throwable getRealCause(Throwable e) {
while (true) {
if (e instanceof okhttp3.internal.connection.RouteException) {
if (e.getCause() == null) {
break;
} else {
e = e.getCause();
}
} else if (e instanceof ExecutionException) {
if (e instanceof ExecutionException) {
if (e.getCause() == null) {
break;
} else {
Expand Down Expand Up @@ -49,6 +44,7 @@ public static Throwable getRealCause(Throwable e) {

/**
* 是否是连接错误
*
* @param t 异常
* @return 结果
*/
Expand All @@ -69,6 +65,7 @@ public static boolean isConnectError(Throwable t) {

/**
* 是否超时异常
*
* @param t 异常
* @return 结果
*/
Expand Down
Loading