Skip to content

Commit 5542a28

Browse files
committed
add upcast to domain resource to cast to generic type
1 parent f63b3ae commit 5542a28

File tree

1 file changed

+4
-0
lines changed
  • commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/models

1 file changed

+4
-0
lines changed

commercetools/commercetools-sdk-java-api/src/main/java/com/commercetools/api/models/DomainResource.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@ public interface DomainResource<T> {
44
public String getId();
55

66
public Long getVersion();
7+
8+
default T upcast() {
9+
return (T) this;
10+
}
711
}

0 commit comments

Comments
 (0)