-
Notifications
You must be signed in to change notification settings - Fork 15
Remove the conjure-java-jersey-server dependency #6213
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; | ||
|
@@ -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", | ||
UnsafeArg.of("tableName", tableName)); | ||
return TableReference.createFromFullyQualifiedName(tableName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: we should clean up
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we have errorprones which will automatically perform that migration? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Negative Ghostrider. I ran There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Draft PR #6223 to migrate more Guava -> logsafe Preconditions |
||
} | ||
|
||
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", | ||
UnsafeArg.of("tableName", tableName)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
} | ||
|
||
private SweepResults runFullSweepWithoutSavingResults( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can use
LoggingArgs.safeInternalTableName
here.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated both