More tweaks to JMX exception handling
This commit is contained in:
@@ -28,7 +28,7 @@ import reactor.core.Disposable;
|
||||
* <p>
|
||||
* Both real results and thrown exceptions are memoized.
|
||||
*/
|
||||
public class MemoizingDisposableSupplier<T> implements Supplier<T>, Disposable {
|
||||
public class MemoizingDisposableSupplier<T> implements Disposable {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(MemoizingDisposableSupplier.class);
|
||||
|
||||
@@ -73,8 +73,7 @@ public class MemoizingDisposableSupplier<T> implements Supplier<T>, Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized T get() {
|
||||
public synchronized T get() throws Exception {
|
||||
Assert.isLegal(!isDisposed());
|
||||
if (shouldCompute()) {
|
||||
lastComputed = System.currentTimeMillis();
|
||||
@@ -91,7 +90,7 @@ public class MemoizingDisposableSupplier<T> implements Supplier<T>, Disposable {
|
||||
}
|
||||
}
|
||||
if (failure!=null) {
|
||||
throw ExceptionUtil.unchecked(failure);
|
||||
throw ExceptionUtil.exception(failure);
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user