Remove catch block used for debugging
@@ -16,7 +16,10 @@ import com.quorum.tessera.encryption.EncryptorFactory;
import java.util.Collection;
import java.util.Optional;
-/** Creates {@link Enclave} instances, which may point to remote services or local, in-app instances. */
+/**
+ * Creates {@link Enclave} instances, which may point to remote services or
+ * local, in-app instances.
+ */
public interface EnclaveFactory {
default Enclave createLocal(Config config) {
@@ -38,18 +41,21 @@ public interface EnclaveFactory {
}
/**
- * Determines from the provided configuration whether to construct a client to a remote service, or to create a
- * local instance.
+ * Determines from the provided configuration whether to construct a client
+ * to a remote service, or to create a local instance.
*
- * <p>If a remote instance is requested, it is constructed from a {@link EnclaveClientFactory}.
+ * <p>
+ * If a remote instance is requested, it is constructed from a
+ * {@link EnclaveClientFactory}.
*
- * @param config the global configuration to use to create a remote enclave connection
+ * @param config the global configuration to use to create a remote enclave
+ * connection
* @return the {@link Enclave}, which may be either local or remote
*/
default Enclave create(Config config) {
- try {
- final Optional<ServerConfig> enclaveServerConfig =
- config.getServerConfigs().stream().filter(sc -> sc.getApp() == AppType.ENCLAVE).findAny();
+
+ final Optional<ServerConfig> enclaveServerConfig
+ = config.getServerConfigs().stream().filter(sc -> sc.getApp() == AppType.ENCLAVE).findAny();
// FIXME: this is needs to create a holder instance .
KeyEncryptorFactory.newFactory().create(config.getEncryptor());
@@ -59,13 +65,11 @@ public interface EnclaveFactory {
}
return createServer(config);
- } catch (Throwable ex) {
- ex.printStackTrace();
- throw ex;
- }
+
}
static EnclaveFactory create() {
- return ServiceLoaderUtil.load(EnclaveFactory.class).orElse(new EnclaveFactory() {});
+ return ServiceLoaderUtil.load(EnclaveFactory.class).orElse(new EnclaveFactory() {
+ });
}
}
