From b3520090e00d7dae7fe7af5a3604cbfc2dd12dc9 Mon Sep 17 00:00:00 2001 From: Matthias Wiedemann Date: Fri, 2 Feb 2024 10:00:25 +0000 Subject: [PATCH] suppress deprecation error from forbiddenapis check --- src/main/java9/com/jcraft/jsch/JavaVersion.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java9/com/jcraft/jsch/JavaVersion.java b/src/main/java9/com/jcraft/jsch/JavaVersion.java index c3f8afb3..6d9fd0d9 100644 --- a/src/main/java9/com/jcraft/jsch/JavaVersion.java +++ b/src/main/java9/com/jcraft/jsch/JavaVersion.java @@ -1,7 +1,10 @@ package com.jcraft.jsch; +import com.jcraft.jsch.annotations.SuppressForbiddenApi; + final class JavaVersion { + @SuppressForbiddenApi("jdk-deprecated") static int getVersion() { return Runtime.version().major(); }