From 2ee532df354c69782331d9c92b1b49789fd29f09 Mon Sep 17 00:00:00 2001 From: Dmitry Radchuk Date: Thu, 6 Feb 2025 20:41:44 +0000 Subject: [PATCH] Add missing javadocs DEVSIX-8872 Autoported commit. Original commit hash: [2eca9207c] Manual files: commons/src/main/java/com/itextpdf/commons/datastructures/ConcurrentHashSet.java io/src/main/java/com/itextpdf/io/exceptions/ExceptionUtil.java --- itext/itext.io/itext/io/colors/IccProfile.cs | 3 ++- .../io/exceptions/FontCompressionException.cs | 20 +++++++++++++++++++ .../itext/io/font/constants/FontResources.cs | 1 + .../itext/io/font/constants/FontStretches.cs | 1 + .../itext/io/font/constants/FontStyles.cs | 1 + .../itext/io/font/constants/FontWeights.cs | 18 +++++++++++++++++ port-hash | 2 +- 7 files changed, 44 insertions(+), 2 deletions(-) diff --git a/itext/itext.io/itext/io/colors/IccProfile.cs b/itext/itext.io/itext/io/colors/IccProfile.cs index 3eecbd3b8..956790722 100644 --- a/itext/itext.io/itext/io/colors/IccProfile.cs +++ b/itext/itext.io/itext/io/colors/IccProfile.cs @@ -27,7 +27,7 @@ You should have received a copy of the GNU Affero General Public License using iText.IO.Source; namespace iText.IO.Colors { - /// Class used to represented the International Color Consortium profile + /// Class used to represent the International Color Consortium profile public class IccProfile { protected internal byte[] data; @@ -35,6 +35,7 @@ public class IccProfile { private static IDictionary cstags = new Dictionary(); + /// Creates a new, empty icc profile. protected internal IccProfile() { } diff --git a/itext/itext.io/itext/io/exceptions/FontCompressionException.cs b/itext/itext.io/itext/io/exceptions/FontCompressionException.cs index 83cd4e9ad..c94e6e84f 100644 --- a/itext/itext.io/itext/io/exceptions/FontCompressionException.cs +++ b/itext/itext.io/itext/io/exceptions/FontCompressionException.cs @@ -24,14 +24,34 @@ You should have received a copy of the GNU Affero General Public License using iText.Commons.Exceptions; namespace iText.IO.Exceptions { + /// General compressed font parsing exception. public class FontCompressionException : ITextException { + /// + /// Creates a new + /// . + /// public FontCompressionException() { } + /// + /// Creates a new + /// . + /// + /// the detail message public FontCompressionException(String message) : base(message) { } + /// + /// Creates a new + /// . + /// + /// the detail message + /// + /// the cause (which is saved for later retrieval by + /// + /// method) + /// public FontCompressionException(String message, Exception cause) : base(message, cause) { } diff --git a/itext/itext.io/itext/io/font/constants/FontResources.cs b/itext/itext.io/itext/io/font/constants/FontResources.cs index 344ef96b0..bb0ed41b4 100644 --- a/itext/itext.io/itext/io/font/constants/FontResources.cs +++ b/itext/itext.io/itext/io/font/constants/FontResources.cs @@ -23,6 +23,7 @@ You should have received a copy of the GNU Affero General Public License using System; namespace iText.IO.Font.Constants { + /// Font resources paths. public sealed class FontResources { private FontResources() { } diff --git a/itext/itext.io/itext/io/font/constants/FontStretches.cs b/itext/itext.io/itext/io/font/constants/FontStretches.cs index 22e779ab6..1d455c9bb 100644 --- a/itext/itext.io/itext/io/font/constants/FontStretches.cs +++ b/itext/itext.io/itext/io/font/constants/FontStretches.cs @@ -23,6 +23,7 @@ You should have received a copy of the GNU Affero General Public License using System; namespace iText.IO.Font.Constants { + /// Font stretch constants and ids public sealed class FontStretches { private FontStretches() { } diff --git a/itext/itext.io/itext/io/font/constants/FontStyles.cs b/itext/itext.io/itext/io/font/constants/FontStyles.cs index 2c9f63e0a..37bd8ea84 100644 --- a/itext/itext.io/itext/io/font/constants/FontStyles.cs +++ b/itext/itext.io/itext/io/font/constants/FontStyles.cs @@ -21,6 +21,7 @@ You should have received a copy of the GNU Affero General Public License along with this program. If not, see . */ namespace iText.IO.Font.Constants { + /// Font styles ids public sealed class FontStyles { private FontStyles() { } diff --git a/itext/itext.io/itext/io/font/constants/FontWeights.cs b/itext/itext.io/itext/io/font/constants/FontWeights.cs index 15385a217..f48d4be71 100644 --- a/itext/itext.io/itext/io/font/constants/FontWeights.cs +++ b/itext/itext.io/itext/io/font/constants/FontWeights.cs @@ -23,6 +23,7 @@ You should have received a copy of the GNU Affero General Public License using System; namespace iText.IO.Font.Constants { + /// Font weight values and utility methods public sealed class FontWeights { private FontWeights() { } @@ -54,6 +55,9 @@ private FontWeights() { // Font weight Black (Heavy) public const int BLACK = 900; + /// Parses font weight constant to corresponding value. + /// weight constant + /// corresponding weight int value public static int FromType1FontWeight(String weight) { int fontWeight = NORMAL; switch (weight.ToLowerInvariant()) { @@ -119,6 +123,20 @@ public static int FromType1FontWeight(String weight) { return fontWeight; } + /// + /// Normalize font weight to either + /// + /// or + /// . + /// + /// font weight int value + /// + /// either + /// + /// or + /// + /// based on a given weight value + /// public static int NormalizeFontWeight(int fontWeight) { fontWeight = (fontWeight / 100) * 100; if (fontWeight < iText.IO.Font.Constants.FontWeights.THIN) { diff --git a/port-hash b/port-hash index 6d243a4b2..91c4d4d21 100644 --- a/port-hash +++ b/port-hash @@ -1 +1 @@ -dfcc46546d23280484f6c391364b455879cadb5d +2eca9207caa3e4bbf69409e58168ce59a6cd1c64