Skip to content

Commit 8029098

Browse files
committed
Remove some redundant code
DEVSIX-6548
1 parent c26866f commit 8029098

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

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

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,41 +2628,6 @@ public void tokensPositionIsNotUpdatedWhileReadingLengthTest() throws IOExceptio
26282628
}
26292629
}
26302630

2631-
/**
2632-
* Returns the current memory use.
2633-
*
2634-
* @return the current memory use
2635-
*/
2636-
private static long getMemoryUse() {
2637-
garbageCollect();
2638-
garbageCollect();
2639-
garbageCollect();
2640-
garbageCollect();
2641-
long totalMemory = Runtime.getRuntime().totalMemory();
2642-
garbageCollect();
2643-
garbageCollect();
2644-
long freeMemory = Runtime.getRuntime().freeMemory();
2645-
return (totalMemory - freeMemory);
2646-
}
2647-
2648-
/**
2649-
* Makes sure all garbage is cleared from the memory.
2650-
*/
2651-
private static void garbageCollect() {
2652-
try {
2653-
System.gc();
2654-
Thread.sleep(200);
2655-
System.runFinalization();
2656-
Thread.sleep(200);
2657-
System.gc();
2658-
Thread.sleep(200);
2659-
System.runFinalization();
2660-
Thread.sleep(200);
2661-
} catch (InterruptedException ex) {
2662-
ex.printStackTrace();
2663-
}
2664-
}
2665-
26662631
private static PdfDictionary getTestPdfDictionary() {
26672632
HashMap<PdfName, PdfObject> tmpMap = new HashMap<PdfName, PdfObject>();
26682633
tmpMap.put(new PdfName("b"), new PdfName("c"));

0 commit comments

Comments
 (0)