Skip to content

Commit

Permalink
Merge pull request #668 from veraPDF/rel/1.26
Browse files Browse the repository at this point in the history
REL 1.26 - Merge release to master branch
  • Loading branch information
MaximPlusov authored May 21, 2024
2 parents 27cd631 + bc3cad4 commit 53610d7
Show file tree
Hide file tree
Showing 195 changed files with 3,049 additions and 1,586 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ on:
jobs:
build:
name: Checkout and Build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
continue-on-error: true

strategy:
fail-fast: false
matrix:
java-version: [8, 11, 16, 17]
java-version: [8, 11, 16, 17, 21]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: JDK setup
uses: actions/setup-java@v2
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
Expand All @@ -26,10 +28,10 @@ jobs:

coverage:
name: Quality Assurance
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
needs: [ build ]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Codacy analysis reporting
uses: codacy/codacy-analysis-cli-action@master
93 changes: 93 additions & 0 deletions .github/workflows/update-arlington-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Update arlington branch

on:
push:
branches:
- integration

jobs:
checkout-and-build:
runs-on: ubuntu-latest

continue-on-error: true

strategy:
fail-fast: false
matrix:
java-version: [11, 16, 17, 21]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: integration
- name: JDK setup
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
cache: maven
- name: Fetch arlington branch and checkout
run: |
git fetch origin arlington:arlington
git checkout -b test-branch arlington
- name: Configure user nameF
run: |
git config user.name "Git User"
git config user.email "[email protected]"
- name: Add commit to the test branch
run: git cherry-pick -m 1 ${{ github.sha }}
- name: Build project with Maven
if: success()
run: mvn --batch-mode --update-snapshots verify

merge:
runs-on: ubuntu-latest
needs: checkout-and-build
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: integration
- name: Generate new branch name
id: new-branch-name
run: echo "branch_name=new-branch-$(date +%s)" >> "$GITHUB_OUTPUT"
- name: Fetch arlington branch and checkout
run: |
git fetch origin arlington:arlington
git checkout -b ${{ steps.new-branch-name.outputs.branch_name }} arlington
- name: Configure user name
run: |
git config user.name "Git User"
git config user.email "[email protected]"
- name: Add commit to new branch
run: git cherry-pick -m 1 ${{ github.sha }}
- name: Merge branch into arlington
if: success()
run: |
git push origin ${{ steps.new-branch-name.outputs.branch_name }}
git checkout arlington
git merge ${{ steps.new-branch-name.outputs.branch_name }}
git push origin arlington
- name: Delete new branch
run: git push origin --delete ${{ steps.new-branch-name.outputs.branch_name }}

send-notification:
runs-on: ubuntu-latest
needs: [checkout-and-build, merge]
if: |
always() &&
(contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'skipped') ||
contains(needs.*.result, 'cancelled'))
steps:
- name: Send notification if build or merge failed
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@v1
with:
channel_id: C03E3JJGLQL
status: FAILED
color: danger
11 changes: 7 additions & 4 deletions .github/workflows/update-jakarta-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ jobs:
checkout-and-build:
runs-on: ubuntu-latest

continue-on-error: true

strategy:
fail-fast: false
matrix:
java-version: [11, 16, 17]
java-version: [11, 16, 17, 21]

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: integration
- name: JDK setup
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: 'temurin'
Expand All @@ -44,7 +47,7 @@ jobs:
needs: checkout-and-build
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: integration
Expand Down
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ veraPDF-validation
==================
*Greenfield PDF/A and PDF/UA validation, feature reporting and metadata repair developed for veraPDF*

