[libbluray-devel] Recent Java 7 versions changed

Janusz Dziemidowicz git at videolan.org
Wed Jan 8 21:28:01 CET 2014


libbluray | branch: master | Janusz Dziemidowicz <rraptorr at nails.eu.org> | Wed Jan  8 22:27:00 2014 +0200| [1ff3f52d0fc97610e3e8835dda083cdaccc44429] | committer: hpi1

Recent Java 7 versions changed
sun.awt.KeyboardFocusManagerPeerProvider.createKeyboardFocusManagerPeer()
method to
sun.awt.KeyboardFocusManagerPeerProvider.getKeyboardFocusManagerPeer(). This
causes BD-J initialization to fail with Java 7u45 (and most probably
earlier, I am not sure when the change occured). Fix this by providing
both methods. Tested on Java 6u45, 7u10 and 7u45.

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=1ff3f52d0fc97610e3e8835dda083cdaccc44429
---

 src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java              |    6 ++++++
 .../bdj/java-j2se/sun/awt/KeyboardFocusManagerPeerProvider.java  |    3 +++
 2 files changed, 9 insertions(+)

diff --git a/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java b/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java
index 26e89af..f323002 100644
--- a/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java
+++ b/src/libbluray/bdj/java-j2se/java/awt/BDToolkit.java
@@ -82,8 +82,14 @@ public class BDToolkit extends Toolkit implements KeyboardFocusManagerPeerProvid
         BDKeyboardFocusManagerPeer.init(window);
     }
 
+    // required by older Java 7 versions
     public KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager kfm)
     {
+        return getKeyboardFocusManagerPeer();
+    }
+
+    public KeyboardFocusManagerPeer getKeyboardFocusManagerPeer()
+    {
         return BDKeyboardFocusManagerPeer.getInstance();
     }
 
diff --git a/src/libbluray/bdj/java-j2se/sun/awt/KeyboardFocusManagerPeerProvider.java b/src/libbluray/bdj/java-j2se/sun/awt/KeyboardFocusManagerPeerProvider.java
index b39e0f6..c3c4af9 100644
--- a/src/libbluray/bdj/java-j2se/sun/awt/KeyboardFocusManagerPeerProvider.java
+++ b/src/libbluray/bdj/java-j2se/sun/awt/KeyboardFocusManagerPeerProvider.java
@@ -23,5 +23,8 @@ import java.awt.KeyboardFocusManager;
 import java.awt.peer.KeyboardFocusManagerPeer;
 
 public abstract interface KeyboardFocusManagerPeerProvider {
+    // required by older Java 7 versions
     public abstract KeyboardFocusManagerPeer createKeyboardFocusManagerPeer(KeyboardFocusManager kfm);
+
+    public abstract KeyboardFocusManagerPeer getKeyboardFocusManagerPeer();
 }



More information about the libbluray-devel mailing list