Package: mediathekview / 13.2.1-3

java9.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From: Markus Koschany <apo@debian.org>
Date: Sun, 18 Nov 2018 19:22:04 +0100
Subject: java9

Fix FTBFS with Java 9 and later.

Forwarded: no
---
 src/main/java/mSearch/daten/DatenFilm.java | 10 ++++++----
 src/main/java/mediathek/tool/TModel.java   |  3 ++-
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/main/java/mSearch/daten/DatenFilm.java b/src/main/java/mSearch/daten/DatenFilm.java
index dfea0cf..a93c374 100644
--- a/src/main/java/mSearch/daten/DatenFilm.java
+++ b/src/main/java/mSearch/daten/DatenFilm.java
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import org.h2.jdbc.JdbcSQLException;
 import org.jetbrains.annotations.NotNull;
-import sun.misc.Cleaner;
+import java.lang.ref.Cleaner;
 
 import java.lang.ref.WeakReference;
 import java.sql.*;
@@ -136,6 +136,7 @@ public class DatenFilm implements AutoCloseable, Comparable<DatenFilm> {
     private int databaseFilmNumber;
     private boolean neuerFilm = false;
     private Cleaner cleaner = null;
+    private Cleaner.Cleanable cleanable = null;
     /**
      * Future used for writing description into database.
      * Will be checked before each read if finished
@@ -221,7 +222,8 @@ public class DatenFilm implements AutoCloseable, Comparable<DatenFilm> {
 
     private void installCleanupTask() {
         DatenFilmCleanupTask task = new DatenFilmCleanupTask(databaseFilmNumber);
-        cleaner = Cleaner.create(this, task);
+        Cleaner cleaner = Cleaner.create();
+        cleanable = cleaner.register(this, task);
     }
 
     /**
@@ -273,8 +275,8 @@ public class DatenFilm implements AutoCloseable, Comparable<DatenFilm> {
     @Override
     public void close() {
 
-        if (cleaner != null)
-            cleaner.clean();
+        if (cleanable != null)
+            cleanable.clean();
     }
 
     /**
diff --git a/src/main/java/mediathek/tool/TModel.java b/src/main/java/mediathek/tool/TModel.java
index c7a5ee0..4947969 100644
--- a/src/main/java/mediathek/tool/TModel.java
+++ b/src/main/java/mediathek/tool/TModel.java
@@ -21,6 +21,7 @@ package mediathek.tool;
 
 import javax.swing.table.DefaultTableModel;
 import java.util.List;
+import java.util.Vector;
 
 @SuppressWarnings("serial")
 public class TModel extends DefaultTableModel {
@@ -41,7 +42,7 @@ public class TModel extends DefaultTableModel {
         // liefert die Zeile in der die erste Spalte idx enthält
         // die Indexspalte ist die SPALTE 0!!!!
         int ret = 0;
-        for (List<Integer> list : (Iterable<List<Integer>>) getDataVector()) {
+        for (List<Integer> list : (Vector<Vector>) getDataVector()) {
             if (list.get(0) == idxWert) {
                 return ret;
             }