Skip to content

Commit 64c3630

Browse files
Evgeniy PrudnikoviText-CI
authored andcommitted
Reduce logging level to WARN while flattening a signature field without N entry
DEVSIX-4920 Autoported commit. Original commit hash: [b40620394]
1 parent f2528a9 commit 64c3630

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

itext.tests/itext.forms.tests/itext/forms/FlatteningTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ source product.
4141
4242
*/
4343
using System;
44+
using iText.Forms.Exceptions;
4445
using iText.Kernel.Pdf;
4546
using iText.Kernel.Utils;
4647
using iText.Test;
@@ -71,7 +72,7 @@ public virtual void FlatteningFormFieldNoSubtypeInAPTest() {
7172
}
7273

7374
[NUnit.Framework.Test]
74-
[LogMessage(iText.IO.Logs.IoLogMessageConstant.N_ENTRY_IS_REQUIRED_FOR_APPEARANCE_DICTIONARY)]
75+
[LogMessage(FormsExceptionMessageConstant.N_ENTRY_IS_REQUIRED_FOR_APPEARANCE_DICTIONARY)]
7576
public virtual void FormFlatteningTestWithoutNEntry() {
7677
String filename = "formFlatteningTestWithoutNEntry";
7778
String src = sourceFolder + filename + ".pdf";

itext/itext.forms/itext/forms/PdfAcroForm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ public virtual void FlattenFields() {
833833
}
834834
}
835835
else {
836-
LOGGER.LogError(iText.IO.Logs.IoLogMessageConstant.N_ENTRY_IS_REQUIRED_FOR_APPEARANCE_DICTIONARY);
836+
LOGGER.LogWarning(FormsExceptionMessageConstant.N_ENTRY_IS_REQUIRED_FOR_APPEARANCE_DICTIONARY);
837837
}
838838
PdfArray fFields = GetFields();
839839
fFields.Remove(fieldObject);

itext/itext.forms/itext/forms/exceptions/FormsExceptionMessageConstant.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ public sealed class FormsExceptionMessageConstant {
3535
public const String WRONG_FORM_FIELD_ADD_ANNOTATION_TO_THE_FIELD = "Wrong form field. Add annotation to the "
3636
+ "field.";
3737

38+
public const String N_ENTRY_IS_REQUIRED_FOR_APPEARANCE_DICTIONARY = "\\N entry is required to be present in an appearance dictionary.";
39+
3840
private FormsExceptionMessageConstant() {
3941
}
4042
}

itext/itext.io/itext/io/logs/IoLogMessageConstant.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ public const String IMAGE_HAS_INCORRECT_OR_UNSUPPORTED_BASE_COLOR_SPACE_IN_INDEX
281281

282282
public const String NUM_TREE_SHALL_NOT_END_WITH_KEY = "Number tree ends with a key which is invalid according to the PDF specification.";
283283

284+
[System.ObsoleteAttribute(@"Unused constant. Will be removed in 7.3")]
284285
public const String N_ENTRY_IS_REQUIRED_FOR_APPEARANCE_DICTIONARY = "\\N entry is required to be present in an appearance dictionary.";
285286

286287
public const String OCCUPIED_AREA_HAS_NOT_BEEN_INITIALIZED = "Occupied area has not been initialized. {0}";

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8db4d3e33a42e02dd631c24a1d7c216ef46ecf53
1+
b4062039402771737a56bddbc7f33a9bbfd177d6

0 commit comments

Comments
 (0)