diff --git a/pom.xml b/pom.xml
index d1b3a78..5748c69 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
4.0.0
net.helenus
helenus-core
- 2.0.34-SNAPSHOT
+ 2.0.35-SNAPSHOT
jar
helenus
diff --git a/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java b/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java
index ba99e2a..f4bf79b 100644
--- a/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java
+++ b/src/main/java/net/helenus/core/operation/AbstractOptionalOperation.java
@@ -67,7 +67,7 @@ public abstract class AbstractOptionalOperation sync(UnitOfWork uow) {
- Objects.requireNonNull(uow, "Unit of Work should not be null.");
+ if (uow == null) return sync();
final Timer.Context context = requestLatency.time();
try {
@@ -112,8 +112,7 @@ public abstract class AbstractOptionalOperation> async(UnitOfWork uow) {
- Objects.requireNonNull(uow, "Unit of Work should not be null.");
-
+ if (uow == null) return async();
return CompletableFuture.>supplyAsync(() -> sync(uow));
}
diff --git a/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java b/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java
index ff80787..6cec8f9 100644
--- a/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java
+++ b/src/main/java/net/helenus/core/operation/AbstractStreamOperation.java
@@ -72,7 +72,7 @@ public abstract class AbstractStreamOperation sync(UnitOfWork uow) {
- Objects.requireNonNull(uow, "Unit of Work should not be null.");
+ if (uow == null) return sync();
final Timer.Context context = requestLatency.time();
try {
@@ -110,8 +110,7 @@ public abstract class AbstractStreamOperation> async(UnitOfWork uow) {
- Objects.requireNonNull(uow, "Unit of Work should not be null.");
-
+ if (uow == null) return async();
return CompletableFuture.>supplyAsync(() -> sync(uow));
}