Skip to content

Commit cc64368

Browse files
BezrukovMiText-CI
authored andcommitted
Fix PdfSignatureBuildProperties and PdfSigner javadoc warnings
DEVSIX-4576
1 parent 2be702a commit cc64368

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

sign/src/main/java/com/itextpdf/signatures/PdfSignatureBuildProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public PdfSignatureBuildProperties(PdfDictionary dict) {
7474
* Sets the signatureCreator property in the underlying
7575
* {@link PdfSignatureApp} dictionary.
7676
*
77-
* @param name
77+
* @param name the signature creator's name to be set
7878
*/
7979
public void setSignatureCreator(String name) {
8080
getPdfSignatureAppProperty().setSignatureCreator(name);

sign/src/main/java/com/itextpdf/signatures/PdfSigner.java

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public enum CryptoStandard {
233233
* @param reader PdfReader that reads the PDF file
234234
* @param outputStream OutputStream to write the signed PDF file
235235
* @param append boolean to indicate whether the signing should happen in append mode or not
236-
* @throws IOException
236+
* @throws IOException if some I/O problem occurs
237237
* @deprecated will be removed in next major release.
238238
* Use {@link #PdfSigner(PdfReader, OutputStream, StampingProperties)} instead.
239239
*/
@@ -249,7 +249,7 @@ public PdfSigner(PdfReader reader, OutputStream outputStream, boolean append) th
249249
* @param outputStream OutputStream to write the signed PDF file
250250
* @param path File to which the output is temporarily written
251251
* @param append boolean to indicate whether the signing should happen in append mode or not
252-
* @throws IOException
252+
* @throws IOException if some I/O problem occurs
253253
* @deprecated will be removed in next major release.
254254
* Use {@link #PdfSigner(PdfReader, OutputStream, String, StampingProperties)} instead.
255255
*/
@@ -265,7 +265,7 @@ public PdfSigner(PdfReader reader, OutputStream outputStream, String path, boole
265265
* @param outputStream OutputStream to write the signed PDF file
266266
* @param properties {@link StampingProperties} for the signing document. Note that encryption will be
267267
* preserved regardless of what is set in properties.
268-
* @throws IOException
268+
* @throws IOException if some I/O problem occurs
269269
*/
270270
public PdfSigner(PdfReader reader, OutputStream outputStream, StampingProperties properties) throws IOException {
271271
this(reader, outputStream, null, properties);
@@ -279,7 +279,7 @@ public PdfSigner(PdfReader reader, OutputStream outputStream, StampingProperties
279279
* @param path File to which the output is temporarily written
280280
* @param properties {@link StampingProperties} for the signing document. Note that encryption will be
281281
* preserved regardless of what is set in properties.
282-
* @throws IOException
282+
* @throws IOException if some I/O problem occurs
283283
*/
284284
public PdfSigner(PdfReader reader, OutputStream outputStream, String path, StampingProperties properties) throws IOException {
285285
StampingProperties localProps = new StampingProperties(properties).preserveEncryption();
@@ -530,8 +530,8 @@ public void setFieldLockDict(PdfSigFieldLock fieldLock) {
530530
* @param externalDigest an implementation that provides the digest
531531
* @param estimatedSize the reserved size for the signature. It will be estimated if 0
532532
* @param sigtype Either Signature.CMS or Signature.CADES
533-
* @throws IOException
534-
* @throws GeneralSecurityException
533+
* @throws IOException if some I/O problem occurs
534+
* @throws GeneralSecurityException if some problem during apply security algorithms occurs
535535
*/
536536
public void signDetached(IExternalDigest externalDigest, IExternalSignature externalSignature, Certificate[] chain, Collection<ICrlClient> crlList, IOcspClient ocspClient,
537537
ITSAClient tsaClient, int estimatedSize, CryptoStandard sigtype) throws IOException, GeneralSecurityException {
@@ -553,8 +553,8 @@ public void signDetached(IExternalDigest externalDigest, IExternalSignature exte
553553
* @param estimatedSize the reserved size for the signature. It will be estimated if 0
554554
* @param sigtype Either Signature.CMS or Signature.CADES
555555
* @param signaturePolicy the signature policy (for EPES signatures)
556-
* @throws IOException
557-
* @throws GeneralSecurityException
556+
* @throws IOException if some I/O problem occurs
557+
* @throws GeneralSecurityException if some problem during apply security algorithms occurs
558558
*/
559559
public void signDetached(IExternalDigest externalDigest, IExternalSignature externalSignature, Certificate[] chain, Collection<ICrlClient> crlList, IOcspClient ocspClient,
560560
ITSAClient tsaClient, int estimatedSize, CryptoStandard sigtype, SignaturePolicyInfo signaturePolicy) throws IOException, GeneralSecurityException {
@@ -576,8 +576,8 @@ public void signDetached(IExternalDigest externalDigest, IExternalSignature exte
576576
* @param estimatedSize the reserved size for the signature. It will be estimated if 0
577577
* @param sigtype Either Signature.CMS or Signature.CADES
578578
* @param signaturePolicy the signature policy (for EPES signatures)
579-
* @throws IOException
580-
* @throws GeneralSecurityException
579+
* @throws IOException if some I/O problem occurs
580+
* @throws GeneralSecurityException if some problem during apply security algorithms occurs
581581
*/
582582
public void signDetached(IExternalDigest externalDigest, IExternalSignature externalSignature, Certificate[] chain, Collection<ICrlClient> crlList, IOcspClient ocspClient,
583583
ITSAClient tsaClient, int estimatedSize, CryptoStandard sigtype, SignaturePolicyIdentifier signaturePolicy) throws IOException, GeneralSecurityException {
@@ -669,8 +669,8 @@ public void signDetached(IExternalDigest externalDigest, IExternalSignature exte
669669
*
670670
* @param externalSignatureContainer the interface providing the actual signing
671671
* @param estimatedSize the reserved size for the signature
672-
* @throws GeneralSecurityException
673-
* @throws IOException
672+
* @throws GeneralSecurityException if some problem during apply security algorithms occurs
673+
* @throws IOException if some I/O problem occurs
674674
*/
675675
public void signExternalContainer(IExternalSignatureContainer externalSignatureContainer, int estimatedSize) throws GeneralSecurityException, IOException {
676676
if (closed) {
@@ -716,8 +716,8 @@ public void signExternalContainer(IExternalSignatureContainer externalSignatureC
716716
* @param tsa the timestamp generator
717717
* @param signatureName the signature name or null to have a name generated
718718
* automatically
719-
* @throws IOException
720-
* @throws GeneralSecurityException
719+
* @throws IOException if some I/O problem occurs
720+
* @throws GeneralSecurityException if some problem during apply security algorithms occurs
721721
*/
722722
public void timestamp(ITSAClient tsa, String signatureName) throws IOException, GeneralSecurityException {
723723
if (closed) {
@@ -773,8 +773,8 @@ public void timestamp(ITSAClient tsa, String signatureName) throws IOException,
773773
* @param outs the output PDF
774774
* @param externalSignatureContainer the signature container doing the actual signing. Only the
775775
* method ExternalSignatureContainer.sign is used
776-
* @throws IOException
777-
* @throws GeneralSecurityException
776+
* @throws IOException if some I/O problem occurs
777+
* @throws GeneralSecurityException if some problem during apply security algorithms occurs
778778
*/
779779
public static void signDeferred(PdfDocument document, String fieldName, OutputStream outs, IExternalSignatureContainer externalSignatureContainer) throws IOException, GeneralSecurityException {
780780
SignatureUtil signatureUtil = new SignatureUtil(document);
@@ -1041,7 +1041,7 @@ protected void preClose(Map<PdfName, Integer> exclusionSizes) throws IOException
10411041
* {@link #preClose(Map)}, {@link #getRangeStream()} and {@link #close(PdfDictionary)}.
10421042
*
10431043
* @return The {@link InputStream} of bytes to be signed.
1044-
* @throws IOException
1044+
* @throws IOException if some I/O problem occurs
10451045
*/
10461046
protected InputStream getRangeStream() throws IOException {
10471047
RandomAccessSourceFactory fac = new RandomAccessSourceFactory();
@@ -1121,8 +1121,8 @@ protected void close(PdfDictionary update) throws IOException {
11211121
/**
11221122
* Returns the underlying source.
11231123
*
1124-
* @return The underlying source
1125-
* @throws IOException
1124+
* @return the underlying source
1125+
* @throws IOException if some I/O problem occurs
11261126
*/
11271127
protected IRandomAccessSource getUnderlyingSource() throws IOException {
11281128
RandomAccessSourceFactory fac = new RandomAccessSourceFactory();
@@ -1155,8 +1155,8 @@ protected void addDocMDP(PdfSignature crypto) {
11551155
* Adds keys to the signature dictionary that define the field permissions.
11561156
* This method is only used for signatures that lock fields.
11571157
*
1158-
* @param crypto the signature dictionary
1159-
* @param fieldLock
1158+
* @param crypto the signature dictionary
1159+
* @param fieldLock the {@link PdfSigFieldLock} instance specified the field lock to be set
11601160
*/
11611161
protected void addFieldMDP(PdfSignature crypto, PdfSigFieldLock fieldLock) {
11621162
PdfDictionary reference = new PdfDictionary();

0 commit comments

Comments
 (0)