[jajuk] 05/06: Fixed the build failure with Java 9 (Closes: #873221)

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Wed Nov 29 12:11:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository jajuk.

commit 420c0b0d41563d0535149f31f05608173f8765c2
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Wed Nov 29 13:09:36 2017 +0100

    Fixed the build failure with Java 9 (Closes: #873221)
---
 debian/changelog                            |   1 +
 debian/patches/08_java9_compatibility.patch | 113 ++++++++++++++++++++++++++++
 debian/patches/series                       |   1 +
 3 files changed, 115 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 4f4601d..3b69dac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 jajuk (1:1.10.9+dfsg2-4) UNRELEASED; urgency=medium
 
   * Team upload.
+  * Fixed the build failure with Java 9 (Closes: #873221)
   * Build with the DH sequencer instead of CDBS
   * Fixed the mangling of the Debian version in debian/watch
   * Standards-Version updated to 4.1.1
diff --git a/debian/patches/08_java9_compatibility.patch b/debian/patches/08_java9_compatibility.patch
new file mode 100644
index 0000000..36d0514
--- /dev/null
+++ b/debian/patches/08_java9_compatibility.patch
@@ -0,0 +1,113 @@
+Description: Fixes the compilation errors with Java 9
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/main/java/org/jajuk/ui/views/TracksTreeView.java
++++ b/src/main/java/org/jajuk/ui/views/TracksTreeView.java
+@@ -247,7 +247,7 @@
+         Album album = track.getAlbum();
+         // create genre
+         {
+-          Enumeration<GenreNode> e = top.children();
++          Enumeration<GenreNode> e = (Enumeration) top.children();
+           boolean b = false;
+           while (e.hasMoreElements()) { // check the genre doesn't
+             // already exist
+@@ -268,7 +268,7 @@
+         }
+         // create artist
+         {
+-          Enumeration<ArtistNode> e2 = genreNode.children();
++          Enumeration<ArtistNode> e2 = (Enumeration) genreNode.children();
+           boolean b = false;
+           while (e2.hasMoreElements()) { // check if the artist doesn't
+             // already exist
+@@ -288,7 +288,7 @@
+         if (artistNode == null) {
+           continue;
+         }
+-        Enumeration<AlbumNode> e3 = artistNode.children();
++        Enumeration<AlbumNode> e3 = (Enumeration) artistNode.children();
+         boolean b = false;
+         while (e3.hasMoreElements()) {
+           AlbumNode an = e3.nextElement();
+@@ -324,7 +324,7 @@
+         Album album = track.getAlbum();
+         // create artist
+         {
+-          Enumeration<ArtistNode> e = top.children();
++          Enumeration<ArtistNode> e = (Enumeration) top.children();
+           boolean b = false;
+           while (e.hasMoreElements()) { // check if the artist doesn't
+             // already exist
+@@ -344,7 +344,7 @@
+           continue;
+         }
+         // create album
+-        Enumeration<AlbumNode> e2 = artistNode.children();
++        Enumeration<AlbumNode> e2 = (Enumeration) artistNode.children();
+         boolean b = false;
+         while (e2.hasMoreElements()) { // check if the album doesn't
+           // already exist
+@@ -382,7 +382,7 @@
+         Year year = track.getYear();
+         // create Year
+         {
+-          Enumeration<YearNode> e = top.children();
++          Enumeration<YearNode> e = (Enumeration) top.children();
+           boolean b = false;
+           // check if the artist doesn't already exist
+           while (e.hasMoreElements()) {
+@@ -402,7 +402,7 @@
+           continue;
+         }
+         // create album
+-        Enumeration<AlbumNode> e1 = yearNode.children();
++        Enumeration<AlbumNode> e1 = (Enumeration) yearNode.children();
+         boolean b = false;
+         while (e1.hasMoreElements()) { // check if the album doesn't
+           // already exist
+@@ -539,7 +539,7 @@
+   private void addTrackAndAlbum(DefaultMutableTreeNode node, Track track) {
+     boolean bAlbumExists = false;
+     AlbumNode currentAlbum = null;
+-    Enumeration<AlbumNode> e = node.children();
++    Enumeration<AlbumNode> e = (Enumeration) node.children();
+     while (e.hasMoreElements()) {
+       AlbumNode an = e.nextElement();
+       if (an.getAlbum().equals(track.getAlbum())) {
+@@ -678,7 +678,7 @@
+           }
+         }
+         // return all child nodes recursively
+-        Enumeration<DefaultMutableTreeNode> e2 = ((DefaultMutableTreeNode) o)
++        Enumeration<DefaultMutableTreeNode> e2 = (Enumeration) ((DefaultMutableTreeNode) o)
+             .depthFirstEnumeration();
+         while (e2.hasMoreElements()) {
+           DefaultMutableTreeNode node = e2.nextElement();
+@@ -1167,7 +1167,7 @@
+   @Override
+   public Object getUserObject() {
+     List<Item> out = new ArrayList<Item>(10);
+-    Enumeration<DefaultMutableTreeNode> childrens = children();
++    Enumeration<DefaultMutableTreeNode> childrens = (Enumeration) children();
+     while (childrens.hasMoreElements()) {
+       DefaultMutableTreeNode node = childrens.nextElement();
+       out.add((Item) node.getUserObject());
+@@ -1243,4 +1243,4 @@
+       year.setProperty(Const.XML_EXPANDED, true);
+     }
+   }
+-}
+\ No newline at end of file
++}
+--- a/src/main/java/org/jajuk/ui/views/FilesTreeView.java
++++ b/src/main/java/org/jajuk/ui/views/FilesTreeView.java
+@@ -701,7 +701,7 @@
+       for (TreePath element : paths) {
+         Object o = element.getLastPathComponent();
+         // return all childs nodes recursively
+-        Enumeration<DefaultMutableTreeNode> e2 = ((DefaultMutableTreeNode) o)
++        Enumeration<DefaultMutableTreeNode> e2 = (Enumeration) ((DefaultMutableTreeNode) o)
+             .depthFirstEnumeration();
+         while (e2.hasMoreElements()) {
+           DefaultMutableTreeNode node = e2.nextElement();
diff --git a/debian/patches/series b/debian/patches/series
index e751a81..b746bbf 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 05_fix_version.patch
 06_scrolling_stuff.patch
 jgoodies-animation-1.4.3.patch
+08_java9_compatibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jajuk.git



More information about the pkg-java-commits mailing list