Petri Hintukainen pushed to branch master at VideoLAN / libbluray
Commits:
48d76414 by Fridrich Strba at 2025-10-25T13:23:33+03:00
Fix build with java 23
1) Thread.stop and ThreadGroup.stop are deprecated since 1.2 and removed
in Java 23. Before that, they only throw UnsupportedOperationException
when called. So call them by reflection and if they don't exist, just
ignore them.
2) Implement the new WindowPeer interface method
getAppropriateGraphicsConfiguration as a pass-through method
Fixes #46.
- - - - -
2 changed files:
- src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java
- src/libbluray/bdj/java-j2se/org/videolan/PortingHelper.java
Changes:
=====================================
src/libbluray/bdj/java-j2se/java/awt/peer/BDFramePeer.java
=====================================
@@ -157,6 +157,10 @@ public class BDFramePeer extends BDComponentPeer
implements FramePeer
return true;
}
+ public GraphicsConfiguration
getAppropriateGraphicsConfiguration(GraphicsConfiguration gc) {
+ return gc;
+ }
+
//
// ComponentPeer
//
=====================================
src/libbluray/bdj/java-j2se/org/videolan/PortingHelper.java
=====================================
@@ -19,14 +19,32 @@
package org.videolan;
+import java.lang.reflect.InvocationTargetException;
+
public class PortingHelper {
public static void stopThread(Thread t) {
- t.stop();
+ try {
+ Thread.class.getMethod("stop").invoke(t);
+ } catch (NoSuchMethodException e) {
+ // ignore
+ } catch (IllegalAccessException e) {
+ // ignore
+ } catch (InvocationTargetException e) {
+ // ignore
+ }
}
public static void stopThreadGroup(ThreadGroup t) {
- t.stop();
+ try {
+ ThreadGroup.class.getMethod("stop").invoke(t);
+ } catch (NoSuchMethodException e) {
+ // ignore
+ } catch (IllegalAccessException e) {
+ // ignore
+ } catch (InvocationTargetException e) {
+ // ignore
+ }
}
public static String dumpStack(Thread t) {
View it on GitLab:
https://code.videolan.org/videolan/libbluray/-/commit/48d76414455ab6a7d270cec96d6e83673df8a00d
--
View it on GitLab:
https://code.videolan.org/videolan/libbluray/-/commit/48d76414455ab6a7d270cec96d6e83673df8a00d
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
libbluray-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libbluray-devel