Skip to content

Commit 0a9ad1f

Browse files
committed
Add default implementation for Work#getName
Resolves #13
1 parent cfccfbd commit 0a9ad1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/jeasy/flows/work/Work.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
package org.jeasy.flows.work;
2525

26+
import java.util.UUID;
27+
2628
/**
2729
* This interface represents a unit of work. Implementations of this interface must:
2830
*
@@ -43,7 +45,9 @@ public interface Work {
4345
*
4446
* @return name of the unit of work.
4547
*/
46-
String getName();
48+
default String getName() {
49+
return UUID.randomUUID().toString();
50+
}
4751

4852
/**
4953
* Execute the unit of work and return its report. Implementations are required

0 commit comments

Comments
 (0)