Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Commit

Permalink
Remove the conjure-java-jersey-server dependency (#6213)
Browse files Browse the repository at this point in the history
Remove the conjure-java-jersey-server dependency

This was only needed for WebPreconditions, which wasn't actually
needed since we were not checking any Jersey exceptions.
  • Loading branch information
mglazer authored Sep 9, 2022
1 parent b953838 commit 5581cec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion atlasdb-impl-shared/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ dependencies {

implementation 'com.github.ben-manes.caffeine:caffeine'
implementation 'com.palantir.common:streams'
implementation 'com.palantir.conjure.java.runtime:conjure-java-jersey-server'
implementation 'com.palantir.conjure.java.runtime:conjure-java-jackson-serialization'
implementation 'com.palantir.safe-logging:safe-logging'
implementation 'com.palantir.safe-logging:preconditions'
Expand Down Expand Up @@ -70,6 +69,7 @@ dependencies {
testImplementation 'com.palantir.conjure.java.api:errors'
testImplementation 'com.palantir.conjure.java.api:service-config'
testImplementation 'com.palantir.conjure.java.api:ssl-config'
testImplementation 'com.palantir.conjure.java.runtime:conjure-java-jersey-server'
testImplementation 'com.palantir.conjure.java.runtime:conjure-java-jaxrs-client'
testImplementation 'com.palantir.refreshable:refreshable'
testImplementation 'io.dropwizard.metrics:metrics-core'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.palantir.atlasdb.keyvalue.api.SweepResults;
import com.palantir.atlasdb.keyvalue.api.TableReference;
import com.palantir.atlasdb.logging.LoggingArgs;
import com.palantir.conjure.java.server.jersey.WebPreconditions;
import com.palantir.logsafe.Preconditions;
import com.palantir.logsafe.SafeArg;
import com.palantir.logsafe.UnsafeArg;
import com.palantir.logsafe.logger.SafeLogger;
Expand Down Expand Up @@ -126,16 +126,18 @@ private SweepBatchConfig buildConfigWithOverrides(
}

private TableReference getTableRef(String tableName) {
WebPreconditions.checkArgument(
TableReference.isFullyQualifiedName(tableName), "Table name {} is not fully qualified", tableName);
Preconditions.checkArgument(
TableReference.isFullyQualifiedName(tableName),
"Table name is not fully qualified",
LoggingArgs.safeInternalTableName(tableName));
return TableReference.createFromFullyQualifiedName(tableName);
}

private void checkTableExists(String tableName, TableReference tableRef) {
WebPreconditions.checkArgument(
Preconditions.checkArgument(
specificTableSweeper.getKvs().getAllTableNames().contains(tableRef),
"Table requested to sweep %s does not exist",
tableName);
"Table requested to sweep does not exist",
LoggingArgs.safeInternalTableName(tableName));
}

private SweepResults runFullSweepWithoutSavingResults(
Expand Down

0 comments on commit 5581cec

Please sign in to comment.