mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Remove more unnecessary "throws" declarations
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201243722
This commit is contained in:
parent
47322b7fcd
commit
ad73f3d167
61 changed files with 318 additions and 331 deletions
|
@ -127,7 +127,7 @@ public final class KmsUpdater {
|
|||
* <p>The operations in this method are organized so that existing {@link KmsSecretRevision}
|
||||
* entities remain primary and decryptable if a failure occurs.
|
||||
*/
|
||||
public void update() throws IOException {
|
||||
public void update() {
|
||||
checkState(!secretValues.isEmpty(), "At least one Keyring value must be persisted");
|
||||
|
||||
persistEncryptedValues(encryptValues(secretValues));
|
||||
|
@ -139,8 +139,7 @@ public final class KmsUpdater {
|
|||
*
|
||||
* @see google.registry.config.RegistryConfigSettings#kms
|
||||
*/
|
||||
private ImmutableMap<String, EncryptResponse> encryptValues(Map<String, byte[]> keyValues)
|
||||
throws IOException {
|
||||
private ImmutableMap<String, EncryptResponse> encryptValues(Map<String, byte[]> keyValues) {
|
||||
ImmutableMap.Builder<String, EncryptResponse> encryptedValues = new ImmutableMap.Builder<>();
|
||||
for (Map.Entry<String, byte[]> entry : keyValues.entrySet()) {
|
||||
String secretName = entry.getKey();
|
||||
|
|
|
@ -272,7 +272,7 @@ abstract class CreateOrUpdateTldCommand extends MutatingCommand {
|
|||
protected abstract void initTldCommand();
|
||||
|
||||
@Override
|
||||
protected final void init() throws Exception {
|
||||
protected final void init() {
|
||||
assertAllowedEnvironment();
|
||||
initTldCommand();
|
||||
String duplicates = Joiner.on(", ").join(findDuplicates(mainParameters));
|
||||
|
|
|
@ -66,8 +66,7 @@ final class LoadSnapshotCommand extends BigqueryCommand {
|
|||
* Starts load jobs for the given snapshot kinds, and returns a map of kind name to
|
||||
* ListenableFuture representing the result of the load job for that kind.
|
||||
*/
|
||||
private Map<String, ListenableFuture<?>> loadSnapshotKinds(List<String> kindNames)
|
||||
throws Exception {
|
||||
private Map<String, ListenableFuture<?>> loadSnapshotKinds(List<String> kindNames) {
|
||||
ImmutableMap.Builder<String, ListenableFuture<?>> builder = new ImmutableMap.Builder<>();
|
||||
for (String kind : kindNames) {
|
||||
String filename = String.format(
|
||||
|
@ -79,7 +78,7 @@ final class LoadSnapshotCommand extends BigqueryCommand {
|
|||
}
|
||||
|
||||
/** Starts a load job for the specified kind name, sourcing data from the given GCS file. */
|
||||
private ListenableFuture<?> loadSnapshotFile(String filename, String kindName) throws Exception {
|
||||
private ListenableFuture<?> loadSnapshotFile(String filename, String kindName) {
|
||||
return bigquery().load(
|
||||
bigquery().buildDestinationTable(kindName)
|
||||
.description("Datastore snapshot import for " + kindName + ".")
|
||||
|
|
|
@ -61,7 +61,7 @@ public final class TeeOutputStream extends OutputStream {
|
|||
|
||||
/** Closes the stream. Any calls to a {@code write()} method after this will throw. */
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
public void close() {
|
||||
isClosed = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue