Skip to content

Commit 26e4c05

Browse files
committed
Merge branch 'release_branch_DEVSIX-5576' into master-rc
2 parents a4927a6 + 60fd8f4 commit 26e4c05

Some content is hidden

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

47 files changed

+229
-257
lines changed

LICENSE.TXT renamed to NOTICE.txt

Lines changed: 82 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ SLF4j under the MIT license:
2222
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2323
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2424
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25+
26+
27+
--------------------------------------------------------------------------
2528

2629
Logback: the reliable, generic, fast and flexible logging framework.
2730
Copyright (C) 1999-2012, QOS.ch. All rights reserved.
@@ -30,6 +33,10 @@ Logback: the reliable, generic, fast and flexible logging framework.
3033
the terms of the Eclipse Public License v1.0 as published by
3134
the Eclipse Foundation ( http://www.eclipse.org/legal/epl-v10.html )
3235

36+
37+
--------------------------------------------------------------------------
38+
39+
3340
Bouncy Castle APIs under the following license:
3441
Copyright (c) 2000 - 2016 The Legion of the Bouncy Castle Inc.
3542
(https://www.bouncycastle.org)
@@ -40,6 +47,10 @@ Bouncy Castle APIs under the following license:
4047

4148
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4249

50+
51+
--------------------------------------------------------------------------
52+
53+
4354
DOM4j under the following license:
4455
Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met:
4556

@@ -52,5 +63,74 @@ DOM4j under the following license:
5263
THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5364

5465
Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
55-
56-
XML-Commons under the Apache License Version 2.0 ( http://www.apache.org/licenses/LICENSE-2.0.html )
66+
67+
--------------------------------------------------------------------------
68+
69+
XML-Commons under the Apache License Version 2.0 ( http://www.apache.org/licenses/LICENSE-2.0.html )
70+
71+
72+
--------------------------------------------------------------------------
73+
74+
Silk icon set 1.3 under the following license:
75+
76+
_________________________________________
77+
Mark James
78+
http://www.famfamfam.com/lab/icons/silk/
79+
_________________________________________
80+
81+
This work is licensed under a
82+
Creative Commons Attribution 2.5 License.
83+
[ http://creativecommons.org/licenses/by/2.5/ ]
84+
85+
This means you may use it for any purpose,
86+
and make any changes you like.
87+
All I ask is that you include a link back
88+
to this page in your credits.
89+
90+
Are you using this icon set? Send me an email
91+
(including a link or picture if available) to
92+
mjames at gmail dot com
93+
94+
Any other questions about this icon set please
95+
contact mjames at gmail dot com
96+
97+
--------------------------------------------
98+
99+
ICU4J under the following license:
100+
101+
102+
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)
103+
104+
Copyright © 1991-2020 Unicode, Inc. All rights reserved.
105+
Distributed under the Terms of Use in https://www.unicode.org/copyright.html.
106+
107+
Permission is hereby granted, free of charge, to any person obtaining
108+
a copy of the Unicode data files and any associated documentation
109+
(the "Data Files") or Unicode software and any associated documentation
110+
(the "Software") to deal in the Data Files or Software
111+
without restriction, including without limitation the rights to use,
112+
copy, modify, merge, publish, distribute, and/or sell copies of
113+
the Data Files or Software, and to permit persons to whom the Data Files
114+
or Software are furnished to do so, provided that either
115+
(a) this copyright and permission notice appear with all copies
116+
of the Data Files or Software, or
117+
(b) this copyright and permission notice appear in associated
118+
Documentation.
119+
120+
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
121+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
122+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
123+
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
124+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
125+
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
126+
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
127+
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
128+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
129+
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
130+
131+
Except as contained in this notice, the name of a copyright holder
132+
shall not be used in advertising or otherwise to promote the sale,
133+
use or other dealings in these Data Files or Software without prior
134+
written authorization of the copyright holder.
135+
136+
For transitive 3rd-party dependencies through ICU4J, see https://raw.githubusercontent.com/unicode-org/icu/46861a5c78367f7c720559243d6bf96146ee070f/icu4c/LICENSE

pom.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>com.itextpdf</groupId>
77
<artifactId>root</artifactId>
8-
<version>7.1.16</version>
8+
<version>7.2.0</version>
99
<relativePath />
1010
</parent>
1111

@@ -86,6 +86,11 @@
8686
<artifactId>dom4j</artifactId>
8787
<version>${dom4j.version}</version>
8888
</dependency>
89+
<dependency>
90+
<groupId>com.ibm.icu</groupId>
91+
<artifactId>icu4j</artifactId>
92+
<version>69.1</version>
93+
</dependency>
8994
<dependency>
9095
<groupId>com.itextpdf</groupId>
9196
<artifactId>pdftest</artifactId>
@@ -133,9 +138,9 @@
133138
<goal>single</goal>
134139
</goals>
135140
<configuration>
136-
<descriptorRefs>
137-
<descriptorRef>jar-with-dependencies</descriptorRef>
138-
</descriptorRefs>
141+
<descriptors>
142+
<descriptor>src/assembly/jar-with-dependencies-excluded-poms.xml</descriptor>
143+
</descriptors>
139144
<appendAssemblyId>false</appendAssemblyId>
140145
<archive>
141146
<manifest>
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
4+
<id>jar-with-dependencies-excluded-poms</id>
5+
<formats>
6+
<format>jar</format>
7+
</formats>
8+
<includeBaseDirectory>false</includeBaseDirectory>
9+
<dependencySets>
10+
<dependencySet>
11+
<unpackOptions>
12+
<excludes>
13+
<exclude>**/io/pom.xml</exclude>
14+
<exclude>**/io/pom.properties</exclude>
15+
<exclude>**/kernel/pom.xml</exclude>
16+
<exclude>**/kernel/pom.properties</exclude>
17+
<exclude>**/logback-classic/pom.xml</exclude>
18+
<exclude>**/logback-classic/pom.properties</exclude>
19+
<exclude>**/logback-core/pom.xml</exclude>
20+
<exclude>**/logback-core/pom.properties</exclude>
21+
<exclude>**/slf4j-api/pom.xml</exclude>
22+
<exclude>**/slf4j-api/pom.properties</exclude>
23+
</excludes>
24+
</unpackOptions>
25+
<outputDirectory>/</outputDirectory>
26+
<useProjectArtifact>true</useProjectArtifact>
27+
<unpack>true</unpack>
28+
<scope>runtime</scope>
29+
</dependencySet>
30+
</dependencySets>
31+
</assembly>

src/main/java/com/itextpdf/rups/Rups.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This file is part of the iText (R) project.
4242
*/
4343
package com.itextpdf.rups;
4444

45-
import com.itextpdf.kernel.Version;
45+
import com.itextpdf.kernel.actions.data.ITextCoreProductData;
4646
import com.itextpdf.kernel.utils.CompareTool;
4747
import com.itextpdf.rups.controller.RupsController;
4848
import com.itextpdf.rups.view.icons.FrameIconUtil;
@@ -101,7 +101,7 @@ public void run() {
101101

102102
static void initApplication(JFrame frame, RupsController controller, final int onCloseOperation) {
103103
// title bar
104-
frame.setTitle("iText RUPS " + Version.getInstance().getVersion());
104+
frame.setTitle("iText RUPS " + ITextCoreProductData.getInstance().getVersion());
105105
frame.setIconImages(FrameIconUtil.loadFrameIcons());
106106
frame.setDefaultCloseOperation(onCloseOperation);
107107
// the content

src/main/java/com/itextpdf/rups/controller/PdfReaderController.java

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ This file is part of the iText (R) project.
4444

4545
import com.itextpdf.kernel.pdf.*;
4646
import com.itextpdf.kernel.utils.CompareTool;
47+
import com.itextpdf.kernel.utils.objectpathitems.ArrayPathItem;
48+
import com.itextpdf.kernel.utils.objectpathitems.DictPathItem;
49+
import com.itextpdf.kernel.utils.objectpathitems.IndirectPathItem;
50+
import com.itextpdf.kernel.utils.objectpathitems.LocalPathItem;
51+
import com.itextpdf.kernel.utils.objectpathitems.ObjectPath;
4752
import com.itextpdf.rups.event.*;
4853
import com.itextpdf.rups.io.listeners.PdfTreeNavigationListener;
4954
import com.itextpdf.rups.model.ObjectLoader;
@@ -382,25 +387,25 @@ protected void highlightChanges(CompareTool.CompareResult compareResult) {
382387
if (compareResult == null) {
383388
return;
384389
}
385-
for (CompareTool.ObjectPath path : compareResult.getDifferences().keySet()) {
390+
for (ObjectPath path : compareResult.getDifferences().keySet()) {
386391
PdfObjectTreeNode currentNode;
387-
Stack<CompareTool.ObjectPath.IndirectPathItem> indirectPath = (Stack<CompareTool.ObjectPath.IndirectPathItem>) path.getIndirectPath().clone();
392+
Stack<IndirectPathItem> indirectPath = (Stack<IndirectPathItem>) path.getIndirectPath();
388393
while (!indirectPath.empty()) {
389-
CompareTool.ObjectPath.IndirectPathItem indirectPathItem = indirectPath.pop();
394+
IndirectPathItem indirectPathItem = indirectPath.pop();
390395
currentNode = nodes.getNode(indirectPathItem.getOutObject().getObjNumber());
391396
if (currentNode != null) {
392397
nodes.expandNode(currentNode);
393398
}
394399
}
395-
Stack<CompareTool.ObjectPath.LocalPathItem> localPath = (Stack<CompareTool.ObjectPath.LocalPathItem>) path.getLocalPath().clone();
400+
Stack<LocalPathItem> localPath = (Stack<LocalPathItem>) path.getLocalPath();
396401
currentNode = nodes.getNode(path.getBaseOutObject().getObjNumber());
397402
while (!localPath.empty() && currentNode != null) {
398403
nodes.expandNode(currentNode);
399-
CompareTool.ObjectPath.LocalPathItem item = localPath.pop();
400-
if (item instanceof CompareTool.ObjectPath.DictPathItem) {
401-
currentNode = nodes.getChildNode(currentNode, ((CompareTool.ObjectPath.DictPathItem) item).getKey());
402-
} else if (item instanceof CompareTool.ObjectPath.ArrayPathItem) {
403-
int index = ((CompareTool.ObjectPath.ArrayPathItem) item).getIndex();
404+
LocalPathItem item = localPath.pop();
405+
if (item instanceof DictPathItem) {
406+
currentNode = nodes.getChildNode(currentNode, ((DictPathItem) item).getKey());
407+
} else if (item instanceof ArrayPathItem) {
408+
int index = ((ArrayPathItem) item).getIndex();
404409
currentNode = (PdfObjectTreeNode) currentNode.getChildAt(index);
405410
}
406411
}

src/main/java/com/itextpdf/rups/controller/RupsController.java

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ This file is part of the iText (R) project.
4242
*/
4343
package com.itextpdf.rups.controller;
4444

45-
import com.itextpdf.kernel.PdfException;
46-
import com.itextpdf.kernel.Version;
45+
import com.itextpdf.kernel.actions.data.ITextCoreProductData;
46+
import com.itextpdf.kernel.exceptions.PdfException;
4747
import com.itextpdf.kernel.pdf.PdfDocument;
4848
import com.itextpdf.kernel.pdf.PdfReader;
4949
import com.itextpdf.kernel.utils.CompareTool;
@@ -304,10 +304,10 @@ public void loadRawContent(byte[] contents, String fileName, File directory, boo
304304
startObjectLoader();
305305
if (!pluginMode) {
306306
String directoryPath = directory == null ? "" : directory.getCanonicalPath() + File.separator;
307-
ownedFrame.setTitle("iText RUPS - " + directoryPath + fileName + " - " + Version.getInstance().getVersion());
307+
ownedFrame.setTitle("iText RUPS - " + directoryPath + fileName + " - " + ITextCoreProductData.getInstance().getVersion());
308308
}
309309
readerController.getParser().setDocument(pdfFile.getPdfDocument());
310-
} catch (IOException | PdfException | com.itextpdf.io.IOException ioe) {
310+
} catch (IOException | PdfException | com.itextpdf.io.exceptions.IOException ioe) {
311311
JOptionPane.showMessageDialog(masterComponent, ioe.getMessage(), "Dialog", JOptionPane.ERROR_MESSAGE);
312312
}
313313
}
@@ -384,7 +384,7 @@ public void saveFile(File file) {
384384

385385
JOptionPane.showMessageDialog(masterComponent, "File saved.", "Dialog", JOptionPane.INFORMATION_MESSAGE);
386386
loadFile(file, false);
387-
} catch (PdfException | IOException | com.itextpdf.io.IOException de) {
387+
} catch (PdfException | IOException | com.itextpdf.io.exceptions.IOException de) {
388388
JOptionPane.showMessageDialog(masterComponent, de.getMessage(), "Dialog", JOptionPane.ERROR_MESSAGE);
389389
} finally {
390390
try {
@@ -409,7 +409,7 @@ public void closeRoutine() {
409409
docToClose.close();
410410
}
411411
if (!pluginMode) {
412-
ownedFrame.setTitle("iText RUPS " + Version.getInstance().getVersion());
412+
ownedFrame.setTitle("iText RUPS " + ITextCoreProductData.getInstance().getVersion());
413413
}
414414
readerController.getParser().setDocument(null);
415415
}
@@ -423,11 +423,7 @@ public CompareTool.CompareResult compareWithDocument(PdfDocument document) {
423423
LoggerHelper.warn(LoggerMessages.COMPARED_DOCUMENT_IS_CLOSED, getClass());
424424
} else {
425425
CompareTool compareTool = new CompareTool().setCompareByContentErrorsLimit(100).disableCachedPagesComparison();
426-
try {
427-
return compareTool.compareByCatalog(getPdfFile().getPdfDocument(), document);
428-
} catch (IOException e) {
429-
LoggerHelper.warn(LoggerMessages.COMPARING_ERROR, e, getClass());
430-
}
426+
return compareTool.compareByCatalog(getPdfFile().getPdfDocument(), document);
431427
}
432428
return null;
433429
}

src/main/java/com/itextpdf/rups/io/FileChooserAction.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,4 @@ public void actionPerformed(ActionEvent evt) {
124124
protected abstract int showDialog();
125125

126126
protected abstract RupsEvent getEvent();
127-
128-
/**
129-
* A serial version UID.
130-
*/
131-
private static final long serialVersionUID = 2225830878098387118L;
132-
133127
}

src/main/java/com/itextpdf/rups/io/TextAreaOutputStream.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ public class TextAreaOutputStream extends OutputStream {
6161
* Constructs a TextAreaOutputStream.
6262
*
6363
* @param text the text area to which we want to write.
64-
* @throws IOException an exception
6564
*/
66-
public TextAreaOutputStream(JTextArea text) throws IOException {
65+
public TextAreaOutputStream(JTextArea text) {
6766
this.text = text;
6867
clear();
6968
}
@@ -79,7 +78,7 @@ public void clear() {
7978
* @see java.io.OutputStream#write(int)
8079
*/
8180
@Override
82-
public void write(int i) throws IOException {
81+
public void write(int i) {
8382
byte[] b = {(byte) i};
8483
write(b, 0, 1);
8584
}
@@ -88,7 +87,7 @@ public void write(int i) throws IOException {
8887
* @see java.io.OutputStream#write(byte[], int, int)
8988
*/
9089
@Override
91-
public void write(byte[] b, int off, int len) throws IOException {
90+
public void write(byte[] b, int off, int len) {
9291
String snippet = new String(b, off, len, StandardCharsets.UTF_8);
9392
text.append(snippet);
9493
}

src/main/java/com/itextpdf/rups/model/IndirectObjectFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This file is part of the iText (R) project.
4343
package com.itextpdf.rups.model;
4444

4545
import com.itextpdf.io.util.IntHashtable;
46-
import com.itextpdf.kernel.PdfException;
46+
import com.itextpdf.kernel.exceptions.PdfException;
4747
import com.itextpdf.kernel.pdf.*;
4848

4949
import java.lang.reflect.Field;

0 commit comments

Comments
 (0)