Skip to content

Commit 323f77f

Browse files
committed
[RELEASE] iText 8.0.2
2 parents 0fe4896 + eba608f commit 323f77f

File tree

710 files changed

+20090
-2113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

710 files changed

+20090
-2113
lines changed

barcodes/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>8.0.1</version>
7+
<version>8.0.2</version>
88
</parent>
99
<artifactId>barcodes</artifactId>
1010
<name>iText - barcodes</name>

barcodes/src/main/java/com/itextpdf/barcodes/exceptions/WriterException.java

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ This file is part of the iText (R) project.
2727
/**
2828
* A base class which covers the range of exceptions which may occur when encoding a barcode using
2929
* the Writer framework.
30-
*
31-
* @author dswitkin@google.com (Daniel Switkin)
3230
*/
3331
public final class WriterException extends ITextException {
3432

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/BitArray.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ This file is part of the iText (R) project.
2525

2626
/**
2727
* A simple, fast array of bits, represented compactly by an array of ints internally.
28-
*
29-
* @author Sean Owen
3028
*/
3129
final class BitArray {
3230

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/BitMatrix.java

-3
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ This file is part of the iText (R) project.
3333
* <p>
3434
* The ordering of bits is row-major. Within each int, the least significant bits are used first,
3535
* meaning they represent lower x values. This is compatible with BitArray's implementation.
36-
*
37-
* @author Sean Owen
38-
* @author dswitkin@google.com (Daniel Switkin)
3936
*/
4037
final class BitMatrix {
4138

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/BitVector.java

-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ This file is part of the iText (R) project.
2626
* JAVAPORT: This should be combined with BitArray in the future, although that class is not yet
2727
* dynamically resizeable. This implementation is reasonable but there is a lot of function calling
2828
* in loops I'd like to get rid of.
29-
*
30-
* @author satorux@google.com (Satoru Takabayashi) - creator
31-
* @author dswitkin@google.com (Daniel Switkin) - ported from C++
3229
*/
3330
final class BitVector {
3431

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/ByteArray.java

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ This file is part of the iText (R) project.
2424

2525
/**
2626
* This class implements an array of unsigned bytes.
27-
*
28-
* @author dswitkin@google.com (Daniel Switkin)
2927
*/
3028
final class ByteArray {
3129

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/ByteMatrix.java

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ This file is part of the iText (R) project.
2929
*
3030
* JAVAPORT: The original code was a 2D array of ints, but since it only ever gets assigned
3131
* -1, 0, and 1, I'm going to use less memory and go with bytes.
32-
*
33-
* @author dswitkin@google.com (Daniel Switkin)
3432
*/
3533
public final class ByteMatrix {
3634

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/CharacterSetECI.java

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ This file is part of the iText (R) project.
2828
/**
2929
* Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1
3030
* of ISO 18004.
31-
*
32-
* @author Sean Owen
3331
*/
3432
final class CharacterSetECI {
3533

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/EncodeHintType.java

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ This file is part of the iText (R) project.
2424

2525
/**
2626
* These are a set of hints that you may pass to Writers to specify their behavior.
27-
*
28-
* @author dswitkin@google.com (Daniel Switkin)
2927
*/
3028
public final class EncodeHintType {
3129

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/Encoder.java

-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ This file is part of the iText (R) project.
2929
import java.util.List;
3030
import java.util.Map;
3131

32-
/**
33-
* @author satorux@google.com (Satoru Takabayashi) - creator
34-
* @author dswitkin@google.com (Daniel Switkin) - ported from C++
35-
*/
3632
final class Encoder {
3733

3834
// The original table is defined in the table 5 of JISX0510:2004 (p.19).

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/ErrorCorrectionLevel.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ This file is part of the iText (R) project.
2525
/**
2626
* See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels
2727
* defined by the QR code standard.
28-
*
29-
* @author Sean Owen
3028
*/
3129
public final class ErrorCorrectionLevel {
3230

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/FormatInformation.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ This file is part of the iText (R) project.
2525
/**
2626
* Encapsulates a QR Code's format information, including the data mask used and
2727
* error correction level.
28-
*
29-
* @author Sean Owen
3028
* @see ErrorCorrectionLevel
3129
*/
3230
final class FormatInformation {

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/GF256.java

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ This file is part of the iText (R) project.
2929
* Throughout this package, elements of GF(256) are represented as an <code>int</code>
3030
* for convenience and speed (but at the cost of memory).
3131
* Only the bottom 8 bits are really used.
32-
*
33-
* @author Sean Owen
3432
*/
3533
final class GF256 {
3634

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/GF256Poly.java

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ This file is part of the iText (R) project.
2828
* <p>
2929
* Much credit is due to William Rucklidge since portions of this code are an indirect
3030
* port of his C++ Reed-Solomon implementation.
31-
*
32-
* @author Sean Owen
3331
*/
3432
final class GF256Poly {
3533

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/MaskUtil.java

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.barcodes.qrcode;
2424

25-
/**
26-
* @author satorux@google.com (Satoru Takabayashi) - creator
27-
* @author dswitkin@google.com (Daniel Switkin) - ported from C++
28-
*/
2925
final class MaskUtil {
3026

3127
private MaskUtil() {

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/MatrixUtil.java

-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ This file is part of the iText (R) project.
2424

2525
import com.itextpdf.barcodes.exceptions.WriterException;
2626

27-
/**
28-
* @author satorux@google.com (Satoru Takabayashi) - creator
29-
* @author dswitkin@google.com (Daniel Switkin) - ported from C++
30-
*/
3127
final class MatrixUtil {
3228

3329
private MatrixUtil() {

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/Mode.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ This file is part of the iText (R) project.
2525
/**
2626
* See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which
2727
* data can be encoded to bits in the QR code standard.
28-
*
29-
* @author Sean Owen
3028
*/
3129
final class Mode {
3230

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/QRCode.java

-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ This file is part of the iText (R) project.
2222
*/
2323
package com.itextpdf.barcodes.qrcode;
2424

25-
/**
26-
* @author satorux@google.com (Satoru Takabayashi) - creator
27-
* @author dswitkin@google.com (Daniel Switkin) - ported from C++
28-
*/
2925
final class QRCode {
3026

3127
public static final int NUM_MASK_PATTERNS = 8;

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/QRCodeWriter.java

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ This file is part of the iText (R) project.
2828

2929
/**
3030
* This object renders a QR Code as a ByteMatrix 2D array of greyscale values.
31-
*
32-
* @author dswitkin@google.com (Daniel Switkin)
3331
*/
3432
public final class QRCodeWriter {
3533

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/ReedSolomonEncoder.java

-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ This file is part of the iText (R) project.
2727

2828
/**
2929
* Implements Reed-Solomon encoding, as the name implies.
30-
*
31-
* @author Sean Owen
32-
* @author William Rucklidge
3330
*/
3431
final class ReedSolomonEncoder {
3532

barcodes/src/main/java/com/itextpdf/barcodes/qrcode/Version.java

-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ This file is part of the iText (R) project.
2525

2626
/**
2727
* See ISO 18004:2006 Annex D.
28-
*
29-
* @author Sean Owen
3028
*/
3129
final class Version {
3230

bouncy-castle-adapter/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>8.0.1</version>
7+
<version>8.0.2</version>
88
</parent>
99
<artifactId>bouncy-castle-adapter</artifactId>
1010
<name>iText - Bouncy Castle Adapter</name>

bouncy-castle-connector/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>8.0.1</version>
7+
<version>8.0.2</version>
88
</parent>
99
<artifactId>bouncy-castle-connector</artifactId>
1010
<name>iText - Bouncy Castle Connector</name>

bouncy-castle-fips-adapter/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>8.0.1</version>
7+
<version>8.0.2</version>
88
</parent>
99
<artifactId>bouncy-castle-fips-adapter</artifactId>
1010
<name>iText - Bouncy Castle FIPS Adapter</name>

commons/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.itextpdf</groupId>
66
<artifactId>root</artifactId>
7-
<version>8.0.1</version>
7+
<version>8.0.2</version>
88
</parent>
99
<artifactId>commons</artifactId>
1010
<name>iText - commons</name>

commons/src/main/java/com/itextpdf/commons/actions/data/CommonsProductData.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This file is part of the iText (R) project.
2828
public final class CommonsProductData {
2929
static final String COMMONS_PUBLIC_PRODUCT_NAME = "Commons";
3030
static final String COMMONS_PRODUCT_NAME = "commons";
31-
static final String COMMONS_VERSION = "8.0.1";
31+
static final String COMMONS_VERSION = "8.0.2";
3232
static final String MINIMAL_COMPATIBLE_LICENSEKEY_VERSION = "4.1.0";
3333
static final int COMMONS_COPYRIGHT_SINCE = 2000;
3434
static final int COMMONS_COPYRIGHT_TO = 2023;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2023 Apryse Group NV
4+
Authors: Apryse Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.commons.utils;
24+
25+
import java.util.concurrent.ConcurrentHashMap;
26+
import java.util.function.Supplier;
27+
28+
/**
29+
* A simple dependency injection container.
30+
* <p>
31+
* The container is thread-safe.
32+
*/
33+
public class DIContainer {
34+
35+
private static final ConcurrentHashMap<Class<?>, Supplier<Object>> instances = new ConcurrentHashMap<>();
36+
37+
private final ConcurrentHashMap<Class<?>, Object> localInstances = new ConcurrentHashMap<>();
38+
39+
static {
40+
DIContainerConfigurations.loadDefaultConfigurations();
41+
}
42+
43+
44+
/**
45+
* Creates a new instance of {@link DIContainer}.
46+
*/
47+
public DIContainer() {
48+
// Empty constructor
49+
}
50+
51+
/**
52+
* Registers a default instance for a class.
53+
*
54+
* @param clazz the class
55+
* @param supplier supplier of the instance
56+
*/
57+
public static void registerDefault(Class<?> clazz, Supplier<Object> supplier) {
58+
instances.put(clazz, supplier);
59+
}
60+
61+
/**
62+
* Registers an instance for a class.
63+
*
64+
* @param clazz the class
65+
* @param inst the instance
66+
*/
67+
public void register(Class<?> clazz, Object inst) {
68+
localInstances.put(clazz, inst);
69+
}
70+
71+
/**
72+
* Gets an instance of a class.
73+
*
74+
* @param clazz the class
75+
* @param <T> the type of the class
76+
*
77+
* @return the instance
78+
*/
79+
public <T> T getInstance(Class<T> clazz) {
80+
Object supplier = localInstances.get(clazz);
81+
if (supplier == null) {
82+
supplier = instances.get(clazz).get();
83+
}
84+
if (supplier == null) {
85+
throw new RuntimeException("No instance registered for class " + clazz.getName());
86+
}
87+
return (T) supplier;
88+
}
89+
90+
91+
}
92+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
This file is part of the iText (R) project.
3+
Copyright (c) 1998-2023 Apryse Group NV
4+
Authors: Apryse Software.
5+
6+
This program is offered under a commercial and under the AGPL license.
7+
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
8+
9+
AGPL licensing:
10+
This program is free software: you can redistribute it and/or modify
11+
it under the terms of the GNU Affero General Public License as published by
12+
the Free Software Foundation, either version 3 of the License, or
13+
(at your option) any later version.
14+
15+
This program is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU Affero General Public License for more details.
19+
20+
You should have received a copy of the GNU Affero General Public License
21+
along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
package com.itextpdf.commons.utils;
24+
25+
public class DIContainerConfigurations {
26+
27+
private DIContainerConfigurations() {
28+
// Empty constructor
29+
}
30+
31+
private static final String[] DEFAULT_CONFIGURATIONS_CLASS = new String[] {
32+
"com.itextpdf.forms.util.RegisterDefaultDiContainer"
33+
};
34+
35+
public static void loadDefaultConfigurations() {
36+
for (final String defaultConfigurationClass : DEFAULT_CONFIGURATIONS_CLASS) {
37+
try {
38+
Class.forName(defaultConfigurationClass);
39+
} catch (ClassNotFoundException e) {
40+
// Ignore
41+
}
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)