mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
added JDK8-compatibility comments
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user