diff --git a/libbluray-April2022CPU.patch b/libbluray-April2022CPU.patch
new file mode 100644
index 0000000..2cabcef
--- /dev/null
+++ b/libbluray-April2022CPU.patch
@@ -0,0 +1,20 @@
+--- libbluray-1.3.1/src/libbluray/bdj/java/java/io/BDFileSystem.java 2022-03-03 18:05:27.000000000 +0100
++++ libbluray-1.3.1/src/libbluray/bdj/java/java/io/BDFileSystem.java 2022-04-21 17:35:16.594935352 +0200
+@@ -227,6 +227,17 @@
+ return fs.isAbsolute(f);
+ }
+
++ public boolean isInvalid(File f) {
++ try {
++ Method m = fs.getClass().getDeclaredMethod("isInvalid", new Class[] { File.class });
++ Object[] args = new Object[] {(Object)f};
++ Boolean result = (Boolean)m.invoke(fs, args);
++ return result.booleanValue();
++ } finally {
++ return false;
++ }
++ }
++
+ public String resolve(File f) {
+ if (!booted)
+ return fs.resolve(f);
diff --git a/libbluray-java9.patch b/libbluray-java9.patch
deleted file mode 100644
index b39cd35..0000000
--- a/libbluray-java9.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- libbluray-1.1.2/src/libbluray/bdj/build.xml.orig 2019-08-03 18:40:05.427564607 +0200
-+++ libbluray-1.1.2/src/libbluray/bdj/build.xml 2019-08-03 18:40:05.451564195 +0200
-@@ -8,10 +8,9 @@
-
-
-
--
-
--
--
-+
-+
-
-
-
-@@ -22,13 +21,11 @@
-
-
-
-
-
-
-
-
diff --git a/libbluray.changes b/libbluray.changes
index 07ce884..d9c0c7f 100644
--- a/libbluray.changes
+++ b/libbluray.changes
@@ -1,3 +1,14 @@
+-------------------------------------------------------------------
+Thu Apr 21 15:17:38 UTC 2022 - Fridrich Strba
+
+- Removed patch:
+ * libbluray-java9.patch
+ + Does not have any effect in the current build
+- Added patch:
+ * libbluray-April2022CPU.patch
+ + implement the new java.io.FileSystem.isInvalid method
+ that entered all supported java versions with April 2022 CPU
+
-------------------------------------------------------------------
Sat Apr 9 11:37:54 UTC 2022 - Dirk Müller
diff --git a/libbluray.spec b/libbluray.spec
index dc64a72..1f7442c 100644
--- a/libbluray.spec
+++ b/libbluray.spec
@@ -28,7 +28,7 @@ URL: https://www.videolan.org/developers/libbluray.html
Source0: https://download.videolan.org/pub/videolan/%{name}/%{version}/%{name}-%{version}.tar.bz2
Source99: baselibs.conf
Patch0: libbluray-pkgconfig.patch
-Patch1: libbluray-java9.patch
+Patch1: libbluray-April2022CPU.patch
BuildRequires: ant
BuildRequires: java-devel >= 1.8
BuildRequires: libtool
@@ -91,9 +91,7 @@ MPlayer). We, the authors of this library, do not condone nor endorse piracy.
%prep
%setup -q
%patch0 -p1
-%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 9}%{!?pkg_vcmp:0}
%patch1 -p1
-%endif
%build
%configure \