From 762f987f7ff172e97392c66936f285b1f36b0e8e Mon Sep 17 00:00:00 2001 From: iText Software Date: Fri, 9 Oct 2020 10:09:41 +0300 Subject: [PATCH 01/16] [RELEASE] Update dependency versions --- pdfocr-api/pom.xml | 2 +- pdfocr-tesseract4/pom.xml | 2 +- pom.xml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pdfocr-api/pom.xml b/pdfocr-api/pom.xml index 3798760..f23ebe7 100644 --- a/pdfocr-api/pom.xml +++ b/pdfocr-api/pom.xml @@ -5,7 +5,7 @@ com.itextpdf pdfocr-root - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT pdfocr-api diff --git a/pdfocr-tesseract4/pom.xml b/pdfocr-tesseract4/pom.xml index 8b6a129..9b5e023 100644 --- a/pdfocr-tesseract4/pom.xml +++ b/pdfocr-tesseract4/pom.xml @@ -5,7 +5,7 @@ com.itextpdf pdfocr-root - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT pdfocr-tesseract4 diff --git a/pom.xml b/pom.xml index 85d18d3..cf1c8b6 100644 --- a/pom.xml +++ b/pom.xml @@ -5,12 +5,12 @@ com.itextpdf root - 7.1.13-SNAPSHOT + 7.1.14-SNAPSHOT pdfocr-root - 1.0.2-SNAPSHOT + 1.0.3-SNAPSHOT pom pdfOCR @@ -22,7 +22,7 @@ - 7.1.13-SNAPSHOT + 7.1.14-SNAPSHOT 1.8 ${java.version} ${java.version} From 9bca69eb1914df808051e17236bcd48b0732b38a Mon Sep 17 00:00:00 2001 From: Uladzimir Asipchuk Date: Fri, 16 Oct 2020 00:15:17 +0300 Subject: [PATCH 02/16] Remove package-info.java We do not use such documentation, hence no need to have these files DEVSIX-4648 --- pdfocr-api/src/main/java/com/itextpdf/pdfocr/package-info.java | 1 - .../main/java/com/itextpdf/pdfocr/tesseract4/package-info.java | 1 - 2 files changed, 2 deletions(-) delete mode 100644 pdfocr-api/src/main/java/com/itextpdf/pdfocr/package-info.java delete mode 100644 pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/package-info.java diff --git a/pdfocr-api/src/main/java/com/itextpdf/pdfocr/package-info.java b/pdfocr-api/src/main/java/com/itextpdf/pdfocr/package-info.java deleted file mode 100644 index 004df18..0000000 --- a/pdfocr-api/src/main/java/com/itextpdf/pdfocr/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.itextpdf.pdfocr; diff --git a/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/package-info.java b/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/package-info.java deleted file mode 100644 index bfc5482..0000000 --- a/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/package-info.java +++ /dev/null @@ -1 +0,0 @@ -package com.itextpdf.pdfocr.tesseract4; From 65511c3f81a4b3312125300b64579b20d8f47474 Mon Sep 17 00:00:00 2001 From: Artem Bobko Date: Mon, 19 Oct 2020 13:39:45 +0300 Subject: [PATCH 03/16] Update japicmp version to 0.14.4 DEVSIX-4647 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cf1c8b6..57de2a4 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,7 @@ com.github.siom79.japicmp japicmp-maven-plugin - 0.14.3 + 0.14.4 none From 3bd70689587c52d03f144554b36b797f440d03e4 Mon Sep 17 00:00:00 2001 From: Yauheni Borbut Date: Thu, 12 Nov 2020 07:05:31 +0300 Subject: [PATCH 04/16] Get rid of using "LicenseKeyProductFeature" in ReflectionUtils class in pdfOCR DEVSIX-4766 --- .../pdfocr/tesseract4/ReflectionUtils.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/ReflectionUtils.java b/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/ReflectionUtils.java index 83bca8b..750af31 100644 --- a/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/ReflectionUtils.java +++ b/pdfocr-tesseract4/src/main/java/com/itextpdf/pdfocr/tesseract4/ReflectionUtils.java @@ -24,10 +24,8 @@ This file is part of the iText (R) project. import com.itextpdf.kernel.Version; -import java.lang.reflect.Array; import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import java.util.Arrays; final class ReflectionUtils { @@ -35,7 +33,6 @@ final class ReflectionUtils { private static final String LICENSEKEY = "LicenseKey"; private static final String LICENSEKEY_PRODUCT = "LicenseKeyProduct"; - private static final String LICENSEKEY_FEATURE = "LicenseKeyProductFeature"; private static final String SCHEDULED_CHECK = "scheduledCheck"; @@ -48,24 +45,17 @@ public static void scheduledCheck() { try { Class licenseKeyClass = getClass(LICENSEKEY_PACKAGE + LICENSEKEY); Class licenseKeyProductClass = getClass(LICENSEKEY_PACKAGE + LICENSEKEY_PRODUCT); - Class licenseKeyProductFeatureClass = getClass(LICENSEKEY_PACKAGE + LICENSEKEY_FEATURE); - - Object licenseKeyProductFeatureArray = Array.newInstance(licenseKeyProductFeatureClass, 0); Class[] params = new Class[] { - String.class, - Integer.TYPE, - Integer.TYPE, - licenseKeyProductFeatureArray.getClass() + String.class, String.class, String.class }; Constructor licenseKeyProductConstructor = licenseKeyProductClass.getConstructor(params); Object licenseKeyProductObject = licenseKeyProductConstructor.newInstance( PdfOcrTesseract4ProductInfo.PRODUCT_NAME, - PdfOcrTesseract4ProductInfo.MAJOR_VERSION, - PdfOcrTesseract4ProductInfo.MINOR_VERSION, - licenseKeyProductFeatureArray + String.valueOf(PdfOcrTesseract4ProductInfo.MAJOR_VERSION), + String.valueOf(PdfOcrTesseract4ProductInfo.MINOR_VERSION) ); Method method = licenseKeyClass.getMethod(SCHEDULED_CHECK, licenseKeyProductClass); From 582a2ff40eeaa861cb0acccd604e4406b8fd4e59 Mon Sep 17 00:00:00 2001 From: Alexey Subach Date: Sun, 22 Nov 2020 23:33:18 +0300 Subject: [PATCH 05/16] Add CONTRIBUTING.md with latest information and links DEVSIX-4793 --- CONTRIBUTING.md | 183 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..3547176 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,183 @@ +# Contributing to iText 7 Community + +We'd love for you to contribute to our source code and to make **iText 7 Community** even better than it is +today! Here are the guidelines we'd like you to follow: + + - [Question or Problem?](#question) + - [Issues and Bugs](#issue) + - [New Features](#feature) + - [Submission Guidelines](#submit) + - [Coding Rules](#rules) + - [Commit Message Guidelines](#commit) + - [Signing the iCLA](#cla) + - [Contributor Code of Conduct](#coc) + + +## Got a Question or Problem? + +If you have questions about how to use **iText 7 Community**, please direct these to [Stack Overflow][stackoverflow]. + +If you are a customer with a [support agreement][support], you also have direct access to our JIRA and our developers. + + +## Found an Issue? +If you find a bug in the source code or a mistake in the documentation, you can help us by +submitting a [Pull Request][pull] with a fix. + +**Please see the [Submission Guidelines](#submit) below**. + + +## Want to implement a Feature? +If you would like to implement a new feature then consider what kind of change it is: + +* **Major Changes** that you wish to contribute to the project should be discussed first so that we can better +coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully +accepted into the project. Contact us at [community@itextpdf.com](mailto:community@itextpdf.com). +* **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a [Pull Request][pull]. + + +## Submission Guidelines + +### Submitting a Question or an Issue +Before you submit your question or issue, search [Stack Overflow][stackoverflow], maybe your question was already answered. + +If your issue appears to be a bug, and hasn't been reported, ask a question on [Stack Overflow][stackoverflow] to verify that is indeed a bug and not a mistake in your own code. +Help us to maximize the effort we can spend fixing issues and adding new +features, by not reporting duplicate issues. Providing the following information will increase the +chances of your issue being dealt with quickly: + +* **[How to ask good questions][good-questions]** +* **Overview of the Issue** - if an error is being thrown a non-minified stack trace helps +* **Motivation for or Use Case** - explain why this is a bug for you +* **iText Version(s)** - is it a regression? +* **Operating System** - is this a problem on Windows or Linux, maybe on Mac? +* **Reproduce the Error** - provide a [Short, Self Contained, Correct (Compilable), Example][sscce], also known as a [Minimal, Complete, and Verifiable example][mcve]. +* **Related Issues** - has a similar issue been reported before? +* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be + causing the problem (line of code or commit) +* **Tag the question** - add the tag `itext7` to your question so we can find it. + +**If you get help, help others. Good karma rulez!** + + +### Submitting a Pull Request +Before you submit your pull request consider the following guidelines: + +* Search [GitHub][pull] for an open or closed Pull Request + that relates to your submission. You don't want to duplicate effort. +* Verify that your proposed change hasn't already been addressed in the develop branch. +* Don't send a separate pull request for every single file you change. +* Please sign the [iText Contributor License Agreement (iCLA)](#cla) before sending pull + requests. We cannot accept code without this agreement. +* Fork the iText repository on GitHub. +* Clone your iText fork to your local machine. +* Make your changes, **including appropriate test cases**. +* Follow our [Coding Rules](#rules). +* Commit your changes using a descriptive commit message that follows our + [commit message conventions](#commit-message-format). +* Now would be a good time to fix up your commits (if you want or need to) with `git rebase --interactive`. +* Build your changes locally to ensure all the tests pass. +* Push your changes to your GitHub account. +* Create a pull request in GitHub. +"Head fork" should be your repository, and the "base fork" should be the iText7 official repository. +* If we suggest changes then: + * Make the required updates. + * Fix up your commits if needed, with an interactive rebase. + * Re-run the tests and make sure that they are still passing. + * Force push to your GitHub repository. This will update your Pull Request. + +That's it! Thank you for your contribution! + +#### After your pull request is merged + +After your pull request is merged, you can safely delete your fork and pull the changes +from the main (upstream) repository. + + +## Coding Rules +To ensure consistency throughout the source code, keep these rules in mind as you are working: + +* We develop in Java first, and then port to .NET, so code submissions in Java are preferred. + Nevertheless this shouldn't stop you from making a good pull request to the .NET port. +* All features or bug fixes **must be tested** by one or more unit tests. +* All public API methods **must be documented** with JavaDoc. To see how we document our APIs, please check + out the existing [javadocs][javadocs]. +* We follow the rules contained in + [Oracle's Code Conventions for the Java Programming Language][java-style-guide], with these additions: + * Wrap all code at **100 characters**. + + +## Git Commit Guidelines + +We have guidelines on how our git commit messages should be formatted. This leads to **more +readable messages** that are easy to follow when looking through the **project history**. But also, +we use the git commit messages to **generate the iText 7 Community change log**. + +These guidelines were taken from Chris Beams' blog post [How to Write a Git Commit Message][git-commit]. + +### Commit Message Format +Each commit message consists of a **subject**, a **body** and a **footer**: + +``` + + + + +