[![Build Status](https://jenkins.openpreservation.org/job/veraPDF/job/1.24/job/validation/badge/icon)](https://jenkins.openpreservation.org/job/veraPDF/job/1.24/job/validation/ "OPF Jenkins")
[![Build Status](https://jenkins.openpreservation.org/job/veraPDF/job/1.26/job/validation/badge/icon)](https://jenkins.openpreservation.org/job/veraPDF/job/1.26/job/validation/ "OPF Jenkins")
[![Maven Central](https://img.shields.io/maven-central/v/org.verapdf/validation.svg)](https://repo1.maven.org/maven2/org/verapdf/validation/ "Maven central")
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/34416471585a474e85e7821d61048d1c)](https://app.codacy.com/gh/veraPDF/veraPDF-validation/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade "Codacy grade")

Expand All @@ -28,7 +28,7 @@ Quick Start

In order to build this project you'll need:

* Java 8 - 17, which can be downloaded [from Oracle](https://www.oracle.com/technetwork/java/javase/downloads/index.html), or for Linux users [OpenJDK](https://openjdk.java.net/install/index.html).
* Java 8 - 21, which can be downloaded [from Oracle](https://www.oracle.com/technetwork/java/javase/downloads/index.html), or for Linux users [OpenJDK](https://openjdk.java.net/install/index.html).
* [Maven v3+](https://maven.apache.org/)

### Building the veraPDF Validation Model
Expand Down
2 changes: 1 addition & 1 deletion feature-reporting/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<parent>
<artifactId>validation</artifactId>
<groupId>org.verapdf</groupId>
<version>1.24.0</version>
<version>1.26.0</version>
</parent>

<artifactId>feature-reporting</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ public final class GFFeatureParser {
private static final String DEVICERGB_ID = "devrgb";
private static final String DEVICECMYK_ID = "devcmyk";

private FeaturesReporter reporter;
private FeatureExtractorConfig config;
private Set<String> processedIDs;
private final FeaturesReporter reporter;
private final FeatureExtractorConfig config;
private final Set<String> processedIDs;

private GFFeatureParser(FeaturesReporter reporter, FeatureExtractorConfig config) {
this.reporter = reporter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
*/
public class GFAnnotationFeaturesObjectAdapter implements AnnotationFeaturesObjectAdapter {

private String id;
private String popupId;
private Set<String> formXObjects;
private PDAnnotation annot;
private final String id;
private final String popupId;
private final Set<String> formXObjects;
private final PDAnnotation annot;

/**
* Constructs new Annotation Feature Object Adapter
Expand Down Expand Up @@ -68,7 +68,7 @@ public String getPopupId() {

@Override
public Set<String> getFormXObjectsResources() {
return formXObjects == null ? Collections.<String>emptySet() : Collections.unmodifiableSet(formXObjects);
return formXObjects == null ? Collections.emptySet() : Collections.unmodifiableSet(formXObjects);
}

@Override
Expand Down Expand Up @@ -158,6 +158,6 @@ public boolean isPDFObjectPresent() {

@Override
public List<String> getErrors() {
return Collections.<String>emptyList();
return Collections.emptyList();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ public class GFColorSpaceFeaturesObjectAdapter implements ColorSpaceFeaturesObje

private static final Logger LOGGER = Logger.getLogger(GFColorSpaceFeaturesObjectAdapter.class.getCanonicalName());

private PDColorSpace colorSpace;
private String id;
private String iccProfileChild;
private String colorSpaceChild;
private final PDColorSpace colorSpace;
private final String id;
private final String iccProfileChild;
private final String colorSpaceChild;
private String lookup;
private List<String> errors;

Expand Down Expand Up @@ -76,9 +76,7 @@ private void init(PDColorSpace colorSpace) {
PDIndexed index = (PDIndexed) colorSpace;
try (InputStream stream = index.getLookup()) {
byte[] lookupData = GFAdapterHelper.inputStreamToByteArray(stream);
if (lookupData != null) {
this.lookup = DatatypeConverter.printHexBinary(lookupData);
}
this.lookup = DatatypeConverter.printHexBinary(lookupData);
} catch (IOException e) {
LOGGER.log(Level.FINE, e.getMessage(), e);
this.errors = new ArrayList<>();
Expand Down Expand Up @@ -258,6 +256,6 @@ public boolean isPDFObjectPresent() {

@Override
public List<String> getErrors() {
return this.errors == null ? Collections.<String>emptyList() : Collections.unmodifiableList(this.errors);
return this.errors == null ? Collections.emptyList() : Collections.unmodifiableList(this.errors);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*/
public class GFDocSecurityFeaturesObjectAdapter implements DocSecurityFeaturesObjectAdapter {

private PDEncryption encryption;
private final PDEncryption encryption;

public GFDocSecurityFeaturesObjectAdapter(PDEncryption encryption) {
this.encryption = encryption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
*/
public class GFEmbeddedFileFeaturesObjectAdapter implements EmbeddedFileFeaturesObjectAdapter {

private COSObject embFile;
private final COSObject embFile;
private Params params;
private COSObject cosEmbFile;
private int index;
private final COSObject cosEmbFile;
private final int index;

/**
* Constructs new Embedded File Feature Object Adapter
Expand Down Expand Up @@ -139,7 +139,7 @@ public String getFilter() {
for (COSObject elem : (COSArray) filter.getDirectBase()) {
String elemValue = elem.getString();
if (elemValue != null) {
builder.append(elemValue).append(" ");
builder.append(elemValue).append(' ');
}
}
return builder.toString().trim();
Expand Down Expand Up @@ -184,9 +184,9 @@ public List<String> getErrors() {
return Collections.emptyList();
}

private class Params {
private static class Params {

private COSObject obj;
private final COSObject obj;

public Params(COSObject obj) {
this.obj = obj;
Expand All @@ -211,8 +211,7 @@ public Long getSize() {
private Calendar getDate(ASAtom type) {
String date = obj.getStringKey(type);
if (date != null) {
Calendar dateCal = TypeConverter.parseDate(date);
return dateCal;
return TypeConverter.parseDate(date);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
*/
public class GFExtGStateFeaturesObjectAdapter implements ExtGStateFeaturesObjectAdapter {

private PDExtGState exGState;
private String id;
private String fontChildID;
private final PDExtGState exGState;
private final String id;
private final String fontChildID;

/**
* Constructs new extended graphics state feature object adapter
Expand Down Expand Up @@ -66,7 +66,7 @@ public String getFontChildId() {
public Boolean getTransparency() {
if (exGState != null && !exGState.empty()) {
Boolean res = exGState.getAlphaSourceFlag();
return res == null ? null : !res.booleanValue();
return res == null ? null : !res;
}
return null;
}
Expand Down
Loading

0 comments on commit 53610d7

Please sign in to comment.