Skip to content

Commit

Permalink
Remove TracingStorageConverterNotFoundException (#2358)
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu authored Oct 31, 2023
1 parent 80956cd commit bdd7637
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.elasticjob.api.JobExtraConfiguration;
import org.apache.shardingsphere.elasticjob.kernel.tracing.exception.TracingStorageConverterNotFoundException;
import org.apache.shardingsphere.elasticjob.kernel.tracing.storage.TracingStorageConverterFactory;
import org.apache.shardingsphere.infra.spi.exception.ServiceProviderNotFoundException;

/**
* Tracing configuration.
Expand All @@ -39,7 +39,7 @@ public final class TracingConfiguration<T> implements JobExtraConfiguration {
@SuppressWarnings("unchecked")
public TracingConfiguration(final String type, final T storage) {
this.type = type;
this.tracingStorageConfiguration = TracingStorageConverterFactory.findConverter((Class<T>) storage.getClass())
.orElseThrow(() -> new TracingStorageConverterNotFoundException(storage.getClass())).convertToConfiguration(storage);
tracingStorageConfiguration = TracingStorageConverterFactory.findConverter((Class<T>) storage.getClass())
.orElseThrow(() -> new ServiceProviderNotFoundException(storage.getClass(), storage.getClass().getSimpleName())).convertToConfiguration(storage);
}
}

This file was deleted.

0 comments on commit bdd7637

Please sign in to comment.