diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/java9-classloader.patch | 51 | ||||
-rw-r--r-- | debian/patches/java9-lookandfeel.patch | 76 | ||||
-rw-r--r-- | debian/patches/series | 2 | ||||
-rw-r--r-- | debian/patches/update-maven.patch | 49 |
4 files changed, 173 insertions, 5 deletions
diff --git a/debian/patches/java9-classloader.patch b/debian/patches/java9-classloader.patch new file mode 100644 index 00000000..ae1ef574 --- /dev/null +++ b/debian/patches/java9-classloader.patch @@ -0,0 +1,51 @@ +commit 92c96858616581c2109d36488e96c84c72d8bbc7 +Author: Erich Schubert <schubert@informatik.uni-heidelberg.de> +Date: Wed Mar 28 12:40:18 2018 +0200 + + Java 9 compatibility fixes. + +--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/utilities/ELKIServiceRegistry.java ++++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/utilities/ELKIServiceRegistry.java +@@ -23,7 +23,6 @@ + */ + + import java.lang.reflect.Modifier; +-import java.net.URLClassLoader; + import java.util.ArrayList; + import java.util.Arrays; + import java.util.Collections; +@@ -50,7 +49,7 @@ + /** + * Class loader + */ +- private static final URLClassLoader CLASSLOADER = (URLClassLoader) ClassLoader.getSystemClassLoader(); ++ private static final ClassLoader CLASSLOADER = ClassLoader.getSystemClassLoader(); + + /** + * Factory class postfix. +@@ -429,4 +428,4 @@ + Class<? extends C> ret = (Class<? extends C>) clazz.asSubclass(restrictionClass); + return ret; + } +-} +\ No newline at end of file ++} +--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/utilities/ELKIServiceScanner.java ++++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/utilities/ELKIServiceScanner.java +@@ -28,7 +28,6 @@ + import java.lang.reflect.Modifier; + import java.net.URISyntaxException; + import java.net.URL; +-import java.net.URLClassLoader; + import java.util.ArrayList; + import java.util.Collections; + import java.util.Comparator; +@@ -53,7 +52,7 @@ + /** + * Class loader + */ +- private static final URLClassLoader CLASSLOADER = (URLClassLoader) ClassLoader.getSystemClassLoader(); ++ private static final ClassLoader CLASSLOADER = ClassLoader.getSystemClassLoader(); + + /** + * Factory class postfix. diff --git a/debian/patches/java9-lookandfeel.patch b/debian/patches/java9-lookandfeel.patch new file mode 100644 index 00000000..3690ae71 --- /dev/null +++ b/debian/patches/java9-lookandfeel.patch @@ -0,0 +1,76 @@ +commit d08c584374a98f094064ee90e4d67fa0db1d18a7 +Author: Erich Schubert <schubert@informatik.uni-heidelberg.de> +Date: Thu May 10 17:06:57 2018 +0200 + + Avoid non-public API call (disallowed in Java9+) just for lookandfeel. + +--- a/elki/src/main/java/de/lmu/ifi/dbs/elki/gui/GUIUtil.java ++++ b/elki/src/main/java/de/lmu/ifi/dbs/elki/gui/GUIUtil.java +@@ -23,11 +23,8 @@ + along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +-import java.awt.Toolkit; +-import java.lang.reflect.Method; +- +-import javax.swing.RepaintManager; + import javax.swing.UIManager; ++import javax.swing.UIManager.LookAndFeelInfo; + + import de.lmu.ifi.dbs.elki.logging.Logging; + +@@ -39,11 +36,6 @@ + */ + public final class GUIUtil { + /** +- * Enable thread repaint debugging. +- */ +- public static final boolean THREAD_REPAINT_DEBUG = false; +- +- /** + * Whether to prefer the GTK look and feel on Unix. + */ + public static final boolean PREFER_GTK = true; +@@ -59,33 +51,17 @@ + * Setup look at feel. + */ + public static void setLookAndFeel() { +- // If enabled, setup thread debugging. +- if(THREAD_REPAINT_DEBUG) { +- try { +- Class<?> cls = ClassLoader.getSystemClassLoader().loadClass("org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager"); +- RepaintManager.setCurrentManager((RepaintManager) cls.newInstance()); +- } +- catch(Exception e) { +- // ignore +- } +- } +- if(PREFER_GTK) { +- try { +- Toolkit toolkit = Toolkit.getDefaultToolkit(); +- // Note: we don't want to *require* these classes +- // But if they exist, we're going to try using them. +- Class<?> suntoolkit = Class.forName("sun.awt.SunToolkit"); +- Method testm = suntoolkit.getMethod("isNativeGTKAvailable"); +- if(suntoolkit.isInstance(toolkit) && (Boolean) testm.invoke(toolkit)) { +- UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); +- return; ++ try { ++ if(PREFER_GTK) { ++ LookAndFeelInfo[] lfs = UIManager.getInstalledLookAndFeels(); ++ for(LookAndFeelInfo lf : lfs) { ++ if(lf.getClassName().contains("GTK")) { ++ UIManager.setLookAndFeel(lf.getClassName()); ++ return; ++ } + } + } +- catch(Exception e) { +- // ignore +- } +- } +- try { ++ // Fallback: + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } + catch(Exception e) { diff --git a/debian/patches/series b/debian/patches/series index e4b895bd..6f06da7a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,5 @@ single-core-bugfix.patch update-maven.patch clipping-batik18.patch batik-performance.patch +java9-classloader.patch +java9-lookandfeel.patch diff --git a/debian/patches/update-maven.patch b/debian/patches/update-maven.patch index 2a639198..2f1e7ef3 100644 --- a/debian/patches/update-maven.patch +++ b/debian/patches/update-maven.patch @@ -1,6 +1,27 @@ --- a/pom.xml +++ b/pom.xml -@@ -242,7 +242,7 @@ +@@ -216,17 +216,17 @@ + <!-- compilation --> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> +- <version>3.0</version> ++ <version>3.6.2</version> + </plugin> + <!-- unit tests --> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> +- <version>2.17</version> ++ <version>2.21.0</version> + </plugin> + <!-- Jar packaging --> + <plugin> + <artifactId>maven-jar-plugin</artifactId> +- <version>2.4</version> ++ <version>3.0.2</version> + </plugin> + <!-- Dependencies --> + <plugin> +@@ -242,22 +242,22 @@ <!-- used for making a directory in batik visualization addon --> <plugin> <artifactId>maven-antrun-plugin</artifactId> @@ -9,6 +30,24 @@ </plugin> <!-- Source code packaging --> <plugin> + <artifactId>maven-source-plugin</artifactId> +- <version>2.2.1</version> ++ <version>3.0.1</version> + </plugin> + <!-- Additional resources installation --> + <plugin> + <artifactId>maven-resources-plugin</artifactId> +- <version>2.7</version> ++ <version>3.0.2</version> + </plugin> + <!-- Javadoc --> + <plugin> + <artifactId>maven-javadoc-plugin</artifactId> +- <version>2.10.1</version> ++ <version>3.0.0</version> + </plugin> + </plugins> + </pluginManagement> @@ -304,20 +304,25 @@ </activation> </profile> @@ -55,7 +94,7 @@ <groupId>org.apache.xmlgraphics</groupId> <artifactId>batik-swing</artifactId> - <version>[1.7,1.9)</version> -+ <version>1.9</version> ++ <version>1.10</version> + <exclusions> + <exclusion><groupId>org.python</groupId><artifactId>jython</artifactId></exclusion> + <exclusion><groupId>org.mozilla</groupId><artifactId>rhino</artifactId></exclusion> @@ -66,7 +105,7 @@ <groupId>org.apache.xmlgraphics</groupId> <artifactId>batik-rasterizer</artifactId> - <version>[1.7,1.9)</version> -+ <version>1.9</version> ++ <version>1.10</version> + <exclusions> + <exclusion><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-svgrasterizer</artifactId></exclusion> + </exclusions> @@ -76,14 +115,14 @@ <groupId>org.apache.xmlgraphics</groupId> <artifactId>batik-ext</artifactId> - <version>[1.7,1.9)</version> -+ <version>1.9</version> ++ <version>1.10</version> </dependency> <dependency> <groupId>org.apache.xmlgraphics</groupId> <artifactId>batik-codec</artifactId> - <version>[1.7,1.9)</version> -+ <version>1.9</version> ++ <version>1.10</version> </dependency> <dependency> |