Skip to content

Commit c4ff48d

Browse files
author
Egor Martsynkovsky
committed
Change order of constructors
Minor changes in test function DEVSIX-5705
1 parent 340d769 commit c4ff48d

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

kernel/src/main/java/com/itextpdf/kernel/pdf/PdfReader.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ public class PdfReader implements Closeable, Serializable {
122122
protected boolean hybridXref = false;
123123
protected boolean fixedXref = false;
124124
protected boolean xrefStm = false;
125-
126-
PdfReader(IRandomAccessSource byteSource, ReaderProperties properties, boolean closeStream) throws IOException {
127-
this.properties = properties;
128-
this.tokens = getOffsetTokeniser(byteSource, closeStream);
129-
}
130-
131125
/**
132126
* Constructs a new PdfReader.
133127
*
@@ -202,6 +196,11 @@ public PdfReader(String filename) throws IOException {
202196

203197
}
204198

199+
PdfReader(IRandomAccessSource byteSource, ReaderProperties properties, boolean closeStream) throws IOException {
200+
this.properties = properties;
201+
this.tokens = getOffsetTokeniser(byteSource, closeStream);
202+
}
203+
205204
/**
206205
* Close {@link PdfTokenizer}.
207206
*

kernel/src/test/java/com/itextpdf/kernel/pdf/PdfReaderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2045,7 +2045,8 @@ public void notCloseUserStreamTest() throws IOException {
20452045
Assert.assertEquals(-1, pdfStream.read());
20462046
}
20472047
}
2048-
private File copyFileForTest(String fileName, String copiedFileName) throws IOException {
2048+
2049+
private static File copyFileForTest(String fileName, String copiedFileName) throws IOException {
20492050
File copiedFile = new File(copiedFileName);
20502051
Files.copy(Paths.get(fileName), Paths.get(copiedFileName));
20512052
return copiedFile;

0 commit comments

Comments
 (0)