diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/CellStyle.java b/poi/src/main/java/org/apache/poi/ss/usermodel/CellStyle.java index b6c810e43a..d95a1558b0 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/CellStyle.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/CellStyle.java @@ -19,6 +19,8 @@ package org.apache.poi.ss.usermodel; import java.util.EnumMap; +import org.apache.poi.ss.util.CellUtil; + public interface CellStyle { /** @@ -401,7 +403,9 @@ public interface CellStyle { * @see org.apache.poi.ss.util.CellUtil#getFormatProperties(CellStyle) * @since 5.5.0 */ - EnumMap getFormatProperties(); + default EnumMap getFormatProperties() { + return CellUtil.getFormatProperties(this); + } /** * Invalidate any cached properties. The CellStyle implementations @@ -411,5 +415,7 @@ public interface CellStyle { * * @since 5.5.0 */ - void invalidateCachedProperties(); + default void invalidateCachedProperties() { + // default implementation does nothing + } }