diff -Nru jameica-2.8.1+dfsg/build/BUILD jameica-2.8.4+dfsg/build/BUILD --- jameica-2.8.1+dfsg/build/BUILD 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/BUILD 2019-02-11 10:24:01.000000000 +0000 @@ -1,3 +1,3 @@ #Build Number for ANT. Do not edit! -#Fri Jul 13 12:02:22 CEST 2018 -build.number=449 +#Tue Jan 29 15:28:30 CET 2019 +build.number=452 diff -Nru jameica-2.8.1+dfsg/build/build.properties jameica-2.8.4+dfsg/build/build.properties --- jameica-2.8.1+dfsg/build/build.properties 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/build.properties 2019-02-11 10:24:01.000000000 +0000 @@ -18,6 +18,12 @@ define.javadocfilename = ${define.projectname}.javadoc.zip define.commonlibs = lib/bouncycastle/bcpkix-jdk15on-1.56.jar \ lib/bouncycastle/bcprov-jdk15on-1.56.jar \ + lib/java_ee/activation-1.1.1.jar \ + lib/java_ee/jaxb-api-2.4.0-b180725.0427.jar \ + lib/java_ee/jaxb-runtime-2.4.0-b180725.0644.jar \ + lib/java_ee/javax.annotation-api-1.3.2.jar \ + lib/java_ee/istack-commons-runtime-3.0.5.jar \ + lib/java_ee/txw2-20110809.jar \ lib/de_willuhn_ds/de_willuhn_ds.jar \ lib/de_willuhn_util/de_willuhn_util.jar \ lib/jakarta_commons/commons-cli-1.3.1.jar \ @@ -36,6 +42,7 @@ lib/swt/com.ibm.icu_52.1.0.v201404241930.jar \ lib/swtcalendar/swtcalendar.jar \ lib/velocity/velocity-1.7.jar \ + lib/velocity/oro-2.0.8.jar \ lib/splash.jar \ lib/mckoi/mckoisqldb-1.0.5.jar \ img \ diff -Nru jameica-2.8.1+dfsg/build/ChangeLog jameica-2.8.4+dfsg/build/ChangeLog --- jameica-2.8.1+dfsg/build/ChangeLog 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/ChangeLog 2019-02-11 10:24:01.000000000 +0000 @@ -1,3 +1,27 @@ +2019-02-11 Version 2.8.4 + + * BUG: In der Liste der verfügbaren Plugins kam es zu einem Fehler, wenn in der Liste der Plugins Scripting-Plugins enthalten waren - Proxy.newProxyInstance hat scheinbar in Java das Verhalten geändert, wenn der Classloader NULL ist + +2019-01-29 Version 2.8.3 + + * CHG: Popups verwenden jetzt als Fallback eigene Farben für Vorder- und Hintergrund, wenn keine Systemfarben vorgegeben sind oder Vorder- und Hintergrund identisch wären + * CHG: Jameica verwendet jetzt unter Linux per Default GTK3 (siehe "SWT_GTK3=1" in jameica.sh) + * NEW: Update auf SWT 4.9 (in 4.10 gibt es keine 32Bit-Unterstützung mehr) + * NEW: Hostname für das beim ersten Start zu erstellende System-Zertifikat kann jetzt per Konfigurationsdatei vorgegeben werden (Parameter "jameica.hostname" in "de.willuhn.jameica.system.ApplicationCallback.properties") - siehe https://homebanking-hilfe.de/forum/topic.php?p=141994#real141994 + * CHG: JVM-Parameter "-Dswt.autoScale=quarter" bei den Windows-Launchern hinzugefuegt - siehe https://github.com/willuhn/jameica/commit/82d253c0e1aec918b98eb378027ebf2d2e5fb411 + * BUG: Kleiner Darstellungsfehler: Beim mehrfachen Überfahren der Panelbuttons mit der Maus oben rechts wurde unter dem Button eine 1 Pixel schmale dunkle Linie angezeigt + * BUG: Die Bibliothek "oro" fehlte im Ordner "lib/velocity". Dadurch kam es zu einer ClassNotFoundException in SynTAX beim Erstellen der IDEA-Auswertung + * BUG: Zoom-Faktor bei HiDPI-Displays wurde beim Druck von Dokumenten via de.willuhn.jameica.gui.internal.action.Print nicht deaktiviert, sodass Dokumente zu gross gedruckt wurden + * NEW: MySQL-Treiber von 5.1.41 auf 5.1.47 aktualisiert + * CHG: Settings nur noch maximal 1 mal pro Sekunde neu laden + * NEW: Annotation "@Resource" unterstützt jetzt auch Services des Typs "Bootable". + * NEW: 0102 BUGZILLA 1867 - HTTP-Redirects (für Wechsel von HTTP auf HTTPS) berücksichtigen + +2018-09-17 Version 2.8.2 + + * NEW: 0101 Support für Java 11 (Umgebungsvariable "JDK_JAVA_OPTIONS='--add-modules=java.se.ee'" entfernt, Jameica liefert die nötigen JAR-Dateien in lib/java_ee jetzt selbst mit) + * BUG: 0100 Aktualisierte H2-Version h2-1.4.197. Version 1.4.193 konnte beim Update auf Hibiscus 2.8.4 u.U. den Fehler "Concurrent update in table "SYS_ID": another transaction has updated or deleted the same row [90131-193]" auslösen. + 2018-07-13 Version 2.8.1 * BUG: 0099 BUGZILLA 1856 - Änderung in Bug 1852 betraf zu viele Plugins, Interpretation der abhängigen Versionsnummern nochmal so angepasst, dass das neue Verhalten nur gilt, wenn das "+"/"-" in Klammern angegeben ist, ansonsten gilt wieder das vorherige Verhalten diff -Nru jameica-2.8.1+dfsg/build/jameica-macos64.sh jameica-2.8.4+dfsg/build/jameica-macos64.sh --- jameica-2.8.1+dfsg/build/jameica-macos64.sh 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/jameica-macos64.sh 2019-02-11 10:24:01.000000000 +0000 @@ -40,5 +40,4 @@ BASEDIR=$(dirname "$0") cd "${BASEDIR}" -export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' exec "${JAVACMD}" -Xdock:name="Jameica" -Xmx512m -Xss64m -XstartOnFirstThread -jar "${BASEDIR}/jameica-macos64.jar" -o "$@" >/dev/null diff -Nru jameica-2.8.1+dfsg/build/jameica-macos.sh jameica-2.8.4+dfsg/build/jameica-macos.sh --- jameica-2.8.1+dfsg/build/jameica-macos.sh 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/jameica-macos.sh 2019-02-11 10:24:01.000000000 +0000 @@ -40,5 +40,4 @@ BASEDIR=$(dirname "$0") cd "${BASEDIR}" -export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' exec "${JAVACMD}" -Xdock:name="Jameica" -Xmx512m -Xss64m -XstartOnFirstThread -jar "${BASEDIR}/jameica-macos.jar" -o "$@" >/dev/null diff -Nru jameica-2.8.1+dfsg/build/jameica-openbsd.sh jameica-2.8.4+dfsg/build/jameica-openbsd.sh --- jameica-2.8.1+dfsg/build/jameica-openbsd.sh 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/jameica-openbsd.sh 2019-02-11 10:24:01.000000000 +0000 @@ -7,5 +7,4 @@ dir=$(dirname "$link") cd "$dir" -export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' java -Xmx512m -Xss64m -jar jameica-openbsd.jar $@ diff -Nru jameica-2.8.1+dfsg/build/jameicaserver.sh jameica-2.8.4+dfsg/build/jameicaserver.sh --- jameica-2.8.1+dfsg/build/jameicaserver.sh 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/jameicaserver.sh 2019-02-11 10:24:01.000000000 +0000 @@ -11,5 +11,4 @@ # https://www.willuhn.de/bugzilla/show_bug.cgi?id=798 -export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' java -Djava.net.preferIPv4Stack=true -Xmx512m $_JCONSOLE -jar jameica-linux.jar -d $@ diff -Nru jameica-2.8.1+dfsg/build/jameica.sh jameica-2.8.4+dfsg/build/jameica.sh --- jameica-2.8.1+dfsg/build/jameica.sh 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/jameica.sh 2019-02-11 10:24:01.000000000 +0000 @@ -18,5 +18,6 @@ archsuffix="" fi -export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' -LIBOVERLAY_SCROLLBAR=0 GDK_NATIVE_WINDOWS=1 SWT_GTK3=0 exec java -Djava.net.preferIPv4Stack=true -Xmx512m -Xss64m $_JCONSOLE -jar jameica-linux${archsuffix}.jar $@ +# Zur Anpassung der Skalierung auf HiDPI-Displays kann der Parameter "-Dswt.autoScale" verwendet werden. +# Siehe https://www.willuhn.de/wiki/doku.php?id=develop:highdpi +LIBOVERLAY_SCROLLBAR=0 GDK_NATIVE_WINDOWS=1 SWT_GTK3=1 exec java -Djava.net.preferIPv4Stack=true -Xmx512m -Xss64m $_JCONSOLE -jar jameica-linux${archsuffix}.jar $@ Binary files /tmp/tmp0wFnCD/HOSRxbVDfz/jameica-2.8.1+dfsg/build/jameica-win32.exe and /tmp/tmp0wFnCD/yoYKPSrgyC/jameica-2.8.4+dfsg/build/jameica-win32.exe differ Binary files /tmp/tmp0wFnCD/HOSRxbVDfz/jameica-2.8.1+dfsg/build/jameica-win64.exe and /tmp/tmp0wFnCD/yoYKPSrgyC/jameica-2.8.4+dfsg/build/jameica-win64.exe differ diff -Nru jameica-2.8.1+dfsg/build/launch4j-win32.xml jameica-2.8.4+dfsg/build/launch4j-win32.xml --- jameica-2.8.1+dfsg/build/launch4j-win32.xml 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/launch4j-win32.xml 2019-02-11 10:24:01.000000000 +0000 @@ -14,7 +14,6 @@ false /work/willuhn/git/hibiscus/icons/hibiscus.ico - JDK_JAVA_OPTIONS='--add-modules=java.se.ee' false @@ -23,15 +22,15 @@ preferJre 64/32 - -Xmx512m -Djava.net.preferIPv4Stack=true + -Xmx512m -Djava.net.preferIPv4Stack=true -Dswt.autoScale=quarter - 2.6.6.0 - 2.6.6 + 2.8.2.0 + 2.8.2 Jameica Olaf Willuhn - 2.6.6.0 - 2.6.6 + 2.8.2.0 + 2.8.2 Jameica Olaf Willuhn jameica-win32 diff -Nru jameica-2.8.1+dfsg/build/launch4j-win64.xml jameica-2.8.4+dfsg/build/launch4j-win64.xml --- jameica-2.8.1+dfsg/build/launch4j-win64.xml 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/launch4j-win64.xml 2019-02-11 10:24:01.000000000 +0000 @@ -14,7 +14,6 @@ false /work/willuhn/git/hibiscus/icons/hibiscus.ico - JDK_JAVA_OPTIONS='--add-modules=java.se.ee' false @@ -23,15 +22,15 @@ preferJre 64/32 - -Xmx512m -Xss64m -Djava.net.preferIPv4Stack=true + -Xmx512m -Xss64m -Djava.net.preferIPv4Stack=true -Dswt.autoScale=quarter - 2.6.6.0 - 2.6.6 + 2.8.2.0 + 2.8.2 Jameica Olaf Willuhn - 2.6.6.0 - 2.6.6 + 2.8.2.0 + 2.8.2 Jameica Olaf Willuhn jameica-win64 diff -Nru jameica-2.8.1+dfsg/build/rcjameica jameica-2.8.4+dfsg/build/rcjameica --- jameica-2.8.1+dfsg/build/rcjameica 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build/rcjameica 2019-02-11 10:24:01.000000000 +0000 @@ -19,8 +19,6 @@ JAVA=`which java` BASEDIR=`dirname $0` -export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' - ### Please do not edit anything below this line! ######################## # # diff -Nru jameica-2.8.1+dfsg/build.gradle jameica-2.8.4+dfsg/build.gradle --- jameica-2.8.1+dfsg/build.gradle 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/build.gradle 2019-02-11 10:24:01.000000000 +0000 @@ -27,9 +27,11 @@ compile 'mysql:mysql-connector-java:5.+' compile 'be.cyberelf.nanoxml:nanoxml:+' compile 'org.apache.velocity:velocity:+' + compile 'oro:oro:+' + } task download(type: Copy) { - into "lib" + into "lib/download" from configurations.runtime } diff -Nru jameica-2.8.1+dfsg/.classpath jameica-2.8.4+dfsg/.classpath --- jameica-2.8.1+dfsg/.classpath 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/.classpath 2019-02-11 10:24:01.000000000 +0000 @@ -2,7 +2,11 @@ - + + + + + @@ -22,7 +26,7 @@ - + @@ -32,5 +36,12 @@ + + + + + + + diff -Nru jameica-2.8.1+dfsg/debian/changelog jameica-2.8.4+dfsg/debian/changelog --- jameica-2.8.1+dfsg/debian/changelog 2018-09-14 08:56:51.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/changelog 2019-02-26 16:29:34.000000000 +0000 @@ -1,3 +1,70 @@ +jameica (2.8.4+dfsg-1~18.10) cosmic; urgency=medium + + * Backport for OpenJDK 11. LP: #1814133. + + -- Matthias Klose Tue, 26 Feb 2019 17:29:34 +0100 + +jameica (2.8.4+dfsg-1) unstable; urgency=medium + + * New upstream version 2.8.4+dfsg + + -- Jochen Sprickerhof Mon, 11 Feb 2019 14:09:12 +0100 + +jameica (2.8.3+dfsg-2) unstable; urgency=medium + + * Add missing dependency + + -- Jochen Sprickerhof Wed, 30 Jan 2019 21:43:35 +0100 + +jameica (2.8.3+dfsg-1) unstable; urgency=medium + + * New upstream version 2.8.3+dfsg + * Rebase patches + + -- Jochen Sprickerhof Tue, 29 Jan 2019 20:44:22 +0100 + +jameica (2.8.2+dfsg-6) unstable; urgency=medium + + * Switch to GTK3 (Closes: #917577) + * Bump policy version (no changes) + + -- Jochen Sprickerhof Sat, 29 Dec 2018 13:36:52 +0100 + +jameica (2.8.2+dfsg-5) unstable; urgency=medium + + * Team upload. + * Depend on libicu4j-java instead of libicu4j-49-java + + -- Emmanuel Bourg Fri, 23 Nov 2018 17:55:30 +0100 + +jameica (2.8.2+dfsg-4) unstable; urgency=medium + + * Team upload. + * Switch from libmysql-java to libmariadb-java. See #912916 for more + information. + + -- Markus Koschany Fri, 09 Nov 2018 19:13:25 +0100 + +jameica (2.8.2+dfsg-3) unstable; urgency=medium + + * Add libjaxb-api-java build dependency (Closes: #912548) + + -- Jochen Sprickerhof Fri, 02 Nov 2018 18:35:28 +0100 + +jameica (2.8.2+dfsg-2) unstable; urgency=medium + + * Port to Eclipse 4 (Closes: #908620) + + -- Jochen Sprickerhof Wed, 24 Oct 2018 23:29:18 +0200 + +jameica (2.8.2+dfsg-1) unstable; urgency=medium + + * New upstream version 2.8.2+dfsg + * Rebase patches + * Update dependencies + + -- Jochen Sprickerhof Sat, 22 Sep 2018 21:33:43 +0200 + jameica (2.8.1+dfsg-2) unstable; urgency=medium * Revert "suggest libmckoisqldb-java as upstream provide it by default" diff -Nru jameica-2.8.1+dfsg/debian/control jameica-2.8.4+dfsg/debian/control --- jameica-2.8.1+dfsg/debian/control 2018-09-14 08:55:26.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/control 2019-01-30 20:43:04.000000000 +0000 @@ -3,16 +3,60 @@ Priority: optional Maintainer: Debian Java maintainers Uploaders: Jochen Sprickerhof -Build-Depends: debhelper (>= 11), default-jdk, javahelper, ant, eclipse-platform-data, eclipse-rcp, libcommons-cli-java, libbcpkix-java, libjameica-datasource-java, libnanoxml2-java, libpaperclips-java, velocity -Standards-Version: 4.2.1 +Build-Depends: + ant, + debhelper (>= 11), + default-jdk, + javahelper, + libbcpkix-java, + libcommons-cli-java, + libeclipse-jface-databinding-java, + libeclipse-ui-forms-java, + libgeronimo-annotation-1.3-spec-java, + libjameica-datasource-java, + libjaxb-api-java, + libnanoxml2-java, + libpaperclips-java, + velocity Rules-Requires-Root: no -Homepage: http://www.willuhn.de/products/jameica/ +Standards-Version: 4.3.0 Vcs-Git: https://salsa.debian.org/java-team/jameica.git Vcs-Browser: https://salsa.debian.org/java-team/jameica +Homepage: https://www.willuhn.de/products/jameica/ Package: jameica Architecture: all -Depends: eclipse-platform-data, eclipse-rcp, libbcpkix-java, libbcprov-java, libcommons-cli-java, libcommons-collections3-java, libcommons-lang-java, libequinox-osgi-java, libicu4j-49-java, libjameica-datasource-java, libjameica-util-java, libnanoxml2-java, libpaperclips-java, velocity, ${misc:Depends}, libcommons-logging-java, libswtcalendar-java, libh2-java, libswt-cairo-gtk-4-jni, libswt-gtk2-4-jni, libmysql-java +Depends: + libactivation-java, + libbcpkix-java, + libbcprov-java, + libcommons-cli-java, + libcommons-collections3-java, + libcommons-lang-java, + libcommons-logging-java, + libeclipse-core-commands-java, + libeclipse-core-runtime-java, + libeclipse-jface-databinding-java, + libeclipse-osgi-java, + libeclipse-ui-forms-java, + libequinox-common-java, + libgeronimo-annotation-1.3-spec-java, + libh2-java, + libicu4j-java, + libistack-commons-java, + libjameica-datasource-java, + libjameica-util-java, + libjaxb-api-java, + libjaxb-java, + libmariadb-java, + libnanoxml2-java, + libpaperclips-java, + libswt-cairo-gtk-4-jni, + libswtcalendar-java, + libtxw2-java, + liboro-java, + velocity, + ${misc:Depends} Recommends: ${java:Recommends} Description: Run-time system for Java applications runtime environment for Java applications, which are implemented as plugins. diff -Nru jameica-2.8.1+dfsg/debian/patches/0001-Update-locations-of-Java-libraries.patch jameica-2.8.4+dfsg/debian/patches/0001-Update-locations-of-Java-libraries.patch --- jameica-2.8.1+dfsg/debian/patches/0001-Update-locations-of-Java-libraries.patch 2018-09-14 08:50:21.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/patches/0001-Update-locations-of-Java-libraries.patch 2019-02-11 13:09:12.000000000 +0000 @@ -3,19 +3,25 @@ Subject: Update locations of Java libraries --- - build/build.properties | 42 ++++++++++++++++++++---------------------- - 1 file changed, 20 insertions(+), 22 deletions(-) + build/build.properties | 56 ++++++++++++++++++++++++-------------------------- + 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/build/build.properties b/build/build.properties -index 616ba99..f54b337 100644 +index 829b801..ba3c74c 100644 --- a/build/build.properties +++ b/build/build.properties -@@ -16,28 +16,26 @@ define.jarfilename.linux64 = ${define.projectname}-linux64.jar +@@ -16,35 +16,33 @@ define.jarfilename.linux64 = ${define.projectname}-linux64.jar define.jarfilename.openbsd = ${define.projectname}-openbsd.jar define.srcfilename = ${define.projectname}-${system.version}.src.zip define.javadocfilename = ${define.projectname}.javadoc.zip -define.commonlibs = lib/bouncycastle/bcpkix-jdk15on-1.56.jar \ - lib/bouncycastle/bcprov-jdk15on-1.56.jar \ +- lib/java_ee/activation-1.1.1.jar \ +- lib/java_ee/jaxb-api-2.4.0-b180725.0427.jar \ +- lib/java_ee/jaxb-runtime-2.4.0-b180725.0644.jar \ +- lib/java_ee/javax.annotation-api-1.3.2.jar \ +- lib/java_ee/istack-commons-runtime-3.0.5.jar \ +- lib/java_ee/txw2-20110809.jar \ - lib/de_willuhn_ds/de_willuhn_ds.jar \ - lib/de_willuhn_util/de_willuhn_util.jar \ - lib/jakarta_commons/commons-cli-1.3.1.jar \ @@ -34,10 +40,17 @@ - lib/swt/com.ibm.icu_52.1.0.v201404241930.jar \ - lib/swtcalendar/swtcalendar.jar \ - lib/velocity/velocity-1.7.jar \ +- lib/velocity/oro-2.0.8.jar \ - lib/splash.jar \ - lib/mckoi/mckoisqldb-1.0.5.jar \ +define.commonlibs = /usr/share/java/bcpkix.jar \ + /usr/share/java/bcprov.jar \ ++ /usr/share/java/javax.activation.jar \ ++ /usr/share/java/jaxb-api.jar \ ++ /usr/share/java/jaxb-runtime.jar \ ++ /usr/share/java/geronimo-annotation-1.3-spec.jar \ ++ /usr/share/java/istack-commons-runtime.jar \ ++ /usr/share/java/txw2.jar \ + /usr/share/java/jameica-datasource.jar \ + /usr/share/java/jameica-util.jar \ + /usr/share/java/commons-cli.jar \ @@ -46,15 +59,16 @@ + /usr/share/java/commons-logging.jar \ + /usr/share/java/nanoxml.jar \ + /usr/share/java/paperclips.jar \ -+ /usr/lib/eclipse/plugins/org.eclipse.core.runtime_3.8.0.dist.jar \ -+ /usr/share/java/org.eclipse.core.commands.jar \ -+ /usr/share/java/org.eclipse.equinox.common.jar \ -+ /usr/share/java/org.eclipse.osgi.jar \ -+ /usr/share/java/org.eclipse.jface.jar \ -+ /usr/share/eclipse/plugins/org.eclipse.ui.forms_3.5.200.dist.jar \ -+ /usr/share/java/icu4j-49.1.jar \ ++ /usr/share/java/eclipse-core-runtime.jar \ ++ /usr/share/java/eclipse-core-commands.jar \ ++ /usr/share/java/equinox-common.jar \ ++ /usr/share/java/eclipse-osgi.jar \ ++ /usr/share/java/eclipse-jface.jar \ ++ /usr/share/java/eclipse-ui-forms.jar \ ++ /usr/share/java/icu4j.jar \ + /usr/share/java/swtcalendar.jar \ + /usr/share/java/velocity.jar \ ++ /usr/share/java/oro.jar \ + /usr/share/java/h2.jar \ img \ lang \ diff -Nru jameica-2.8.1+dfsg/debian/patches/0002-Adopt-build.xml.patch jameica-2.8.4+dfsg/debian/patches/0002-Adopt-build.xml.patch --- jameica-2.8.1+dfsg/debian/patches/0002-Adopt-build.xml.patch 2018-09-14 08:50:21.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/patches/0002-Adopt-build.xml.patch 2019-02-11 13:09:12.000000000 +0000 @@ -3,15 +3,15 @@ Subject: Adopt build.xml --- - build/build.properties | 3 ++- - build/build.xml | 11 ++++++++--- - 2 files changed, 10 insertions(+), 4 deletions(-) + build/build.properties | 3 ++- + build/build.xml | 8 +++++--- + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build/build.properties b/build/build.properties -index f54b337..7f98659 100644 +index ba3c74c..89732aa 100644 --- a/build/build.properties +++ b/build/build.properties -@@ -43,7 +43,7 @@ define.commonlibs = /usr/share/java/bcpkix.jar \ +@@ -50,7 +50,7 @@ define.commonlibs = /usr/share/java/bcpkix.jar \ define.package = de.willuhn.jameica project.nightly = releases/nightly @@ -20,7 +20,7 @@ project.src = ${project.release}/src/classes project.tmp = ${project.release}/tmp project.javadoc = ${project.release}/javadoc -@@ -59,6 +59,7 @@ project.zipfilename.macos = ${define.projectname}-macos-${system.version}. +@@ -66,6 +66,7 @@ project.zipfilename.macos = ${define.projectname}-macos-${system.version}. project.zipfilename.macos64 = ${define.projectname}-macos64-${system.version}.zip project.zipfilename.openbsd = ${define.projectname}-openbsd-${system.version}.zip @@ -29,7 +29,7 @@ classpath.win64 = ${define.jarfilename} lib/swt/win64/swt.jar ${define.commonlibs} classpath.linux = ${define.jarfilename} lib/swt/linux/swt.jar ${define.commonlibs} diff --git a/build/build.xml b/build/build.xml -index 8de5d65..ee1d155 100755 +index 8de5d65..1472647 100755 --- a/build/build.xml +++ b/build/build.xml @@ -18,7 +18,7 @@ @@ -41,19 +41,16 @@ -@@ -40,7 +40,10 @@ +@@ -40,7 +40,7 @@ - + -+ -+ -+ -@@ -104,6 +107,8 @@ +@@ -104,6 +104,8 @@ @@ -62,7 +59,7 @@ -@@ -464,7 +469,7 @@ +@@ -464,7 +466,7 @@ diff -Nru jameica-2.8.1+dfsg/debian/patches/0003-Adopt-jameica-executable.patch jameica-2.8.4+dfsg/debian/patches/0003-Adopt-jameica-executable.patch --- jameica-2.8.1+dfsg/debian/patches/0003-Adopt-jameica-executable.patch 2018-09-14 08:50:21.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/patches/0003-Adopt-jameica-executable.patch 2019-02-11 13:09:12.000000000 +0000 @@ -2,21 +2,22 @@ Date: Fri, 25 May 2018 15:26:57 +0200 Subject: Adopt jameica executable +- Remove environment variables (as we switch to GTK3 and so the user can set them) --- - build/jameica | 23 +++++++++++++++++++++++ - build/jameica.sh | 22 ---------------------- + build/jameica | 24 ++++++++++++++++++++++++ + build/jameica.sh | 23 ----------------------- plugin.xml | 0 - 3 files changed, 23 insertions(+), 22 deletions(-) + 3 files changed, 24 insertions(+), 23 deletions(-) create mode 100755 build/jameica delete mode 100755 build/jameica.sh mode change 100755 => 100644 plugin.xml diff --git a/build/jameica b/build/jameica new file mode 100755 -index 0000000..0ef371c +index 0000000..0439301 --- /dev/null +++ b/build/jameica -@@ -0,0 +1,23 @@ +@@ -0,0 +1,24 @@ +#!/bin/sh + +# Linux Start-Script fuer regulaeren Standalone-Betrieb. @@ -37,15 +38,16 @@ + archsuffix="" +fi + -+export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' ++# Zur Anpassung der Skalierung auf HiDPI-Displays kann der Parameter "-Dswt.autoScale" verwendet werden. ++# Siehe https://www.willuhn.de/wiki/doku.php?id=develop:highdpi +cd /usr/share/jameica -+LIBOVERLAY_SCROLLBAR=0 GDK_NATIVE_WINDOWS=1 SWT_GTK3=0 exec java -Djava.net.preferIPv4Stack=true -Xmx512m -Xss64m $_JCONSOLE -jar /usr/share/java/jameica.jar $@ ++exec java -Djava.net.preferIPv4Stack=true -Xmx512m -Xss64m $_JCONSOLE -jar /usr/share/java/jameica.jar $@ diff --git a/build/jameica.sh b/build/jameica.sh deleted file mode 100755 -index 4b82ae0..0000000 +index 9f37de1..0000000 --- a/build/jameica.sh +++ /dev/null -@@ -1,22 +0,0 @@ +@@ -1,23 +0,0 @@ -#!/bin/sh - -# Linux Start-Script fuer regulaeren Standalone-Betrieb. @@ -66,8 +68,9 @@ - archsuffix="" -fi - --export JDK_JAVA_OPTIONS='--add-modules=java.se.ee' --LIBOVERLAY_SCROLLBAR=0 GDK_NATIVE_WINDOWS=1 SWT_GTK3=0 exec java -Djava.net.preferIPv4Stack=true -Xmx512m -Xss64m $_JCONSOLE -jar jameica-linux${archsuffix}.jar $@ +-# Zur Anpassung der Skalierung auf HiDPI-Displays kann der Parameter "-Dswt.autoScale" verwendet werden. +-# Siehe https://www.willuhn.de/wiki/doku.php?id=develop:highdpi +-LIBOVERLAY_SCROLLBAR=0 GDK_NATIVE_WINDOWS=1 SWT_GTK3=1 exec java -Djava.net.preferIPv4Stack=true -Xmx512m -Xss64m $_JCONSOLE -jar jameica-linux${archsuffix}.jar $@ diff --git a/plugin.xml b/plugin.xml old mode 100755 new mode 100644 diff -Nru jameica-2.8.1+dfsg/debian/patches/0004-Add-mysql-connector-java.patch jameica-2.8.4+dfsg/debian/patches/0004-Add-mysql-connector-java.patch --- jameica-2.8.1+dfsg/debian/patches/0004-Add-mysql-connector-java.patch 2018-09-14 08:50:21.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/patches/0004-Add-mysql-connector-java.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,20 +0,0 @@ -From: Jochen Sprickerhof -Date: Fri, 14 Sep 2018 10:50:06 +0200 -Subject: Add mysql-connector-java - ---- - build/build.properties | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/build/build.properties b/build/build.properties -index 7f98659..57a8092 100644 ---- a/build/build.properties -+++ b/build/build.properties -@@ -36,6 +36,7 @@ define.commonlibs = /usr/share/java/bcpkix.jar \ - /usr/share/java/swtcalendar.jar \ - /usr/share/java/velocity.jar \ - /usr/share/java/h2.jar \ -+ /usr/share/java/mysql-connector-java.jar \ - img \ - lang \ - help diff -Nru jameica-2.8.1+dfsg/debian/patches/0004-mariadb.patch jameica-2.8.4+dfsg/debian/patches/0004-mariadb.patch --- jameica-2.8.1+dfsg/debian/patches/0004-mariadb.patch 1970-01-01 00:00:00.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/patches/0004-mariadb.patch 2019-02-11 13:09:12.000000000 +0000 @@ -0,0 +1,20 @@ +From: Jochen Sprickerhof +Date: Fri, 14 Sep 2018 10:50:06 +0200 +Subject: mariadb + +--- + build/build.properties | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/build/build.properties b/build/build.properties +index 89732aa..27ed9b5 100644 +--- a/build/build.properties ++++ b/build/build.properties +@@ -43,6 +43,7 @@ define.commonlibs = /usr/share/java/bcpkix.jar \ + /usr/share/java/velocity.jar \ + /usr/share/java/oro.jar \ + /usr/share/java/h2.jar \ ++ /usr/share/java/mariadb-java-client.jar \ + img \ + lang \ + help diff -Nru jameica-2.8.1+dfsg/debian/patches/series jameica-2.8.4+dfsg/debian/patches/series --- jameica-2.8.1+dfsg/debian/patches/series 2018-09-14 08:50:21.000000000 +0000 +++ jameica-2.8.4+dfsg/debian/patches/series 2019-02-11 13:09:12.000000000 +0000 @@ -1,4 +1,4 @@ 0001-Update-locations-of-Java-libraries.patch 0002-Adopt-build.xml.patch 0003-Adopt-jameica-executable.patch -0004-Add-mysql-connector-java.patch +0004-mariadb.patch diff -Nru jameica-2.8.1+dfsg/.gitignore jameica-2.8.4+dfsg/.gitignore --- jameica-2.8.1+dfsg/.gitignore 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/.gitignore 2019-02-11 10:24:01.000000000 +0000 @@ -1,4 +1,5 @@ bin releases plugins -/test-bin \ No newline at end of file +/test-bin +/.gradle/ diff -Nru jameica-2.8.1+dfsg/plugin.xml jameica-2.8.4+dfsg/plugin.xml --- jameica-2.8.1+dfsg/plugin.xml 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/plugin.xml 2019-02-11 10:24:01.000000000 +0000 @@ -1,9 +1,9 @@ - + Jameica - Java based messages interchange - https://www.willuhn.de/products/jameica/releases/2.8/jameica/jameica-2.8.1.zip + https://www.willuhn.de/products/jameica/releases/2.8/jameica/jameica-2.8.4.zip https://www.willuhn.de/projects/jameica GPL - http://www.gnu.org/copyleft/gpl.html diff -Nru jameica-2.8.1+dfsg/.settings/org.eclipse.jdt.core.prefs jameica-2.8.4+dfsg/.settings/org.eclipse.jdt.core.prefs --- jameica-2.8.1+dfsg/.settings/org.eclipse.jdt.core.prefs 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/.settings/org.eclipse.jdt.core.prefs 2019-02-11 10:24:01.000000000 +0000 @@ -1,6 +1,6 @@ -#Fri Apr 16 13:40:58 CEST 2010 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.compliance=1.5 @@ -9,9 +9,12 @@ org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.5 +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 @@ -22,15 +25,23 @@ org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 @@ -50,11 +61,15 @@ org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true @@ -65,11 +80,17 @@ org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.line_length=160 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false org.eclipse.jdt.core.formatter.compact_else_if=true org.eclipse.jdt.core.formatter.continuation_indentation=2 org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -81,10 +102,17 @@ org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false org.eclipse.jdt.core.formatter.indentation.size=2 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert @@ -132,6 +160,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -150,12 +179,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert @@ -179,6 +210,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert @@ -206,6 +238,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -234,6 +267,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert @@ -243,6 +277,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -258,13 +293,28 @@ org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.lineSplit=160 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=2 +org.eclipse.jdt.core.formatter.use_on_off_tags=false org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true diff -Nru jameica-2.8.1+dfsg/.settings/org.eclipse.jdt.ui.prefs jameica-2.8.4+dfsg/.settings/org.eclipse.jdt.ui.prefs --- jameica-2.8.1+dfsg/.settings/org.eclipse.jdt.ui.prefs 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/.settings/org.eclipse.jdt.ui.prefs 2019-02-11 10:24:01.000000000 +0000 @@ -53,7 +53,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_meins -formatter_settings_version=11 +formatter_settings_version=14 internal.default.compliance=default sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/action/Print.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/action/Print.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/action/Print.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/action/Print.java 2019-02-11 10:24:01.000000000 +0000 @@ -10,20 +10,20 @@ package de.willuhn.jameica.gui.internal.action; -import net.sf.paperclips.PaperClips; -import net.sf.paperclips.PrintJob; - import org.eclipse.swt.SWT; import org.eclipse.swt.printing.PrintDialog; import org.eclipse.swt.printing.PrinterData; import de.willuhn.jameica.gui.Action; import de.willuhn.jameica.gui.GUI; +import de.willuhn.jameica.gui.util.SWTUtil; import de.willuhn.jameica.messaging.StatusBarMessage; import de.willuhn.jameica.print.PrintSupport; import de.willuhn.jameica.system.Application; import de.willuhn.logging.Logger; import de.willuhn.util.ApplicationException; +import net.sf.paperclips.PaperClips; +import net.sf.paperclips.PrintJob; /** * Aktion zum Drucken von Daten. @@ -41,20 +41,33 @@ Application.getMessagingFactory().sendMessage(new StatusBarMessage(Application.getI18n().tr("Bitte wählen Sie die zu druckenden Daten aus"),StatusBarMessage.TYPE_ERROR)); return; } - - PrintJob job = ((PrintSupport) context).print(); - - PrintDialog dialog = new PrintDialog(GUI.getShell(), SWT.NONE); - dialog.setText(Application.getI18n().tr("Drucken")); - PrinterData printerData = dialog.open(); - if (printerData == null) + + final String key = "swt.autoScale"; + final String backup = System.getProperty(key); + final int zoom = SWTUtil.getDeviceZoom(); + try { - Logger.info("no printer choosen"); - return; + PrintJob job = ((PrintSupport) context).print(); + + PrintDialog dialog = new PrintDialog(GUI.getShell(), SWT.NONE); + dialog.setText(Application.getI18n().tr("Drucken")); + PrinterData printerData = dialog.open(); + if (printerData == null) + { + Logger.info("no printer choosen"); + return; + } + + if (zoom > 100) + System.setProperty(key,"100"); // Scaling kurz auf 100% setzen + PaperClips.print(job, printerData); + Application.getMessagingFactory().sendMessage(new StatusBarMessage(Application.getI18n().tr("Gedruckt an \"{0}\"",printerData.name),StatusBarMessage.TYPE_SUCCESS)); + } + finally + { + if (zoom > 100 && backup != null) + System.setProperty(key,backup); // Jetzt wieder auf den vorherigen Wert setzen } - - PaperClips.print(job, printerData); - Application.getMessagingFactory().sendMessage(new StatusBarMessage(Application.getI18n().tr("Gedruckt an \"{0}\"",printerData.name),StatusBarMessage.TYPE_SUCCESS)); } } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/buttons/Cancel.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/buttons/Cancel.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/buttons/Cancel.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/buttons/Cancel.java 2019-02-11 10:24:01.000000000 +0000 @@ -34,17 +34,8 @@ */ public void handleAction(Object context) throws ApplicationException { - throw new OperationCanceledException("operation cancelled"); + throw new OperationCanceledException(Application.getI18n().tr("Vorgang abgebrochen")); } },null,false,"process-stop.png"); } } - - -/********************************************************************** - * $Log: Cancel.java,v $ - * Revision 1.1 2009/10/15 11:50:13 willuhn - * @N Neue Icons - * @N Neue Default-Action "Cancel" - * - **********************************************************************/ diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginDetailPart.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginDetailPart.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginDetailPart.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginDetailPart.java 2019-02-11 10:24:01.000000000 +0000 @@ -137,7 +137,7 @@ // Checken, ob es installiert/deinstalliert werden kann if (this.type == Type.INSTALLED) { - Button update = new Button(i18n.tr("Plugin aktualisieren..."),new PluginUpdate(),this.manifest,false,"emblem-package.png"); + Button update = new Button(i18n.tr("Manuell aktualisieren..."),new PluginUpdate(),this.manifest,false,"emblem-package.png"); // Update und oeffnen gibt es nicht bei neuen Installationen update.setEnabled(manifest.isInstalled() || error != null); // Update auch bei Fehler erlauben @@ -165,7 +165,7 @@ super.handleAction(getSelectedVersion()); } }; - Button install = new Button(i18n.tr("Installieren..."),download,null,false,"document-save.png"); + Button install = new Button(i18n.tr(Application.getPluginLoader().getManifest(this.manifest.getPluginClass()) != null ? "Aktualisieren..." : "Installieren..."),download,null,false,"document-save.png"); this.addButton(install); } else if (this.type == Type.UPDATE && this.plugins != null && this.plugins.size() > 0) diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginListPart.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginListPart.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginListPart.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/internal/parts/PluginListPart.java 2019-02-11 10:24:01.000000000 +0000 @@ -261,7 +261,7 @@ c.addText("",true); } ButtonArea buttons = new ButtonArea(); - buttons.addButton(new Button(i18n.tr("Neues Plugin installieren..."),new PluginInstall(),null,false,"emblem-package.png")); + buttons.addButton(new Button(i18n.tr("Plugin manuell installieren..."),new PluginInstall(),null,false,"emblem-package.png")); buttons.addButton(new Button(i18n.tr("Repositories bearbeiten..."),new RepositoryEdit(),null,false,"document-properties.png")); buttons.addButton(new Button(i18n.tr("Automatische Updates konfigurieren..."),new UpdateEdit(),null,false,"view-refresh.png")); buttons.paint(comp); @@ -440,11 +440,18 @@ if (list.size() == 0) continue; - // Wir nehmen das Manifest des ersten - Manifest mf = list.get(0).getManifest(); - PluginDetailPart part = new PluginDetailPart(mf, list, Type.AVAILABLE); - availableParts.put(e.getKey(),part); - part.paint(availableList.getComposite()); + try + { + // Wir nehmen das Manifest des ersten + Manifest mf = list.get(0).getManifest(); + PluginDetailPart part = new PluginDetailPart(mf, list, Type.AVAILABLE); + availableParts.put(e.getKey(),part); + part.paint(availableList.getComposite()); + } + catch (Exception ex) + { + Logger.error("unable to load plugin details, skipping",ex); + } } } } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/parts/PanelButton.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/parts/PanelButton.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/parts/PanelButton.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/parts/PanelButton.java 2019-02-11 10:24:01.000000000 +0000 @@ -211,8 +211,7 @@ // Einmal mit weiss dahinter malen, weil das Bild Transparenz besitzt gc.setBackground(GUI.getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); - gc.fillRectangle(size); - + gc.fillRectangle(0,0,this.width,this.height); gc.drawImage(image,0,0,size.width,size.height,0,0,this.width,this.height); } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/SplashScreen.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/SplashScreen.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/SplashScreen.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/SplashScreen.java 2019-02-11 10:24:01.000000000 +0000 @@ -21,6 +21,7 @@ import java.util.jar.JarFile; import org.eclipse.swt.SWT; +import org.eclipse.swt.SWTException; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; @@ -302,10 +303,19 @@ { if (bar == null || bar.isDisposed() || display == null || display.isDisposed()) return; - Logger.trace("startup completed: " + percentComplete + " %"); - bar.setSelection(percentComplete); - bar.update(); - display.readAndDispatch(); + try + { + Logger.trace("startup completed: " + percentComplete + " %"); + bar.setSelection(percentComplete); + bar.update(); + display.readAndDispatch(); + } + catch (SWTException e) + { + // Falls genau in dem Moment das Display disposed wird + // Siehe https://jverein-forum.de/viewtopic.php?f=5&t=4513 + Logger.debug("display already disposed"); + } } }); } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/util/Color.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/util/Color.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/util/Color.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/util/Color.java 2019-02-11 10:24:01.000000000 +0000 @@ -96,6 +96,11 @@ */ public final static Color MANDATORY_BG = new Color("color.mandatory.bg", new RGB(255,240,220)); + /** + * Hintergrundfarbe von eigenen Tooltips. + */ + public final static Color TOOLTIP_BG = new Color("color.tooltip.bg", new RGB(239,230,159)); + private String name; private RGB value; private RGB defaultValue; diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/util/Popup.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/util/Popup.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/gui/util/Popup.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/gui/util/Popup.java 2019-02-11 10:24:01.000000000 +0000 @@ -13,6 +13,7 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.GridData; @@ -34,7 +35,7 @@ public class Popup { private final static int ALIGN_DEFAULT = SWT.BOTTOM | SWT.RIGHT; - private final static int ALPHA = 210; + private final static int ALPHA = 180; private Shell shell = null; private String title = null; @@ -43,6 +44,9 @@ private int align = ALIGN_DEFAULT; private int timeout = -1; + private Color bg = null; + private Color fg = null; + /** * ct * @param text anzuzeigender Text. @@ -109,12 +113,24 @@ // Schliessen, wenn schon eines offen ist. if (this.shell != null) this.close(); - - Display display = GUI.getDisplay(); + + final Display display = GUI.getDisplay(); + + // Wenn die konfigurierten Vorder- und Hintergrundfarben fehlen oder identisch sind, + // verwenden wir eigene + this.bg = display.getSystemColor(SWT.COLOR_INFO_BACKGROUND); + this.fg = display.getSystemColor(SWT.COLOR_INFO_FOREGROUND); + if (this.bg == null || this.fg == null || this.bg.equals(this.fg)) + { + this.bg = de.willuhn.jameica.gui.util.Color.TOOLTIP_BG.getSWTColor(); + this.fg = de.willuhn.jameica.gui.util.Color.BLACK.getSWTColor(); + } this.shell = new Shell(GUI.getShell(), SWT.ON_TOP | SWT.TOOL); this.shell.setAlpha(ALPHA); - this.shell.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + + if (this.bg != null) + this.shell.setBackground(this.bg); GridLayout gl = new GridLayout(2,false); gl.horizontalSpacing = 5; @@ -123,13 +139,13 @@ Composite comp = new Composite(this.shell,SWT.NONE); comp.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING)); - comp.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + if (this.bg != null) comp.setBackground(this.bg); comp.setBackgroundMode(SWT.INHERIT_FORCE); paint(comp); Button ok = new Button(this.shell,SWT.BORDER); ok.setLayoutData(new GridData(GridData.END)); - ok.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + if (this.bg != null) ok.setBackground(this.bg); ok.setText(" OK "); ok.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) @@ -208,14 +224,14 @@ Label label = new Label(comp, SWT.NONE); label.setLayoutData(new RowData()); label.setFont(Font.BOLD.getSWTFont()); - label.setForeground(GUI.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND)); - label.setBackground(GUI.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + if (this.fg != null) label.setForeground(this.fg); + if (this.bg != null) label.setBackground(this.bg); label.setText(this.title); } Label label = new Label(comp, SWT.NONE); label.setLayoutData(new RowData()); - label.setForeground(GUI.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND)); - label.setBackground(GUI.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); + if (this.fg != null) label.setForeground(this.fg); + if (this.bg != null) label.setBackground(this.bg); label.setText(text == null ? "" : text); } } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/messaging/PopupMessageConsumer.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/messaging/PopupMessageConsumer.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/messaging/PopupMessageConsumer.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/messaging/PopupMessageConsumer.java 2019-02-11 10:24:01.000000000 +0000 @@ -43,12 +43,16 @@ s1 = msg.getTitle(); s2 = msg.getText(); } - else + else if (message instanceof QueryMessage) { QueryMessage msg = (QueryMessage) message; s1 = msg.getName(); s2 = msg.getData() != null ? msg.getData().toString() : null; } + else + { + s2 = message.toString(); + } final String title = StringUtils.trimToEmpty(s1); final String text = StringUtils.trimToEmpty(s2); diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/plugin/PlaceholderPlugin.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/plugin/PlaceholderPlugin.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/plugin/PlaceholderPlugin.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/plugin/PlaceholderPlugin.java 2019-02-11 10:24:01.000000000 +0000 @@ -51,7 +51,8 @@ public static Plugin createInstance(Manifest manifest) { InvocationHandler handler = new PlaceholderInvocationHandler(new PlaceholderPlugin(manifest)); - return (Plugin) Proxy.newProxyInstance(manifest.getClassLoader(),new Class[]{Plugin.class},handler); + final ClassLoader loader = manifest.getClassLoader(); + return (Plugin) Proxy.newProxyInstance(loader != null ? loader : Application.getClassLoader(),new Class[]{Plugin.class},handler); } /** diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/services/inject/InjectHandlerResource.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/services/inject/InjectHandlerResource.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/services/inject/InjectHandlerResource.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/services/inject/InjectHandlerResource.java 2019-02-11 10:24:01.000000000 +0000 @@ -19,6 +19,7 @@ import de.willuhn.annotation.Inject; import de.willuhn.annotation.Injector; +import de.willuhn.boot.Bootable; import de.willuhn.jameica.plugin.Plugin; import de.willuhn.jameica.services.BeanService; import de.willuhn.jameica.system.Application; @@ -108,9 +109,17 @@ // Anhand des Typs suchen - aber nur, wenn wir die Abhaengigkeit nicht schon haben if (dep == null && c != null) { - Logger.trace(" inject bean " + c.getSimpleName() + " into " + name); - BeanService service = Application.getBootLoader().getBootable(BeanService.class); - dep = service.get(c); // aufloesen + if (isBootable(c)) + { + Logger.trace(" inject bootable " + c.getSimpleName() + " into " + name); + dep = Application.getBootLoader().getBootable(c); // direkt als Bootable laden + } + else + { + Logger.trace(" inject bean " + c.getSimpleName() + " into " + name); + BeanService service = Application.getBootLoader().getBootable(BeanService.class); + dep = service.get(c); // aufloesen per Beanservice + } } if (dep == null) // nichts gefunden @@ -132,6 +141,27 @@ } },Resource.class); } + + /** + * Prueft, ob die Klasse ein Bootable ist. + * Die Funktion sucht nur direkt in der Klasse. Nicht in den Elternklassen. + * @param type der Typ. + * @return true, wenn es ein Bootable ist. + */ + private static boolean isBootable(Class type) + { + Class[] interfaces = type.getInterfaces(); + if (interfaces == null || interfaces.length == 0) + return false; + + for (Class c:interfaces) + { + if (c.equals(Bootable.class)) + return true; + } + + return false; + } } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/system/AbstractApplicationCallback.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/system/AbstractApplicationCallback.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/system/AbstractApplicationCallback.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/system/AbstractApplicationCallback.java 2019-02-11 10:24:01.000000000 +0000 @@ -33,27 +33,21 @@ private String hostname = null; /** - * ct. - */ - public AbstractApplicationCallback() - { - // Migration: Loeschen der Checksummen - werden nicht mehr gebraucht - if (settings.getString("jameica.system.callback.checksum",null) != null) - { - Logger.info("removing obsolete checksums"); - settings.setAttribute("jameica.system.callback.checksum",(String) null); - settings.setAttribute("jameica.system.callback.checksum.salt",(String) null); - } - } - - /** * @see de.willuhn.jameica.system.ApplicationCallback#getHostname() */ public String getHostname() throws Exception { if (StringUtils.trimToNull(this.hostname) != null) return this.hostname; - + + // Checken, ob wir einen gespeicherten Hostnamen haben + this.hostname = this.settings.getString("jameica.hostname",null); + if (this.hostname != null && this.hostname.length() > 0) + { + Logger.info("using manually configured hostname: " + this.hostname); + return this.hostname; + } + try { InetAddress a = InetAddress.getLocalHost(); @@ -76,11 +70,6 @@ Logger.write(Level.DEBUG,"stacktrace for debugging purpose",e); } - // Checken, ob wir einen gespeicherten Hostnamen haben - this.hostname = this.settings.getString("jameica.hostname",null); - if (this.hostname != null && this.hostname.length() > 0) - return this.hostname; - // BUGZILLA 26 http://www.willuhn.de/bugzilla/show_bug.cgi?id=26 String question = Application.getI18n().tr("Der Hostname Ihres Computers konnte nicht ermittelt werden.\n" + diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/system/Platform.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/system/Platform.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/system/Platform.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/system/Platform.java 2019-02-11 10:24:01.000000000 +0000 @@ -161,7 +161,7 @@ { Logger.warn("resetting \"ask\" flag in .jameica.properties"); BootstrapSettings.setAskWorkdir(true); - throw new ApplicationException("Bitte versuchen Sie, Jameica erneut zu starten und wählen Sie einen anderen Benuzterordner.",e); + throw new ApplicationException("Bitte versuchen Sie, Jameica erneut zu starten und wählen Sie einen anderen Benutzerordner.",e); } } diff -Nru jameica-2.8.1+dfsg/src/de/willuhn/jameica/transport/HttpTransport.java jameica-2.8.4+dfsg/src/de/willuhn/jameica/transport/HttpTransport.java --- jameica-2.8.1+dfsg/src/de/willuhn/jameica/transport/HttpTransport.java 2018-08-13 15:42:57.000000000 +0000 +++ jameica-2.8.4+dfsg/src/de/willuhn/jameica/transport/HttpTransport.java 2019-02-11 10:24:01.000000000 +0000 @@ -11,17 +11,22 @@ package de.willuhn.jameica.transport; import java.io.File; +import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.URL; import java.net.URLConnection; +import java.net.URLDecoder; import java.util.ArrayList; import java.util.List; +import org.apache.commons.lang.StringUtils; + import de.willuhn.annotation.Lifecycle; import de.willuhn.annotation.Lifecycle.Type; import de.willuhn.io.IOUtil; +import de.willuhn.jameica.messaging.StatusBarMessage; import de.willuhn.jameica.system.Application; import de.willuhn.logging.Logger; import de.willuhn.util.ApplicationException; @@ -43,6 +48,7 @@ } private URL url = null; + private URL target = null; /** * @see de.willuhn.jameica.transport.Transport#init(java.net.URL) @@ -66,7 +72,7 @@ return file.exists(); } - HttpURLConnection conn = (HttpURLConnection) this.url.openConnection(); + HttpURLConnection conn = this.getConnection(); conn.connect(); return conn.getResponseCode() == HttpURLConnection.HTTP_OK; } @@ -91,7 +97,7 @@ return file.length(); } - URLConnection conn = this.url.openConnection(); + URLConnection conn = this.getConnection(); conn.connect(); return conn.getContentLength(); } @@ -114,7 +120,7 @@ if (os == null) throw new ApplicationException(i18n.tr("Kein Download-Ziel angegeben")); - URLConnection conn = this.url.openConnection(); + URLConnection conn = this.getConnection(); conn.connect(); if (monitor != null) monitor.setStatusText(i18n.tr("Download von {0}",this.url.toString())); @@ -189,6 +195,67 @@ IOUtil.close(is,os); } } + + /** + * Liefert die HTTP-Connection. + * @return die HTTP-Connection. + * @throws Exception + */ + private HttpURLConnection getConnection() throws Exception + { + // Wir machen die URL-Aufloesung der Redirects nicht jedesmal neu. + if (this.target != null) + return (HttpURLConnection) this.target.openConnection(); + + + URL curr = this.url; + + // BUGZILLA 1867 Maximal 10 Redirects + for (int i=0;i<10;++i) + { + HttpURLConnection conn = (HttpURLConnection) curr.openConnection(); + conn.setInstanceFollowRedirects(false); // Wir machen die Redirects selbst + + int code = conn.getResponseCode(); + + if (code != HttpURLConnection.HTTP_MOVED_PERM && code != HttpURLConnection.HTTP_MOVED_TEMP) + { + // Wir haben eine finale URL + this.target = curr; + return conn; + } + + // Wir haben einen HTTP-Code fuer eine Umleitung. Checken, ob wir eine neue Redirect-Ziel haben + String loc = StringUtils.trimToNull(conn.getHeaderField("Location")); + + // Wir haben zwar einen HTTP-Code fuer eine Umleitung. Wir haben aber gar keine + // neue URL erhalten. Dann koennen wir auch nichts machen. + if (loc == null) + { + Logger.warn("got http status moved (" + code + ") but no location"); + return conn; + } + + URL prev = curr; + loc = URLDecoder.decode(loc, "UTF-8"); + curr = new URL(this.url, loc); // fuer relative Location-Header + + // Wir akzeptieren die Umleitung nur dann, wenn der Hostname identisch geblieben ist. + // Umleitungen auf andere Server akzeptieren wir aus Sicherheitsgruenden nicht + String s1 = this.url.getHost(); + String s2 = curr.getHost(); + if (!StringUtils.equalsIgnoreCase(s1,s2)) + { + Application.getMessagingFactory().sendMessage(new StatusBarMessage(Application.getI18n().tr("Umleitung von {0} auf {1} aus Sicherheitsgründen nicht erlaubt",s1,s2),StatusBarMessage.TYPE_ERROR)); + throw new SecurityException("got http redirect with change to another host, not permitted for security reasons [source: " + s1 + ", target: " + s2 + "]"); + } + + // naechster Versuch. + Logger.info("got redirect from " + prev + " to " + curr); + } + + throw new IOException("too many redirects for url: " + this.url); + } /** * @see de.willuhn.jameica.transport.Transport#getProtocols()