From 7e5e9fcc6214baf81b4d759041b691ac5f859cc9 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Wed, 20 Dec 2023 08:14:13 +0000 Subject: [PATCH] try to javadoc more unsupported methods git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1914791 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/common/usermodel/fonts/FontFacet.java | 2 ++ .../java/org/apache/poi/common/usermodel/fonts/FontInfo.java | 4 ++++ .../main/java/org/apache/poi/ss/usermodel/DataFormatter.java | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontFacet.java b/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontFacet.java index 5fb16908cd..0489b58ff4 100644 --- a/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontFacet.java +++ b/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontFacet.java @@ -45,6 +45,7 @@ public interface FontFacet { * Set the font weight * * @param weight the font weight + * @throws UnsupportedOperationException can return UnsupportedOperationException when FontFacet is read-only */ default void setWeight(int weight) { throw new UnsupportedOperationException("FontFacet is read-only."); @@ -61,6 +62,7 @@ public interface FontFacet { * Set the font posture * * @param italic {@code true} for italic, {@code false} for regular + * @throws UnsupportedOperationException can return UnsupportedOperationException when FontFacet is read-only */ default void setItalic(boolean italic) { throw new UnsupportedOperationException("FontFacet is read-only."); diff --git a/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontInfo.java b/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontInfo.java index 984e86eb86..a60001acce 100644 --- a/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontInfo.java +++ b/poi/src/main/java/org/apache/poi/common/usermodel/fonts/FontInfo.java @@ -69,6 +69,7 @@ public interface FontInfo { * * @param typeface the full name of the font, when {@code null} removes the font definition - * removal is implementation specific + * @throws UnsupportedOperationException can return UnsupportedOperationException when FontInfo is read-only */ default void setTypeface(String typeface) { throw new UnsupportedOperationException("FontInfo is read-only."); @@ -85,6 +86,7 @@ public interface FontInfo { * Sets the charset * * @param charset the charset + * @throws UnsupportedOperationException can return UnsupportedOperationException when FontInfo is read-only */ default void setCharset(FontCharset charset) { throw new UnsupportedOperationException("FontInfo is read-only."); @@ -101,6 +103,7 @@ public interface FontInfo { * Sets the font family class * * @param family the font family class + * @throws UnsupportedOperationException can return UnsupportedOperationException when FontInfo is read-only */ default void setFamily(FontFamily family) { throw new UnsupportedOperationException("FontInfo is read-only."); @@ -134,6 +137,7 @@ public interface FontInfo { /** * Set the panose in binary form * @param panose the panose bytes + * @throws UnsupportedOperationException can return UnsupportedOperationException when FontInfo is read-only */ default void setPanose(byte[] panose) { throw new UnsupportedOperationException("FontInfo is read-only."); diff --git a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java index fe14527066..35e5ff55d6 100644 --- a/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java +++ b/poi/src/main/java/org/apache/poi/ss/usermodel/DataFormatter.java @@ -814,7 +814,7 @@ public class DataFormatter { } else if (obj instanceof Double) { obj = (Double) obj / divider.doubleValue(); } else { - throw new UnsupportedOperationException(); + throw new UnsupportedOperationException("cannot scaleInput of type " + obj.getClass()); } } return obj; -- 2.39.5