This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/poi.git
The following commit(s) were added to refs/heads/trunk by this push:
new e7620b7ce7 set up default impls of new(-ish) methods
e7620b7ce7 is described below
commit e7620b7ce7f43b933843f5d53199d77a15927e6f
Author: PJ Fanning <[email protected]>
AuthorDate: Fri Dec 5 10:58:48 2025 +0100
set up default impls of new(-ish) methods
---
poi/src/main/java/org/apache/poi/ss/usermodel/CellStyle.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
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<CellPropertyType, Object> getFormatProperties();
+ default EnumMap<CellPropertyType, Object> 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
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]