mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-13 15:52:01 +07:00
[util] API cleanup: mark deprecated unused API for removal (IJPL-156972)
Deprecated APIs which still have internal usage are marked as internal to ensure that new external usages won't appear. GitOrigin-RevId: 821609f24997ba219208e2668c89ac5842ccf758
This commit is contained in:
committed by
intellij-monorepo-bot
parent
285cdfb636
commit
3b960c6f77
@@ -208,6 +208,7 @@ fun Path.isFile(): Boolean = isRegularFile()
|
||||
@Suppress("DeprecatedCallableAddReplaceWith")
|
||||
fun Path.size(): Long = fileSize()
|
||||
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@Deprecated(message = "Use kotlin.io.path.getLastModifiedTime", level = DeprecationLevel.ERROR)
|
||||
@Suppress("DeprecatedCallableAddReplaceWith")
|
||||
fun Path.lastModified(): FileTime = getLastModifiedTime()
|
||||
@@ -221,10 +222,12 @@ fun Path.isAncestor(child: Path): Boolean = child.startsWith(this)
|
||||
@Throws(IOException::class)
|
||||
fun Path.inputStream(): InputStream = inputStream()
|
||||
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@Deprecated(message = "Trivial, just inline", ReplaceWith("resolve(relativePath).write(data.toByteArray())"), level = DeprecationLevel.ERROR)
|
||||
@Throws(IOException::class)
|
||||
fun Path.writeChild(relativePath: String, data: String): Path = resolve(relativePath).write(data.toByteArray())
|
||||
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@Deprecated(message = "Use `kotlin.io.path.createSymbolicLinkPointingTo` with `com.intellij.util.io.createParentDirectories`", level = DeprecationLevel.ERROR)
|
||||
@Suppress("DeprecatedCallableAddReplaceWith")
|
||||
fun Path.createSymbolicLink(target: Path): Path = this.createParentDirectories().createSymbolicLinkPointingTo(target)
|
||||
|
||||
@@ -3649,23 +3649,6 @@ f:com.intellij.util.containers.NotNullList
|
||||
- get(I):java.lang.Object
|
||||
- set(I,java.lang.Object):java.lang.Object
|
||||
- subList(I,I):java.util.List
|
||||
f:com.intellij.util.containers.ObjectIntHashMap
|
||||
- com.intellij.util.containers.ObjectIntMap
|
||||
- <init>():V
|
||||
- <init>(I):V
|
||||
- clear():V
|
||||
- containsKey(java.lang.Object):Z
|
||||
- containsValue(I):Z
|
||||
- entries():java.lang.Iterable
|
||||
- get(java.lang.Object):I
|
||||
- get(java.lang.Object,I):I
|
||||
- getOrDefault(java.lang.Object,I):I
|
||||
- isEmpty():Z
|
||||
- keySet():java.util.Set
|
||||
- put(java.lang.Object,I):I
|
||||
- remove(java.lang.Object):I
|
||||
- size():I
|
||||
- values():I[]
|
||||
com.intellij.util.containers.ObjectIntMap
|
||||
- a:clear():V
|
||||
- a:containsKey(java.lang.Object):Z
|
||||
|
||||
@@ -373,6 +373,7 @@ public final class JDOMUtil {
|
||||
/**
|
||||
* @deprecated Use {@link #write(Element, Path, String)}
|
||||
*/
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@Deprecated
|
||||
public static void write(@NotNull Parent element, @NotNull File file, @NotNull String lineSeparator) throws IOException {
|
||||
FileUtilRt.createParentDirs(file);
|
||||
|
||||
@@ -85,6 +85,7 @@ fun Path.findOrCreateDirectory(relativePath: String): Path {
|
||||
}
|
||||
|
||||
@Deprecated("Do not use", level = DeprecationLevel.ERROR)
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@ApiStatus.Internal
|
||||
fun String.toNioPath(): Path {
|
||||
return Paths.get(FileUtilRt.toSystemDependentName(this))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
package com.intellij.util
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import java.util.concurrent.atomic.AtomicReference
|
||||
import kotlin.contracts.ExperimentalContracts
|
||||
import kotlin.contracts.InvocationKind
|
||||
@@ -26,6 +27,7 @@ inline fun <T> runIf(condition: Boolean, block: () -> T): T? {
|
||||
return if (condition) block() else null
|
||||
}
|
||||
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@Deprecated("""
|
||||
Unfortunately, this function provokes cryptic code, please do not use it.
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ public interface Convertor<Src, Dst> extends Function<Src, Dst> {
|
||||
/**
|
||||
* @deprecated this isn't needed since this interface extends from {@link Function}
|
||||
*/
|
||||
@ApiStatus.ScheduledForRemoval
|
||||
@Deprecated
|
||||
default @NotNull Function<Src,Dst> asFunction() {
|
||||
return this;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.intellij.util.containers;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Set;
|
||||
@@ -11,6 +12,7 @@ import java.util.Set;
|
||||
* return -1 instead of 0 if no such mapping exists
|
||||
* @deprecated Use {@link Object2IntOpenHashMap}
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@Deprecated
|
||||
public final class ObjectIntHashMap<K> implements ObjectIntMap<K> {
|
||||
private final Object2IntMap<K> myMap;
|
||||
|
||||
@@ -24,7 +24,7 @@ public final class ComponentUtil {
|
||||
/**
|
||||
* @deprecated use {@link ClientProperty#get(Component, Key)} instead
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public static <T> T getClientProperty(@NotNull JComponent component, @NotNull Key<T> key) {
|
||||
return ClientProperty.get(component, key);
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ public final class RelativeRectangle {
|
||||
/**
|
||||
* @deprecated Use the overload that takes a DevicePoint, which handles locations on different screens with different scaling factors
|
||||
*/
|
||||
@Deprecated
|
||||
@Deprecated(forRemoval = true)
|
||||
public boolean contains(final RelativePoint relativePoint) {
|
||||
return contains(new DevicePoint(relativePoint));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user