Skip to content

Commit 957b001

Browse files
committed
[RELEASE] merging 'release/7.0.1' into 'master'
2 parents ed042f3 + d85f0bc commit 957b001

File tree

1,015 files changed

+20846
-8466
lines changed

Some content is hidden

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

1,015 files changed

+20846
-8466
lines changed

BUILDING.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,34 @@ To build iText 7, [Maven][1] must be installed.
22

33
Running install without a profile will generate the iText 7 jars:
44
```bash
5-
$ mvn clean install -Dmaven.test.skip=true | tee mvn.log
5+
$ mvn clean install \
6+
-Dmaven.test.skip=true \
7+
-Dmaven.javadoc.failOnError=false \
8+
| tee mvn.log
69
```
710

811
To run the tests, [Ghostscript][2] and [Imagemagick][3] must be installed.
912
```bash
10-
$ mvn clean install -Dmaven.test.failure.ignore=false -DgsExec=$(which gs) -DcompareExec=$(which compare) | tee mvn.log
13+
$ mvn clean install \
14+
-Dmaven.test.failure.ignore=false \
15+
-DgsExec=$(which gs) \
16+
-DcompareExec=$(which compare) \
17+
-Dmaven.javadoc.failOnError=false \
18+
| tee mvn.log
1119
```
1220

1321
You can use the supplied `Vagrantfile` to get a [Vagrant][4] VM ([Ubuntu][5] 14.04 LTS - Trusty Tahr, with [VirtualBox][6]) with all the required software installed.
1422
```bash
1523
$ vagrant box add ubuntu/trusty64
1624
$ vagrant up
17-
$ vagrant ssh -- 'cd /vagrant ; mvn clean install -Dmaven.test.skip=true' | tee mvn.log
25+
$ vagrant ssh -- \
26+
'cd /vagrant ; mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.failOnError=false' \
27+
| tee mvn.log
1828
```
1929

2030
[1]: http://maven.apache.org/
2131
[2]: http://www.ghostscript.com/
2232
[3]: http://www.imagemagick.org/
2333
[4]: https://www.vagrantup.com/
2434
[5]: http://www.ubuntu.com/
25-
[6]: https://www.virtualbox.org/
35+
[6]: https://www.virtualbox.org/

barcodes/pom.xml

Lines changed: 1 addition & 1 deletion
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.0.0</version>
8+
<version>7.0.1</version>
99
</parent>
1010

1111
<artifactId>barcodes</artifactId>

barcodes/src/main/java/com/itextpdf/barcodes/Barcode128.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV
@@ -44,15 +43,16 @@ This file is part of the iText (R) project.
4443
*/
4544
package com.itextpdf.barcodes;
4645

47-
import com.itextpdf.kernel.PdfException;
4846
import com.itextpdf.io.font.FontConstants;
4947
import com.itextpdf.io.font.PdfEncodings;
50-
import com.itextpdf.kernel.geom.Rectangle;
51-
import com.itextpdf.kernel.font.PdfFontFactory;
52-
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
48+
import com.itextpdf.kernel.PdfException;
5349
import com.itextpdf.kernel.color.Color;
50+
import com.itextpdf.kernel.font.PdfFontFactory;
51+
import com.itextpdf.kernel.geom.Rectangle;
5452
import com.itextpdf.kernel.pdf.PdfDocument;
53+
import com.itextpdf.kernel.pdf.canvas.PdfCanvas;
5554

55+
import java.io.IOException;
5656
import java.util.HashMap;
5757
import java.util.Map;
5858

@@ -237,8 +237,8 @@ public Barcode128(PdfDocument document) {
237237
barHeight = size * 3;
238238
textAlignment = ALIGN_CENTER;
239239
codeType = CODE128;
240-
} catch (Exception e) {
241-
throw new RuntimeException(e);
240+
} catch (IOException e) {
241+
throw new RuntimeException("Cannot create font", e);
242242
}
243243
}
244244

@@ -294,8 +294,8 @@ public static String getHumanReadableUCCEAN(String code) {
294294
for (int k = 2; k < 5; ++k) {
295295
if (code.length() < k)
296296
break;
297-
Integer subcode = Integer.parseInt(code.substring(0, k));
298-
n = ais.containsKey(subcode) ? ais.get(subcode) : 0;
297+
int subcode = Integer.parseInt(code.substring(0, k));
298+
n = ais.containsKey(subcode) ? (int)ais.get(subcode) : 0;
299299
if (n != 0) {
300300
idlen = k;
301301
break;
@@ -685,7 +685,7 @@ public void setCode(String code) {
685685
throw new IllegalArgumentException("AI is too short");
686686
}
687687
int ai = Integer.parseInt(sai);
688-
int len = ais.get(ai);
688+
int len = (int)ais.get(ai);
689689
if (len == 0) {
690690
throw new IllegalArgumentException("AI not found");
691691
}

barcodes/src/main/java/com/itextpdf/barcodes/Barcode1D.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV

barcodes/src/main/java/com/itextpdf/barcodes/Barcode2D.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV

barcodes/src/main/java/com/itextpdf/barcodes/Barcode39.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeCodabar.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV
@@ -55,7 +54,7 @@ This file is part of the iText (R) project.
5554

5655
public class BarcodeCodabar extends Barcode1D {
5756

58-
/**
57+
/**
5958
* The index chars to <CODE>BARS</CODE>.
6059
*/
6160
private static final String CHARS = "0123456789-$:/.+ABCD";
@@ -120,19 +119,19 @@ public static byte[] getBarsCodabar(String text) {
120119
text = text.toUpperCase();
121120
int len = text.length();
122121
if (len < 2) {
123-
throw new IllegalArgumentException(PdfException.CodabarMustHaveAtLeastAStartAndStopCharacter);
122+
throw new IllegalArgumentException(PdfException.CodabarMustHaveAtLeastStartAndStopCharacter);
124123
}
125124
if (CHARS.indexOf(text.charAt(0)) < START_STOP_IDX || CHARS.indexOf(text.charAt(len - 1)) < START_STOP_IDX) {
126125
throw new IllegalArgumentException(PdfException.CodabarMustHaveOneAbcdAsStartStopCharacter);
127126
}
128-
byte[] bars= new byte[text.length() * 8 - 1];
127+
byte[] bars = new byte[text.length() * 8 - 1];
129128
for (int k = 0; k < len; ++k) {
130129
int idx = CHARS.indexOf(text.charAt(k));
131130
if (idx >= START_STOP_IDX && k > 0 && k < len - 1) {
132-
throw new IllegalArgumentException(PdfException.CodabarStartStopCharacterAreOnlyExtremes);
131+
throw new IllegalArgumentException(PdfException.InCodabarStartStopCharactersAreOnlyAllowedAtTheExtremes);
133132
}
134133
if (idx < 0) {
135-
throw new IllegalArgumentException(PdfException.CodabarCharacterOneIsIllegal);
134+
throw new IllegalArgumentException(PdfException.IllegalCharacterInCodabarBarcode);
136135
}
137136
System.arraycopy(BARS[idx], 0, bars, k * 8, 7);
138137
}

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeDataMatrix.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEAN.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV

barcodes/src/main/java/com/itextpdf/barcodes/BarcodeEANSUPP.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
$Id$
32
43
This file is part of the iText (R) project.
54
Copyright (c) 1998-2016 iText Group NV

0 commit comments

Comments
 (0)