Skip to content

Commit

Permalink
Remove compile dependency on openapi-generator
Browse files Browse the repository at this point in the history
- Replace usage of commons-lang's StringUtils in RetryUtil (add unit test)
  • Loading branch information
clementdenis committed Jun 26, 2023
1 parent f162c3d commit 6d8e825
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 41 deletions.
28 changes: 0 additions & 28 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,34 +137,6 @@
<artifactId>handlebars-jackson2</artifactId>
<version>${com.github.jknack.handlebars.version}</version>
</dependency>

<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
<version>${openapi-generator.version}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.jknack</groupId>
<artifactId>handlebars</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
11 changes: 0 additions & 11 deletions impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@
<groupId>com.okta.sdk</groupId>
<artifactId>okta-sdk-api</artifactId>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
<version>6.4.0</version>
<exclusions>
<exclusion>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions impl/src/main/java/com/okta/sdk/impl/retry/RetryUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
*/
package com.okta.sdk.impl.retry;

import org.apache.commons.lang3.StringUtils;
import org.apache.hc.core5.http.Header;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.ProtocolException;
import org.apache.hc.core5.util.TextUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -76,6 +76,6 @@ static Date dateFromHeader(HttpResponse response) {

static long getRateLimitResetValue(HttpResponse response) {
Header header = response.getFirstHeader("x-rate-limit-reset");
return header != null && StringUtils.isNotBlank(header.getValue()) ? Long.parseLong(header.getValue()) : -1L;
return header != null && !TextUtils.isBlank(header.getValue()) ? Long.parseLong(header.getValue()) : -1L;
}
}

0 comments on commit 6d8e825

Please sign in to comment.