From ed5a6ce7826f89824b81ce5b269110b26e562282 Mon Sep 17 00:00:00 2001 From: Daniel Huckaby Date: Fri, 24 Jan 2014 16:54:12 -0600 Subject: [PATCH] Reverted to Java 6 --- prime/build.gradle | 5 ----- prime/src/main/java/com/handlerexploit/prime/Prime.java | 6 +++--- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/prime/build.gradle b/prime/build.gradle index 93be40a..a128fec 100644 --- a/prime/build.gradle +++ b/prime/build.gradle @@ -19,11 +19,6 @@ android { compileSdkVersion 19 buildToolsVersion "19" - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_7 - targetCompatibility = JavaVersion.VERSION_1_7 - } - defaultConfig { minSdkVersion 9 targetSdkVersion 19 diff --git a/prime/src/main/java/com/handlerexploit/prime/Prime.java b/prime/src/main/java/com/handlerexploit/prime/Prime.java index fdf74fe..cc031cb 100644 --- a/prime/src/main/java/com/handlerexploit/prime/Prime.java +++ b/prime/src/main/java/com/handlerexploit/prime/Prime.java @@ -54,8 +54,8 @@ public final class Prime { private final Executor mNetworkExecutorService = newLowPriorityCachedFixedThreadPool(Runtime.getRuntime().availableProcessors() * 4); private final Executor mDiskExecutorService = Executors.newCachedThreadPool(); - private final LruCache mLockCache = new LruCache<>(100); - private final LruCache mBadUrlCache = new LruCache<>(50); + private final LruCache mLockCache = new LruCache(100); + private final LruCache mBadUrlCache = new LruCache(50); private Prime(MemoryCache memoryCache, BitmapOptionsFactory bitmapOptionsFactory, File diskCacheDirectory, URLConnectionClient urlConnectionClient, boolean debugging, int maxDiskCacheByteSize) { mMemoryCache = memoryCache; @@ -412,7 +412,7 @@ private static ExecutorService newLowPriorityCachedFixedThreadPool(int maximumPo int corePoolSize = 0; long keepAliveTime = 60L; TimeUnit unit = TimeUnit.SECONDS; - BlockingQueue workQueue = new LinkedBlockingQueue<>(); + BlockingQueue workQueue = new LinkedBlockingQueue(); ThreadFactory factory = new LowPriorityThreadFactory(); RejectedExecutionHandler handler = new ThreadPoolExecutor.CallerRunsPolicy();