@Test public void get_doesntWrapRuntimeException() throws Exception { RuntimeException exception = new RuntimeException("Failure initializing Storage lease manager"); LazyRegisterEventProcessorFactoryWithHost lazy = new TestLazyRegisterEventProcessorFactoryWithHost() { @Override Future<?> registerEventProcessorFactoryWithHost() throws Exception { throw exception; } }; thrown.expect(is(exception)); lazy.get(); }
Future<?> get() { if (future == null) { synchronized (this) { if (future == null) { future = compute(); } } } return future; }
LazyRegisterEventProcessorFactoryWithHost { Future<?> get() { if (future == null) { synchronized (this) { if (future == null) { future = compute(); } } } return future; } }
LazyRegisterEventProcessorFactoryWithHost { Future<?> get() { if (future == null) { synchronized (this) { if (future == null) { future = compute(); } } } return future; } LazyRegisterEventProcessorFactoryWithHost(EventHubCollector.Builder builder); }
LazyRegisterEventProcessorFactoryWithHost { Future<?> get() { if (future == null) { synchronized (this) { if (future == null) { future = compute(); } } } return future; } LazyRegisterEventProcessorFactoryWithHost(EventHubCollector.Builder builder);  }
LazyRegisterEventProcessorFactoryWithHost { Future<?> get() { if (future == null) { synchronized (this) { if (future == null) { future = compute(); } } } return future; } LazyRegisterEventProcessorFactoryWithHost(EventHubCollector.Builder builder);   }