added JDK8-compatibility comments

This commit is contained in:
Alexey Kudravtsev
2015-05-27 13:18:41 +03:00
parent 32d5003347
commit cf6f66d554
3 changed files with 14 additions and 0 deletions
@@ -15,6 +15,7 @@
*/
package com.intellij.openapi.vfs.impl.jrt;
import com.intellij.Patches;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.impl.ArchiveHandler;
import com.intellij.reference.SoftReference;
@@ -34,6 +35,9 @@ import java.util.List;
import java.util.Map;
class JrtHandler extends ArchiveHandler {
static {
assert Patches.USE_REFLECTION_TO_ACCESS_JDK8;
}
private static final URI ROOT_URI = URI.create("jrt:/");
private static final Map<String, Object> EMPTY_ENV = Collections.emptyMap();
@@ -15,6 +15,7 @@
*/
package com.intellij.concurrency;
import com.intellij.Patches;
import com.intellij.openapi.application.ex.ApplicationManagerEx;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.progress.ProgressIndicator;
@@ -41,6 +42,9 @@ import java.util.concurrent.atomic.AtomicLong;
*/
public class JobLauncherImpl extends JobLauncher {
private static final AtomicLong bits = new AtomicLong();
static {
assert Patches.USE_REFLECTION_TO_ACCESS_JDK8 : "Please port to java.util.concurrent.ForkJoinPool";
}
private static final ForkJoinPool.ForkJoinWorkerThreadFactory FACTORY = new ForkJoinPool.ForkJoinWorkerThreadFactory() {
@Override
public ForkJoinWorkerThread newThread(ForkJoinPool pool) {
@@ -103,6 +103,12 @@ public class Patches {
*/
public static final boolean USE_REFLECTION_TO_ACCESS_JDK7 = true;
/**
* Marker field to find all usages of the reflective access to JDK 7-specific methods
* which need to be changed when migrated to JDK 8
*/
public static final boolean USE_REFLECTION_TO_ACCESS_JDK8 = true;
/**
* AtomicIntegerFieldUpdater does not work when SecurityManager is installed
* fixed in JDK8