Skip to content

Commit

Permalink
[RELEASE] iText 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
iText-CI committed Oct 17, 2023
2 parents 0fe4896 + eba608f commit 323f77f
Show file tree
Hide file tree
Showing 710 changed files with 20,090 additions and 2,113 deletions.
2 changes: 1 addition & 1 deletion barcodes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.1</version>
<version>8.0.2</version>
</parent>
<artifactId>barcodes</artifactId>
<name>iText - barcodes</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ This file is part of the iText (R) project.
/**
* A base class which covers the range of exceptions which may occur when encoding a barcode using
* the Writer framework.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class WriterException extends ITextException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ This file is part of the iText (R) project.

/**
* A simple, fast array of bits, represented compactly by an array of ints internally.
*
* @author Sean Owen
*/
final class BitArray {

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ This file is part of the iText (R) project.

/**
* This class implements an array of unsigned bytes.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
final class ByteArray {

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ This file is part of the iText (R) project.
/**
* Encapsulates a Character Set ECI, according to "Extended Channel Interpretations" 5.3.1.1
* of ISO 18004.
*
* @author Sean Owen
*/
final class CharacterSetECI {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ This file is part of the iText (R) project.

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ This file is part of the iText (R) project.
import java.util.List;
import java.util.Map;

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

// The original table is defined in the table 5 of JISX0510:2004 (p.19).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ This file is part of the iText (R) project.
/**
* See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels
* defined by the QR code standard.
*
* @author Sean Owen
*/
public final class ErrorCorrectionLevel {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ This file is part of the iText (R) project.
/**
* Encapsulates a QR Code's format information, including the data mask used and
* error correction level.
*
* @author Sean Owen
* @see ErrorCorrectionLevel
*/
final class FormatInformation {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ This file is part of the iText (R) project.
* Throughout this package, elements of GF(256) are represented as an <code>int</code>
* for convenience and speed (but at the cost of memory).
* Only the bottom 8 bits are really used.
*
* @author Sean Owen
*/
final class GF256 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ This file is part of the iText (R) project.
* <p>
* Much credit is due to William Rucklidge since portions of this code are an indirect
* port of his C++ Reed-Solomon implementation.
*
* @author Sean Owen
*/
final class GF256Poly {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ This file is part of the iText (R) project.
*/
package com.itextpdf.barcodes.qrcode;

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

private MaskUtil() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ This file is part of the iText (R) project.

import com.itextpdf.barcodes.exceptions.WriterException;

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

private MatrixUtil() {
Expand Down
2 changes: 0 additions & 2 deletions barcodes/src/main/java/com/itextpdf/barcodes/qrcode/Mode.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ This file is part of the iText (R) project.
/**
* See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which
* data can be encoded to bits in the QR code standard.
*
* @author Sean Owen
*/
final class Mode {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ This file is part of the iText (R) project.
*/
package com.itextpdf.barcodes.qrcode;

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

public static final int NUM_MASK_PATTERNS = 8;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ This file is part of the iText (R) project.

/**
* This object renders a QR Code as a ByteMatrix 2D array of greyscale values.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
public final class QRCodeWriter {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ This file is part of the iText (R) project.

/**
* Implements Reed-Solomon encoding, as the name implies.
*
* @author Sean Owen
* @author William Rucklidge
*/
final class ReedSolomonEncoder {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ This file is part of the iText (R) project.

/**
* See ISO 18004:2006 Annex D.
*
* @author Sean Owen
*/
final class Version {

Expand Down
2 changes: 1 addition & 1 deletion bouncy-castle-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.1</version>
<version>8.0.2</version>
</parent>
<artifactId>bouncy-castle-adapter</artifactId>
<name>iText - Bouncy Castle Adapter</name>
Expand Down
2 changes: 1 addition & 1 deletion bouncy-castle-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.1</version>
<version>8.0.2</version>
</parent>
<artifactId>bouncy-castle-connector</artifactId>
<name>iText - Bouncy Castle Connector</name>
Expand Down
2 changes: 1 addition & 1 deletion bouncy-castle-fips-adapter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.1</version>
<version>8.0.2</version>
</parent>
<artifactId>bouncy-castle-fips-adapter</artifactId>
<name>iText - Bouncy Castle FIPS Adapter</name>
Expand Down
2 changes: 1 addition & 1 deletion commons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>com.itextpdf</groupId>
<artifactId>root</artifactId>
<version>8.0.1</version>
<version>8.0.2</version>
</parent>
<artifactId>commons</artifactId>
<name>iText - commons</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This file is part of the iText (R) project.
public final class CommonsProductData {
static final String COMMONS_PUBLIC_PRODUCT_NAME = "Commons";
static final String COMMONS_PRODUCT_NAME = "commons";
static final String COMMONS_VERSION = "8.0.1";
static final String COMMONS_VERSION = "8.0.2";
static final String MINIMAL_COMPATIBLE_LICENSEKEY_VERSION = "4.1.0";
static final int COMMONS_COPYRIGHT_SINCE = 2000;
static final int COMMONS_COPYRIGHT_TO = 2023;
Expand Down
92 changes: 92 additions & 0 deletions commons/src/main/java/com/itextpdf/commons/utils/DIContainer.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2023 Apryse Group NV
Authors: Apryse Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.itextpdf.commons.utils;

import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier;

/**
* A simple dependency injection container.
* <p>
* The container is thread-safe.
*/
public class DIContainer {

private static final ConcurrentHashMap<Class<?>, Supplier<Object>> instances = new ConcurrentHashMap<>();

private final ConcurrentHashMap<Class<?>, Object> localInstances = new ConcurrentHashMap<>();

static {
DIContainerConfigurations.loadDefaultConfigurations();
}


/**
* Creates a new instance of {@link DIContainer}.
*/
public DIContainer() {
// Empty constructor
}

/**
* Registers a default instance for a class.
*
* @param clazz the class
* @param supplier supplier of the instance
*/
public static void registerDefault(Class<?> clazz, Supplier<Object> supplier) {
instances.put(clazz, supplier);
}

/**
* Registers an instance for a class.
*
* @param clazz the class
* @param inst the instance
*/
public void register(Class<?> clazz, Object inst) {
localInstances.put(clazz, inst);
}

/**
* Gets an instance of a class.
*
* @param clazz the class
* @param <T> the type of the class
*
* @return the instance
*/
public <T> T getInstance(Class<T> clazz) {
Object supplier = localInstances.get(clazz);
if (supplier == null) {
supplier = instances.get(clazz).get();
}
if (supplier == null) {
throw new RuntimeException("No instance registered for class " + clazz.getName());
}
return (T) supplier;
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
This file is part of the iText (R) project.
Copyright (c) 1998-2023 Apryse Group NV
Authors: Apryse Software.
This program is offered under a commercial and under the AGPL license.
For commercial licensing, contact us at https://itextpdf.com/sales. For AGPL licensing, see below.
AGPL licensing:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.itextpdf.commons.utils;

public class DIContainerConfigurations {

private DIContainerConfigurations() {
// Empty constructor
}

private static final String[] DEFAULT_CONFIGURATIONS_CLASS = new String[] {
"com.itextpdf.forms.util.RegisterDefaultDiContainer"
};

public static void loadDefaultConfigurations() {
for (final String defaultConfigurationClass : DEFAULT_CONFIGURATIONS_CLASS) {
try {
Class.forName(defaultConfigurationClass);
} catch (ClassNotFoundException e) {
// Ignore
}
}
}
}
Loading

0 comments on commit 323f77f

Please sign in to comment.