You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2018/08/19 09:06:15 UTC
pdfbox-jbig2 git commit: PDFBOX-4290: reformat
Repository: pdfbox-jbig2
Updated Branches:
refs/heads/master 36b81329e -> 6a16d39ec
PDFBOX-4290: reformat
Project: http://git-wip-us.apache.org/repos/asf/pdfbox-jbig2/repo
Commit: http://git-wip-us.apache.org/repos/asf/pdfbox-jbig2/commit/6a16d39e
Tree: http://git-wip-us.apache.org/repos/asf/pdfbox-jbig2/tree/6a16d39e
Diff: http://git-wip-us.apache.org/repos/asf/pdfbox-jbig2/diff/6a16d39e
Branch: refs/heads/master
Commit: 6a16d39ec3b334779d702695a3c39bd3d2a07b58
Parents: 36b8132
Author: Tilman Hausherr <ti...@snafu.de>
Authored: Sun Aug 19 11:07:53 2018 +0200
Committer: Tilman Hausherr <ti...@snafu.de>
Committed: Sun Aug 19 11:07:53 2018 +0200
----------------------------------------------------------------------
.../pdfbox/jbig2/util/cache/SoftReferenceCacheTest.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/pdfbox-jbig2/blob/6a16d39e/src/test/java/org/apache/pdfbox/jbig2/util/cache/SoftReferenceCacheTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/pdfbox/jbig2/util/cache/SoftReferenceCacheTest.java b/src/test/java/org/apache/pdfbox/jbig2/util/cache/SoftReferenceCacheTest.java
index 4fa7d77..878de5b 100644
--- a/src/test/java/org/apache/pdfbox/jbig2/util/cache/SoftReferenceCacheTest.java
+++ b/src/test/java/org/apache/pdfbox/jbig2/util/cache/SoftReferenceCacheTest.java
@@ -20,7 +20,8 @@ package org.apache.pdfbox.jbig2.util.cache;
import org.junit.Assert;
import org.junit.Test;
-public class SoftReferenceCacheTest {
+public class SoftReferenceCacheTest
+{
private static final int KB = 1024;
private static final int MB = KB * KB;
@@ -28,19 +29,22 @@ public class SoftReferenceCacheTest {
* Should not throw an OutOfMemoryError
*/
@Test
- public void putDoesNotLeakMemory() {
+ public void putDoesNotLeakMemory()
+ {
Cache cache = CacheFactory.getCache();
cache.clear();
long maxHeapBytes = Runtime.getRuntime().maxMemory();
int halfEntrySizeEstimate = 8 * MB;
- for (int i = 0; i < (maxHeapBytes / halfEntrySizeEstimate) * 2; i++) {
+ for (int i = 0; i < (maxHeapBytes / halfEntrySizeEstimate) * 2; i++)
+ {
cache.put(new Long[KB][KB], new Long[KB][KB], halfEntrySizeEstimate);
}
}
@Test
- public void putAndGet() {
+ public void putAndGet()
+ {
Cache cache = CacheFactory.getCache();
cache.clear();
Object key = new Object();