From doko at icedtea.classpath.org Sun Sep 2 03:33:17 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Sun, 02 Sep 2012 10:33:17 +0000 Subject: /hg/icedtea7: Remove the Xp header and library configure checks. Message-ID: changeset a9324fa05b9d in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=a9324fa05b9d author: doko at ubuntu.com date: Sun Sep 02 12:28:40 2012 +0200 Remove the Xp header and library configure checks. Xp isn't used anymore by recent jdk versions. 2012-09-02 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r 41aff8e2ab4d -r a9324fa05b9d ChangeLog --- a/ChangeLog Fri Aug 31 07:27:01 2012 +0100 +++ b/ChangeLog Sun Sep 02 12:28:40 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-02 Matthias Klose + + * configure.ac: Remove the Xp header and library checks. + 2012-08-24 Andrew John Hughes * generated/com/sun/corba/se/impl/logging/LogStrings.properties, diff -r 41aff8e2ab4d -r a9324fa05b9d configure.ac --- a/configure.ac Fri Aug 31 07:27:01 2012 +0100 +++ b/configure.ac Sun Sep 02 12:28:40 2012 +0200 @@ -215,16 +215,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From bugzilla-daemon at icedtea.classpath.org Sun Sep 2 11:27:41 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 02 Sep 2012 18:27:41 +0000 Subject: [Bug 843] www.mojebanka.cz hangs with icedtea-web In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=843 --- Comment #32 from David --- I got: firefox java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (Gentoo build 1.7.0_07-b30) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode) JAR https://www.mojebanka.cz/jars/detectVM.jar not found. Continuing. JAR https://www.mojebanka.cz/jars/ktpsp.jar not found. Continuing. JAR https://www.mojebanka.cz/jars/shapp_non_wysiwys.jar not found. Continuing. JAR https://www.mojebanka.cz/jars/ibapp.jar not found. Continuing. JAR https://www.mojebanka.cz/jars/ktpsp.jar not found. Continuing. JAR https://www.mojebanka.cz/jars/shapp_non_wysiwys.jar not found. Continuing. JAR https://www.mojebanka.cz/jars/ibapp.jar not found. Continuing. net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886) Caused by: java.lang.ClassNotFoundException: kbib.security.detect.detectVM at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1404) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725) ... 2 more Caused by: java.lang.ClassNotFoundException: kbib.security.detect.detectVM at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1404) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154) at sun.applet.AppletPanel.run(AppletPanel.java:379) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:429) at java.lang.Thread.run(Thread.java:722) net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886) Caused by: java.lang.ClassNotFoundException: kbib.security.signer.IBSignerApplet at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1404) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725) ... 2 more Caused by: java.lang.ClassNotFoundException: kbib.security.signer.IBSignerApplet at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1404) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886) java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154) at sun.applet.AppletPanel.run(AppletPanel.java:379) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:429) at java.lang.Thread.run(Thread.java:722) with dev-java/icedtea-web-1.2.1-r8 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120902/d4a40fce/attachment.html From andrew at icedtea.classpath.org Sun Sep 2 12:35:43 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Sun, 02 Sep 2012 19:35:43 +0000 Subject: /hg/release/icedtea7-2.1: 3 new changesets Message-ID: changeset 296309f1853f in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=296309f1853f author: Andrew John Hughes date: Sun Sep 02 15:49:15 2012 +0100 Update with security fixes and other forest changes. 2011-08-31 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Bring in security updates and other fixes from forest. (HOTSPOT_CHANGESET): Likewise. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (HOTSPOT_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * NEWS: Updated with new fixes. changeset 9ade3410b04a in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=9ade3410b04a author: Andrew John Hughes date: Sun Sep 02 15:50:55 2012 +0100 Set version to 2.1.2 and update NEWS with release date. 2011-09-02 Andrew John Hughes * configure.ac: Set to 2.1.2. * NEWS: Set release date for 2.1.2. changeset 5bb0b3f3f993 in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=5bb0b3f3f993 author: Andrew John Hughes date: Sun Sep 02 20:35:32 2012 +0100 Added tag icedtea-2.1.2 for changeset 9ade3410b04a diffstat: .hgtags | 1 + ChangeLog | 25 +++++++++++++++++++++++++ Makefile.am | 28 ++++++++++++++-------------- NEWS | 19 ++++++++++++++++++- configure.ac | 2 +- 5 files changed, 59 insertions(+), 16 deletions(-) diffs (117 lines): diff -r ec6dd96b871b -r 5bb0b3f3f993 .hgtags --- a/.hgtags Wed Jun 13 15:38:28 2012 +0100 +++ b/.hgtags Sun Sep 02 20:35:32 2012 +0100 @@ -38,3 +38,4 @@ 0000000000000000000000000000000000000000 icedtea-2.1 328ab29b4c9d64f8b0422eaf0c3dcebfb8fd8c30 icedtea-2.1 5ce34ab2682058ad20bfba084ee6d05e84bd56c4 icedtea-2.1.1 +9ade3410b04a47726a2f4ae677905dccc6930599 icedtea-2.1.2 diff -r ec6dd96b871b -r 5bb0b3f3f993 ChangeLog --- a/ChangeLog Wed Jun 13 15:38:28 2012 +0100 +++ b/ChangeLog Sun Sep 02 20:35:32 2012 +0100 @@ -1,3 +1,28 @@ +2011-09-02 Andrew John Hughes + + * configure.ac: Set to 2.1.2. + * NEWS: Set release date for 2.1.2. + +2011-08-31 Andrew John Hughes + + * Makefile.am: + (CORBA_CHANGESET): Bring in security updates + and other fixes from forest. + (HOTSPOT_CHANGESET): Likewise. + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (CORBA_SHA256SUM): Likewise. + (HOTSPOT_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + * NEWS: Updated with new fixes. + 2011-06-13 Andrew John Hughes * NEWS: Add section for 2.1.2. diff -r ec6dd96b871b -r 5bb0b3f3f993 Makefile.am --- a/Makefile.am Wed Jun 13 15:38:28 2012 +0100 +++ b/Makefile.am Sun Sep 02 20:35:32 2012 +0100 @@ -4,21 +4,21 @@ JDK_UPDATE_VERSION = 03 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) -CORBA_CHANGESET = 338c21646c76 -HOTSPOT_CHANGESET = 8b7c4c5f6ba9 -JAXP_CHANGESET = 7a8825b15df6 -JAXWS_CHANGESET = 7edfbfe974f2 -JDK_CHANGESET = d5ddeffc4651 -LANGTOOLS_CHANGESET = b534c4c6cd9b -OPENJDK_CHANGESET = 22cc03983e20 +CORBA_CHANGESET = 5fb07c08e9e8 +HOTSPOT_CHANGESET = c159737dd826 +JAXP_CHANGESET = 68cc6550c43e +JAXWS_CHANGESET = 27864fc81873 +JDK_CHANGESET = 362f79895241 +LANGTOOLS_CHANGESET = 59d1da099001 +OPENJDK_CHANGESET = 1e3893e92a16 -CORBA_SHA256SUM = 10425cbbb439551293a7a96a128f25ce408c38826bef8562f4c2d65d3134a1d3 -HOTSPOT_SHA256SUM = 22866990d143e76ced94b76defa3051e5e5d9a51fd272d63daa0df272d6406a2 -JAXP_SHA256SUM = 297c8dbeed5afa5395b6be06b17282d53f8a888c2909074dfc1605afc0daf1c2 -JAXWS_SHA256SUM = 823ca6b8fd780bf1b1565a90cfc8ec6f0ee422a5d25ffb20b1ce0272dc4955aa -JDK_SHA256SUM = e83e6234842376147a4c32451f23d629ba107e908ebdb0f367657f9cc6c1be98 -LANGTOOLS_SHA256SUM = c77dd42d83f06d18fa8aa65c93d137608a2e02cf24b68fc10d7b1c0bcc12a93c -OPENJDK_SHA256SUM = ada790b4754f521ebfad0dd909ea29b92b2b3c1b84b2e99d32673343727d95d7 +CORBA_SHA256SUM = c17cc7b5f2e4ee50ccccbe1a0ccc7c0f9e2bcab2c056c1a0e97c41c0083455e2 +HOTSPOT_SHA256SUM = c1e626ecf4e7118ac269923ef0b83f5f8d36b0e816b293197ffbf8dd5083fa8d +JAXP_SHA256SUM = 1db3906130149da1e8222273b6f8c1c0fe1095f2760c04ce28750f5e254cbc7b +JAXWS_SHA256SUM = 5a4641b75f297b79fcb2f46c7fceb7a8b911e1567ecbc0d566abcb992b0a0de3 +JDK_SHA256SUM = a7c9d6e8e855189066fe7aef1a61e08d581e07415cc5a0b398f3c82f017559e2 +LANGTOOLS_SHA256SUM = e901f0e4dba52f4ef3fedc946b0106a29ad7f406ab44c7028f1e16f2a23a6e07 +OPENJDK_SHA256SUM = 55f1c6ab34ce00db014a94fb0c6301de4fcea0077ccff4b4ba6827a17ec3bd77 CACAO_VERSION = a567bcb7f589 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9 diff -r ec6dd96b871b -r 5bb0b3f3f993 NEWS --- a/NEWS Wed Jun 13 15:38:28 2012 +0100 +++ b/NEWS Sun Sep 02 20:35:32 2012 +0100 @@ -10,7 +10,24 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 2.1.2 (2012-XX-XX): +New in release 2.1.2 (2012-09-02): + +* Security fixes + - RH852051, CVE-2012-4681, S7162473: Reintroduce PackageAccessible checks removed in 6788531. + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder + - S7194567, CVE-2012-3136: Improve long term persistence of java.beans objects + - S7163201, CVE-2012-0547: Simplify toolkit internals references +* OpenJDK + - PR1101: Undefined symbols on GNU/Linux SPARC + - S7182135: Impossible to use some editors directly + - S7183701: [TEST] closed/java/beans/security/TestClassFinder.java - compilation failed + - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE + - S7190813: (launcher) RPATH needs to have additional paths +* ARM + - ARM: Fix trashed thread ptr after recursive re-entry from + - ARM: Rename a bunch of misleadingly-named functions + - Enable _adapter_opt_spread* jsr 292 code, now passes + - Fix call to handle_special_method(). Fix compareAndSwapLong. New in release 2.1.1 (2012-06-12): diff -r ec6dd96b871b -r 5bb0b3f3f993 configure.ac --- a/configure.ac Wed Jun 13 15:38:28 2012 +0100 +++ b/configure.ac Sun Sep 02 20:35:32 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.1.2pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.1.2], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From ahughes at redhat.com Sun Sep 2 12:42:19 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Sun, 2 Sep 2012 15:42:19 -0400 (EDT) Subject: /hg/icedtea7: Remove the Xp header and library configure checks. In-Reply-To: Message-ID: <441951077.14419202.1346614939513.JavaMail.root@redhat.com> ----- Original Message ----- > changeset a9324fa05b9d in /hg/icedtea7 > details: > http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=a9324fa05b9d > author: doko at ubuntu.com > date: Sun Sep 02 12:28:40 2012 +0200 > > Remove the Xp header and library configure checks. > > Xp isn't used anymore by recent jdk versions. > > 2012-09-02 Matthias Klose > > * configure.ac: Remove the Xp header and library checks. > > > diffstat: > > ChangeLog | 4 ++++ > configure.ac | 10 ---------- > 2 files changed, 4 insertions(+), 10 deletions(-) > > diffs (31 lines): > > diff -r 41aff8e2ab4d -r a9324fa05b9d ChangeLog > --- a/ChangeLog Fri Aug 31 07:27:01 2012 +0100 > +++ b/ChangeLog Sun Sep 02 12:28:40 2012 +0200 > @@ -1,3 +1,7 @@ > +2012-09-02 Matthias Klose > + > + * configure.ac: Remove the Xp header and library checks. > + > 2012-08-24 Andrew John Hughes > > * generated/com/sun/corba/se/impl/logging/LogStrings.properties, > diff -r 41aff8e2ab4d -r a9324fa05b9d configure.ac > --- a/configure.ac Fri Aug 31 07:27:01 2012 +0100 > +++ b/configure.ac Sun Sep 02 12:28:40 2012 +0200 > @@ -215,16 +215,6 @@ > AC_SUBST(XT_CFLAGS) > AC_SUBST(XT_LIBS) > > -dnl Check for libXp headers and libraries. > -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) > -if test "x${XP_FOUND}" = xno > -then > - AC_MSG_ERROR([Could not find Xp - \ > - Try installing libXp-devel.]) > -fi > -AC_SUBST(XP_CFLAGS) > -AC_SUBST(XP_LIBS) > - > dnl Check for libX11 headers and libraries. > PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) > if test "x${X11_FOUND}" = xno > Do you know when this dependency was removed? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From mark at klomp.org Sun Sep 2 13:24:50 2012 From: mark at klomp.org (Mark Wielaard) Date: Sun, 2 Sep 2012 22:24:50 +0200 Subject: Moved downloads and hg archives to backup server Message-ID: <20120902202449.GA7318@toonder.wildebeest.org> Hi, Looking at the network stats it seems that since about 5 days ago IcedTea has suddenly become more than 5 times as popular as before. Probably because we offered a fix for CVE-2012-4681 in a release very quickly. Since we were already at network capacity on the main server this pushed us over the edge. To make sure we can still keep distributing our work I have redirected the downloads (http://icedtea.classpath.org/downloads/) and hg archives (http://icedtea.classpath.org/hg/*/archive/*tar.gz|bz2) to the backup server. These make up the bulk of the data we distribute. If I did things correctly things are mostly transparent, downloads generate a 302 redirect to the backup server. The archives were a bit tricky though, since we use the SHA256SUMs, they have to be bit-identical even though they are generated dynamically. I think I got it right. But it needed the exact same python (2.5) on both servers or some file ordering got slightly different, causing sha256sum failures. The backups are generated as soon as possible on every push. You will notice something like: remote: Notifying backup server about /hg/testrepo... remote: Scheduled backup of hg/testrepo. It will then take up to 5 minutes for the hg repo backup to be in sync with the main server. If anything goes wrong on active push the repos are also pulled back into sync every 4 hours. The static download files are synced every 15 minutes. So please be a little patient when uploading a new release file. It will eventually show up automagically on the backup server. Please yell and scream if anything looks wrong. Apologies for the rush in moving the content, but the sudden large increase in network traffic really made it necessary. Thanks, Mark From gnu_andrew at member.fsf.org Sun Sep 2 20:23:30 2012 From: gnu_andrew at member.fsf.org (=?UTF-8?B?QW5kw6/Drw==?=) Date: Mon, 3 Sep 2012 04:23:30 +0100 Subject: [SECURITY] IcedTea 2.1.2 Released! Message-ID: We are pleased to announce the release of IcedTea 2.1.2, based on OpenJDK7 u2 with additional security fixes. The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as a PulseAudio sound driver and support for alternative virtual machines. This 2.1.2 release includes a fix for the zero-day issues that arose this week: * RH852051, CVE-2012-4681, S7162473: Reintroduce PackageAccessible checks removed in 6788531. * S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder * S7194567, CVE-2012-3136: Improve long term persistence of java.beans objects * S7163201, CVE-2012-0547: Simplify toolkit internals references Patches are welcome; please contact the mailing list (distro-pkg-dev at openjdk.java.net) and/or file bugs (http://icedtea.classpath.org/bugzilla) under the appropriate component. Full details of the release can be found below. What?s New? ?????? New in release 2.1.2 (2012-09-02): * Security fixes - RH852051, CVE-2012-4681, S7162473: Reintroduce PackageAccessible checks removed in 6788531. - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder - S7194567, CVE-2012-3136: Improve long term persistence of java.beans objects - S7163201, CVE-2012-0547: Simplify toolkit internals references * OpenJDK - PR1101: Undefined symbols on GNU/Linux SPARC - S7182135: Impossible to use some editors directly - S7183701: [TEST] closed/java/beans/security/TestClassFinder.java - compilation failed - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE - S7190813: (launcher) RPATH needs to have additional paths * ARM - ARM: Fix trashed thread ptr after recursive re-entry from - ARM: Rename a bunch of misleadingly-named functions - Enable _adapter_opt_spread* jsr 292 code, now passes - Fix call to handle_special_method(). Fix compareAndSwapLong. The tarball can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea-2.1.2.tar.gz SHA256 checksums: c7ebdb84581dca48a4389e12790d2d506b9cfc05f16612169284d5a5e3a02269 icedtea-2.1.2.tar.gz Each tarball is accompanied by a digital signature (available at the above URL + '.sig'). This is produced using my public key. See details below. * Andrew Haley (ARM fixes) * Andrew John Hughes (all other patches/merging, reproducer testing & release management) * Chris Phillips (Zero FTBFS & ARM fixes) * Roman Kennke (Zero FTBFS fix) We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea-2.1.2.tar.gz $ cd icedtea-2.1.2 Full build requirements and instructions are in INSTALL: $ ./configure [--enable-zero --enable-pulse-java --enable-systemtap...] $ make Happy hacking! -- Andii :-) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From bugzilla-daemon at icedtea.classpath.org Mon Sep 3 03:53:27 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Sep 2012 10:53:27 +0000 Subject: [Bug 986] IcedTea7 fails to build with IcedTea6 CACAO due to to low max heap size. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=986 --- Comment #2 from Andrew John Hughes --- In 2.3.1: http://blog.fuseyism.com/index.php/2012/08/30/security-icedtea-2-3-1-released/ -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/19173847/attachment.html From ptisnovs at icedtea.classpath.org Mon Sep 3 04:03:12 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 03 Sep 2012 11:03:12 +0000 Subject: /hg/rhino-tests: Made this test compatible with JDK7: Message-ID: changeset 94e0142da92d in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=94e0142da92d author: Pavel Tisnovsky date: Mon Sep 03 13:05:48 2012 +0200 Made this test compatible with JDK7: src/org/RhinoTests/ScriptExceptionClassTest.java. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptExceptionClassTest.java | 117 ++++++++++++---------- 2 files changed, 68 insertions(+), 54 deletions(-) diffs (176 lines): diff -r 9e4f9b602df1 -r 94e0142da92d ChangeLog --- a/ChangeLog Wed Aug 29 17:32:04 2012 +0200 +++ b/ChangeLog Mon Sep 03 13:05:48 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-03 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptExceptionClassTest.java: + Made this test compatible with JDK7. + 2012-08-29 Pavel Tisnovsky * src/org/RhinoTests/ScriptEngineClassTest.java: diff -r 9e4f9b602df1 -r 94e0142da92d src/org/RhinoTests/ScriptExceptionClassTest.java --- a/src/org/RhinoTests/ScriptExceptionClassTest.java Wed Aug 29 17:32:04 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionClassTest.java Mon Sep 03 13:05:48 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -217,68 +219,46 @@ * Test for method javax.script.ScriptException.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.scriptExceptionClass.getConstructors(); + // map of constructors which should exists + Map testedConstructors = new HashMap(); + testedConstructors.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); + testedConstructors.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); + testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); + testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + + Constructor[] constructors = this.scriptExceptionClass.getDeclaredConstructors(); assertEquals(constructors.length, 4, "only 4 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.String)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.Exception)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[2].getName(); - constructorString = constructors[2].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.String,java.lang.String,int)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[3].getName(); - constructorString = constructors[3].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", - "wrong constructor.toString() " + constructorName); + + // check if all constructors exists + for (Constructor constructor : constructors) { + String constructorName = constructors[0].getName(); + String constructorString = constructors[0].toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** * Test for method javax.script.ScriptException.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { + // map of declared constructors which should exists + Map testedConstructors = new HashMap(); + testedConstructors.put("public javax.script.ScriptException(java.lang.String)", "javax.script.ScriptException"); + testedConstructors.put("public javax.script.ScriptException(java.lang.Exception)", "javax.script.ScriptException"); + testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); + testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); + Constructor[] constructors = this.scriptExceptionClass.getDeclaredConstructors(); assertEquals(constructors.length, 4, "only 4 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.String)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.Exception)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[2].getName(); - constructorString = constructors[2].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.String,java.lang.String,int)", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[3].getName(); - constructorString = constructors[3].toString(); - assertEquals(constructorName, "javax.script.ScriptException", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", - "wrong constructor.toString() " + constructorName); + + // check if all constructors exists + for (Constructor constructor : constructors) { + String constructorName = constructors[0].getName(); + String constructorString = constructors[0].toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** @@ -331,7 +311,7 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { "public boolean java.lang.Object.equals(java.lang.Object)", "public final native java.lang.Class java.lang.Object.getClass()", "public final native void java.lang.Object.notify()", @@ -355,6 +335,34 @@ "public void java.lang.Throwable.printStackTrace(java.io.PrintWriter)", "public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])", }; + + final String[] methodsThatShouldExists_jdk7 = { + "public boolean java.lang.Object.equals(java.lang.Object)", + "public final native java.lang.Class java.lang.Object.getClass()", + "public final native void java.lang.Object.notify()", + "public final native void java.lang.Object.notifyAll()", + "public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException", + "public final void java.lang.Object.wait() throws java.lang.InterruptedException", + "public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException", + "public int javax.script.ScriptException.getColumnNumber()", + "public int javax.script.ScriptException.getLineNumber()", + "public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()", + "public java.lang.String java.lang.Throwable.getLocalizedMessage()", + "public java.lang.String java.lang.Throwable.toString()", + "public java.lang.String javax.script.ScriptException.getFileName()", + "public java.lang.String javax.script.ScriptException.getMessage()", + "public synchronized java.lang.Throwable java.lang.Throwable.getCause()", + "public native int java.lang.Object.hashCode()", + "public synchronized java.lang.Throwable java.lang.Throwable.initCause(java.lang.Throwable)", + "public synchronized java.lang.Throwable java.lang.Throwable.fillInStackTrace()", + "public void java.lang.Throwable.printStackTrace()", + "public void java.lang.Throwable.printStackTrace(java.io.PrintStream)", + "public void java.lang.Throwable.printStackTrace(java.io.PrintWriter)", + "public void java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])", + "public final synchronized void java.lang.Throwable.addSuppressed(java.lang.Throwable)", + "public final synchronized java.lang.Throwable[] java.lang.Throwable.getSuppressed()", + }; + // get all inherited methods Method[] methods = this.scriptExceptionClass.getMethods(); // and transform the array into a list of method names @@ -362,6 +370,7 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From bugzilla-daemon at icedtea.classpath.org Mon Sep 3 04:10:52 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Sep 2012 11:10:52 +0000 Subject: [Bug 1105] Fatal error running syncrify server on arm hardfloat In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1105 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #741|application/octet-stream |text/plain mime type| | -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/a8b9f109/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 3 04:11:16 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Sep 2012 11:11:16 +0000 Subject: [Bug 1105] Fatal error running syncrify server on arm hardfloat In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1105 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahughes at redhat.com Version|unspecified |6-1.11.3 -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/f93a230e/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 3 04:12:00 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Sep 2012 11:12:00 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |unassigned at icedtea.classpat | |h.org Component|IcedTea |Plugin Assignee|ahughes at redhat.com |dbhole at redhat.com Product|IcedTea |IcedTea-Web -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/43c4c922/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 3 04:12:30 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 03 Sep 2012 11:12:30 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahughes at redhat.com Version|unspecified |1.2 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/04bea5e7/attachment.html From andrew at icedtea.classpath.org Mon Sep 3 04:27:28 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 11:27:28 +0000 Subject: /hg/release/icedtea7-2.1: Prepare for 2.1.3. Message-ID: changeset 8557b0fc502a in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=8557b0fc502a author: Andrew John Hughes date: Mon Sep 03 12:27:19 2012 +0100 Prepare for 2.1.3. 2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.1.3pre. * NEWS: Add new section. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r 5bb0b3f3f993 -r 8557b0fc502a ChangeLog --- a/ChangeLog Sun Sep 02 20:35:32 2012 +0100 +++ b/ChangeLog Mon Sep 03 12:27:19 2012 +0100 @@ -1,3 +1,8 @@ +2011-09-03 Andrew John Hughes + + * configure.ac: Bump to 2.1.3pre. + * NEWS: Add new section. + 2011-09-02 Andrew John Hughes * configure.ac: Set to 2.1.2. diff -r 5bb0b3f3f993 -r 8557b0fc502a NEWS --- a/NEWS Sun Sep 02 20:35:32 2012 +0100 +++ b/NEWS Mon Sep 03 12:27:19 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 2.1.3 (2012-XX-XX): + New in release 2.1.2 (2012-09-02): * Security fixes diff -r 5bb0b3f3f993 -r 8557b0fc502a configure.ac --- a/configure.ac Sun Sep 02 20:35:32 2012 +0100 +++ b/configure.ac Mon Sep 03 12:27:19 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.1.2], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.1.3pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Mon Sep 3 05:31:25 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 12:31:25 +0000 Subject: /hg/release/icedtea7-2.2: Prepare for 2.2.3. Message-ID: changeset 0c28205afaca in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=0c28205afaca author: Andrew John Hughes date: Mon Sep 03 13:31:12 2012 +0100 Prepare for 2.2.3. 2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.2.3pre. * NEWS: Add new section. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r b21260ab4c64 -r 0c28205afaca ChangeLog --- a/ChangeLog Fri Aug 31 22:28:29 2012 +0100 +++ b/ChangeLog Mon Sep 03 13:31:12 2012 +0100 @@ -1,3 +1,8 @@ +2011-09-03 Andrew John Hughes + + * configure.ac: Bump to 2.2.3pre. + * NEWS: Add new section. + 2011-08-31 Andrew John Hughes * configure.ac: Set to 2.2.2. diff -r b21260ab4c64 -r 0c28205afaca NEWS --- a/NEWS Fri Aug 31 22:28:29 2012 +0100 +++ b/NEWS Mon Sep 03 13:31:12 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 2.2.3 (2012-XX-XX): + New in release 2.2.2 (2012-08-31): * Security fixes diff -r b21260ab4c64 -r 0c28205afaca configure.ac --- a/configure.ac Fri Aug 31 22:28:29 2012 +0100 +++ b/configure.ac Mon Sep 03 13:31:12 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.2.2], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.2.3pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Mon Sep 3 05:34:55 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 12:34:55 +0000 Subject: /hg/release/icedtea7-2.3: Prepare for 2.3.3. Message-ID: changeset c05782d9083f in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=c05782d9083f author: Andrew John Hughes date: Mon Sep 03 13:34:49 2012 +0100 Prepare for 2.3.3. 2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.3.3pre. * NEWS: Add new section. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r e7117fcb33ed -r c05782d9083f ChangeLog --- a/ChangeLog Fri Aug 31 20:35:48 2012 +0100 +++ b/ChangeLog Mon Sep 03 13:34:49 2012 +0100 @@ -1,3 +1,8 @@ +2011-09-03 Andrew John Hughes + + * configure.ac: Bump to 2.3.3pre. + * NEWS: Add new section. + 2012-08-31 Andrew John Hughes * NEWS: Fix date of 2.3.2 release. diff -r e7117fcb33ed -r c05782d9083f NEWS --- a/NEWS Fri Aug 31 20:35:48 2012 +0100 +++ b/NEWS Mon Sep 03 13:34:49 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 2.3.3 (2012-XX-XX): + New in release 2.3.2 (2012-08-31): * Security fixes diff -r e7117fcb33ed -r c05782d9083f configure.ac --- a/configure.ac Fri Aug 31 20:35:48 2012 +0100 +++ b/configure.ac Mon Sep 03 13:34:49 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.3.2], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.3.3pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Mon Sep 3 06:06:10 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 13:06:10 +0000 Subject: /hg/icedtea7: Add new releases to NEWS: 2.1.2, 2.2.2, 2.3.0, 2.3... Message-ID: changeset b7036fcc4727 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=b7036fcc4727 author: Andrew John Hughes date: Mon Sep 03 14:06:01 2012 +0100 Add new releases to NEWS: 2.1.2, 2.2.2, 2.3.0, 2.3.1 & 2.3.2. 2012-09-03 Andrew John Hughes * NEWS: Add new releases: 2.1.2, 2.2.2, 2.3.0, 2.3.1 & 2.3.2. diffstat: ChangeLog | 5 + NEWS | 433 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 435 insertions(+), 3 deletions(-) diffs (471 lines): diff -r a9324fa05b9d -r b7036fcc4727 ChangeLog --- a/ChangeLog Sun Sep 02 12:28:40 2012 +0200 +++ b/ChangeLog Mon Sep 03 14:06:01 2012 +0100 @@ -1,3 +1,8 @@ +2012-09-03 Andrew John Hughes + + * NEWS: Add new releases: 2.1.2, 2.2.2, + 2.3.0, 2.3.1 & 2.3.2. + 2012-09-02 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r a9324fa05b9d -r b7036fcc4727 NEWS --- a/NEWS Sun Sep 02 12:28:40 2012 +0200 +++ b/NEWS Mon Sep 03 14:06:01 2012 +0100 @@ -12,18 +12,74 @@ New in release 2.4 (2012-XX-XX): -New in release 2.3 (2012-XX-XX): +New in release 2.1.2 (2012-09-02): +* Security fixes + - RH852051, CVE-2012-4681, S7162473: Reintroduce PackageAccessible checks removed in 6788531. + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder + - S7194567, CVE-2012-3136: Improve long term persistence of java.beans objects + - S7163201, CVE-2012-0547: Simplify toolkit internals references +* OpenJDK + - PR1101: Undefined symbols on GNU/Linux SPARC + - S7182135: Impossible to use some editors directly + - S7183701: [TEST] closed/java/beans/security/TestClassFinder.java - compilation failed + - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE + - S7190813: (launcher) RPATH needs to have additional paths +* ARM + - ARM: Fix trashed thread ptr after recursive re-entry from + - ARM: Rename a bunch of misleadingly-named functions + - Enable _adapter_opt_spread* jsr 292 code, now passes + - Fix call to handle_special_method(). Fix compareAndSwapLong. + +New in release 2.2.2 (2012-08-31): + +* Security fixes + - RH852051, CVE-2012-4681, S7162473: Reintroduce PackageAccessible checks removed in 6788531. + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder + - S7194567, CVE-2012-3136: Improve long term persistence of java.beans objects + - S7163201, CVE-2012-0547: Simplify toolkit internals references +* OpenJDK + - Fix Zero FTBFS issues + - PR1101: Undefined symbols on GNU/Linux SPARC + - S7180036: Build failure in Mac platform caused by fix # 7163201 + - S7182135: Impossible to use some editors directly + - S7183701: [TEST] closed/java/beans/security/TestClassFinder.java - compilation failed + - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE + - S7188168: 7071904 broke the DEBUG_BINARIES option on Linux + - S7190813: (launcher) RPATH needs to have additional paths + +New in release 2.3.2 (2012-08-31): + +* Security fixes + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder + - S7194567, CVE-2012-3136: Improve long term persistence of java.beans objects + - S7163201, CVE-2012-0547: Simplify toolkit internals references +* OpenJDK + - Fix Zero FTBFS issues with 2.3 + - S7180036: Build failure in Mac platform caused by fix # 7163201 + - S7182135: Impossible to use some editors directly + - S7183701: [TEST] closed/java/beans/security/TestClassFinder.java - compilation failed + - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE +* Bug fixes + - PR1149: Zero-specific patch files not being packaged + +New in release 2.3.1 (2012-08-29): + +* Security fixes + - RH852051, CVE-2012-4681, S7162473: Reintroduce PackageAccessible checks removed in 6788531. * Bug fixes - PR902: PulseAudioClip getMicrosecondsLength() returns length in milliseconds, not microseconds - PR986: IcedTea7 fails to build with IcedTea6 CACAO due to low max heap size - PR1050: Stream objects not garbage collected - PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) are actually missing from the boot JDK + - PR1137: Allow JARs to be optionally compressed by setting COMPRESS_JARS +* OpenJDK + - Make dynamic support for GConf work again. - PR1095: Add configure option for -Werror - - PR1137: Allow JARs to be optionally compressed by setting COMPRESS_JARS + - PR1101: Undefined symbols on GNU/Linux SPARC - PR1140: Unnecessary diz files should not be installed - - PR1138: jvisualvm.1 should not be installed in OpenJDK builds + - S7192804, PR1138: Build should not install jvisualvm man page for OpenJDK * JamVM - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) - PPC: Don't use lwsync if it isn't supported @@ -34,6 +90,377 @@ - Add missing REF_TO_OBJs for references passed from JNI, this enable JamVM to run Qt-Jambi +New in release 2.3 (2012-08-15): + +* OpenJDK + - S6310967: SA: jstack -m produce failures in output + - S6346658: (se) Selector briefly spins when asynchronously closing a registered channel [win] + - S6414899: P11Digest should support cloning + - S6888634: test/closed/javax/swing/Popup/TaskbarPositionTest.java fails + - S6893617: JDK 6 CNCtx always uses the default ORB + - S6924259: Remove offset and count fields from java.lang.String + - S6961765: Double byte characters corrupted in DN for LDAP referrals + - S6994562: Swing classes (both JTextArea and JTextField) don't support caret width tuning + - S7013850: Please change the mnemonic assignment system to avoid translation issue + - S7024749: JDK7 b131---a crash in: Java_sun_awt_windows_ThemeReader_isGetThemeTransitionDurationDefined+0x75 + - S7024963: Notepad demo: remove non-translatable resources from Notepad.properties file + - S7024965: Stylepad demo: remove non-translatable resources from Stylepad.properties file + - S7027139: getFirstIndex() does not return the first index that has changed + - S7027300: Unsynchronized HashMap access causes endless loop + - S7043963: AWT workaround missing for Mutter. + - S7049339: AnyBlit is broken with non-rectangular clips. + - S7063674: Wrong results from basic comparisons after calls to Long.bitCount(long) + - S7071826: Avoid benign race condition in initialization of UUID + - S7071907: JDK: Full Debug Symbols + - S7074616: java.lang.management.ManagementFactory.getPlatformManagementInterfaces fails + - S7074853: TransparentRuler demos Readme should mention the correct jar file name + - S7079902: Refine CORBA data models + - S7080109: Dialog.show() lacks doPrivileged() to access system event queue + - S7087428: move client tests out of jdk_misc + - S7090832: Some locale info are not localized for some languages. + - S7092140: Test: java/util/concurrent/locks/Lock/TimedAcquireLeak.java fails on SE-E due to -XX:-UsePerfData + - S7092551: Double-click in TextField sets caret to the beginning + - S7093156: NLS Please change the mnemonic assignment system to avoid translation issue (Swing files) + - S7096436: (sc) SocketChannel.connect fails on Windows 8 when channel configured non-blocking + - S7100140: [macosx] Test closed/javax/sound/sampled/DirectAudio/bug6400879.java is invalid + - S7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris + - S7103665: HeapWord*ParallelScavengeHeap::failed_mem_allocate(unsigned long,bool)+0x97 + - S7103889: (fs) Reduce String concatenation when iterating over directory + - S7104147: the fix for cr6887286 was not appropriate for backporting + - S7105952: Improve finalisation for FileInputStream/FileOutputStream/RandomAccessFile + - S7107063: Fork hs22.1 hsx from hs22.0 for 7u3 and reinitialize build number + - S7107099: JScrollBar does not show up even if there are enough lebgth of textstring in textField + - S7110104: It should be possible to stop and start JMX Agent at runtime + - S7110396: Sound code fails to build with gcc 4.6 on multiarch Linux systems + - S7110720: Issue with vm config file loadingIssue with vm config file loading + - S7112115: Component.getLocationOnScreen() work incorrectly if create window in point (0, 0) on oel + - S7112427: The doclet needs to be able to generate JavaFX documentation. + - S7113740: hotspot_version file has wrong JDK_MINOR_VER + - S7116462: Bump the hs21.1 build number to 02 + - S7118100: (prefs) Inconsistency when using system and user preference on OSX Lion + - S7118280: The gbyc00102 JCK7 test causes an assert in JVM 7.0 fastdebug mode + - S7118373: (se) Potential leak file descriptor when deregistrating at around the same time as an async close + - S7120481: storeStore barrier in constructor with final field + - S7120895: FontConfiguration should not use thread contextClassLoader + - S7122740: PropertyDescriptor Performance Slow + - S7123170: JCK vm/jvmti/ResourceExhausted/resexh001/resexh00101/ tests fails since 7u4 b02 + - S7123582: (launcher) display the -version and -XshowSettings + - S7123896: Unexpected behavior due to Solaris using separate IPv4 and IPv6 port spaces + - S7123957: Switch of Gnome theme ends up deadlocked in GTKEngine.native_switch_theme + - S7124210: [macosx] Replacing text in a TextField does generate an extra TextEvent + - S7124219: [macosx] Unable to draw images to fullscreen + - S7124239: [macosx] sun.awt.SunToolkit.InfiniteLoop exception in realSync called from SwingTestHelper + - S7124247: [macosx] Implement GraphicsDevice.setDisplayMode() + - S7124262: [macosx] Drag events go to a wrong child. + - S7124286: [macosx] Option modifier should work like AltGr as in Apple jdk 6 + - S7124321: [macosx] TrayIcon MouseListener is never triggered + - S7124326: [macosx] An issue similar to autoshutdown one in two AppContexts situation. + - S7124328: [macosx] javax.swing.JDesktopPane.getAllFramesInLayer returns unexpected value + - S7124376: [macosx] Modal dialog lost focus + - S7124400: [macosx] CGraphicsDevice.getConfigurations() returns reference to member (does not copy configs) + - S7124411: [macosx] There's no KEY_TYPED for VK_ESCAPE + - S7124428: [macosx] Frame.setExtendedState() doesn't work for undecorated windows + - S7124523: [macosx] b216: Mising part of applet UI + - S7124537: [macosx] Menu shortcuts for all menu items should be disabled if a menu itself is disabled + - S7124551: [macosx] Once added, Menu shortcut cannot be removed + - S7125044: [macosx] Test failure because Component.transferFocus() works differently in applet and application + - S7126277: Alternative String hashing implementation + - S7127235: (fs) NPE in Files.walkFileTree if cached attributes are GC'ed + - S7128699: Change the bundle name so it won't be overwritten when installing a new version + - S7128738: dragged dialog freezes system on dispose + - S7129401: PPC: runtime/7100935/TestShortArraycopy.java fails + - S7129715: MAC: SIGBUS in nsk stress test + - S7129872: test/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh failing on non-Solaris platforms on 7u4 + - S7130241: [macosx] TransparentRuler demo can not run due to lacking of perpixel transparency support + - S7130404: [macosx] "os.arch" value should be "x86_64" for compatibility with Apple JDK6 + - S7130521: [macosx] closed/javax/swing/JMenuItem/6209975/bug6209975.java failed on macosx + - S7131021: [macosx] Consider using system properties to pass arguments from the launcher to AWT/SplashScreen + - S7132070: Use a mach_port_t as the OSThread thread_id rather than pthread_t on BSD/OSX + - S7132692: [macosx] Class com.apple.eawt not functioning + - S7132793: [macosx] setWheelScrollEnabled action reversed + - S7132808: [macosx] closed/javax/swing/JFileChooser/4524490/bug4524490.java fails on MacOS + - S7133138: Improve io performance around timezone lookups + - S7133566: [macosx] closed/javax/swing/JTable/4220171/bug4220171.java fails on MacOS + - S7133571: [macosx] closed/javax/swing/JToolBar/4247996/bug4247996.java fails on MacOS + - S7133573: [macosx] closed/javax/swing/JToolTip/4846413/bug4846413.java fails on MacOS + - S7133581: [macosx] closed/javax/swing/JTree/4330357/bug4330357.java fails on MacOS + - S7134701: [macosx] Support legacy native library names + - S7136506: FDS: rework jdk repo Full Debug Symbols support + - S7141141: Add 3 new test scenarios for testing Main-Class attribute in jar manifest file + - S7142091: [macosx] RFE: Refactoring of peer initialization/disposing + - S7142172: Custom TrustManagers that return null for getAcceptedIssuers will NPE + - S7142641: -Xshared:on fails on ARM + - S7142847: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java has incorrect @run tag, runs Basic + - S7143353: -Xrunhprof fails in Java 7 due to bad switch + - S7143606: File.createTempFile should be improved for temporary files created by the platform. + - S7143614: SynthLookAndFeel stability improvement + - S7143617: Improve fontmanager layout lookup operations + - S7143744: (se) Stabilize KQueue SelectorProvider and make default on MacOSX + - S7143851: Improve IIOP stub and tie generation in RMIC + - S7143872: Improve certificate extension processing + - S7144063: [macosx] Swing JMenu mnemonic doesn't work; hint misleading; cross symbol typed + - S7144086: TEST_BUG: java/nio/file/WatchService/SensitivityModifier.java failing intermittently + - S7144328: Improper commandlines for -XX:+-UnlockCommercialFeatures require proper warning/error messages + - S7144423: StAX EventReader swallows the cause of error + - S7144488: Infinite recursion for some equals tests in Collections + - S7144530: KeyTab.getInstance(String) no longer handles keyTabNames with "file:" prefix + - S7144542: [macosx] Crash in liblwawt.dylib setBusy() when exiting an FX app + - S7145024: Crashes in ucrypto related to C2 + - S7145239: Finetune package definition restriction + - S7145768: [macosx] Regression: failure in b11 of ModalDialogInFocusEventTest + - S7145771: [macosx] CreateFont/Register.java test fails because of cached results of getAllFonts() + - S7145798: System.loadLibrary does not search current working directory + - S7145827: [macosx] JCK failure in b11: FocusableWindow3 + - S7145980: Dispose method of window.java takes long + - S7146099: NLS: [de,es,it,ko,pt_BR]launcher_**.properties, double backslash issue. + - S7146131: [macosx] When click the show optionpane button,it display partly of dialog and hung until timeout + - S7146431: java.security files out-of-sync + - S7146442: assert(false) failed: bad AD file + - S7146550: [macosx] DnD test failure in createCompatibleWritableRaster() + - S7146564: DefaultProxySelector should filter 0.0.0.0 and ::0 [macosx] + - S7146728: Inconsistent length for the generated secret using DH key agreement impl from SunJCE and PKCS11 + - S7147055: [macosx] Cursors are changing over a blocked window; also blinking + - S7147066: [macosx] FileDialog.getDirectory() returns incorrect directory + - S7147078: [macosx] Echo char set in TextField doesn't prevent word jumping + - S7147407: remove never used debug code in DnsClient.java + - S7147666: High lock time for com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory.getInstance() + - S7147724: G1: hang in SurrogateLockerThread::manipulatePLL + - S7147848: com.sun.management.UnixOperatingSystem uses hardcoded dummy values [macosx] + - S7148143: PropertyChangeSupport.addPropertyChangeListener can throw ClassCastException + - S7148242: Regression: valid code rejected during generic type well-formedness check + - S7148275: [macosx] setIconImages() not working correctly (distorted icon when minimized) + - S7148281: [macosx] JTabbedPane tabs with HTML text do not render correctly + - S7148289: [macosx] Deadlock in sun.lwawt.macosx.CWrapper$NSScreen.visibleFrame + - S7148556: Implementing a generic interface causes a public clone() to become inaccessible + - S7148584: Jar tools fails to generate manifest correctly when boundary condition hit + - S7148663: new hotspot build - hs23-b17 + - S7148921: More ProblemList updates (2/2012) + - S7149005: [macosx] Java Control Panel's UI controls are distorted when draging scroll bar. + - S7149005: [macosx] Orphaned Choice popup window + - S7149062: [macosx] dock menu don't show available frames + - S7149085: [macosx] Quit with QuitStrategy CLOSE_ALL_WINDOWS does terminate application + - S7149320: Move sun.misc.VM.booted() to the end of System.initializeSystemClass() + - S7149608: Default TZ detection fails on linux when symbolic links to non default location used. + - S7149785: Minor corrections to ScriptEngineManager javadoc + - S7149913: [macosx] Deadlock in LWTextComponentPeer + - S7150051: incorrect oopmap in critical native + - S7150089: [macosx] Default for a custom cursor created from non-existent image is not transparent + - S7150105: [macosx] four scroll-buttons don't display. scroll-sliders cursors are TextCursor + - S7150322: Stop using drop source bundles in jaxws + - S7150326: new hotspot build - hs23-b18 + - S7150345: [macosx] Can't type into applets + - S7150349: [macosx] Applets attempting to show popup menus activate the applet process + - S7150390: JFR test crashed on assert(_jni_lock_count == count) failed: must be equal + - S7150392: Linux build breaks with GCC 4.7 due to unrecognized option + - S7150454: add release jdk7u4 to jprt.properties + - S7150516: [macosx] appletviewer shouldn't link against libX11 on the Mac + - S7150637: No newline emitted after XML decl in XSLT output + - S7151070: NullPointerException in Resolve.isAccessible + - S7151118: Regressions on 7u4 b11 comp. 7u4 b06 on specjvm2008.xml.transform subbenchmark + - S7151484: NullPointerException caused by a bug in XMLDocumentFragmentScannerImpl + - S7151573: Fork hs23.1 hsx from hs23.0 for 7u5 and reinitialize build number + - S7152564: Improve CodeSource.matchLocation(CodeSource) performance + - S7152608: [macosx] Crash in liblwawt.dylib in AccelGlyphCache_RemoveCellInfo + - S7152690: Initialization error with charset SJIS_0213 when security manager is enabled + - S7152784: new hotspot build - hs23-b19 + - S7152800: All tests using the attach API fail with "well-known file is not secure" on Mac OS X + - S7152811: Issues in client compiler + - S7152952: [macosx] List rows overlap with enlarged font + - S7152954: G1: Native memory leak during full GCs + - S7153184: NullPointerException when calling SSLEngineImpl.getSupportedCipherSuites + - S7153693: Three 2D_ImageIO tests failed due ImageFormatException on OEL 6.* Unbreakable Kernel x64 + - S7153735: [macosx] Text with diacritics is pasted with broken encoding + - S7153977: Generate English man pages for JDK 7u4 + - S7154047: [macosx] When we choose print one page in the print dialog,it still prints all the pages. + - S7154048: [macosx] At least drag twice, the toolbar can be dragged to the left side. + - S7154062: [macosx] Mouse cursor isn't updated in applets + - S7154072: [macosx] swallowing key events + - S7154088: [macosx] Regression: Component.createImage do not inherits component attributes + - S7154130: Add Mac OS X Instructions to README-builds.html + - S7154177: [macosx] An invisible owner frame becomes visible upon clicking a child window + - S7154333: JVM fails to start if -XX:+AggressiveHeap is set + - S7154480: [macosx] Not all popup menu items are visible + - S7154505: [macosx] NetBeans sometimes starts with no text rendered + - S7154516: [macosx] Popup menus have no visible borders + - S7154677: new hotspot build - hs23-b20 + - S7154724: jdk7u4 test properties missing from jprt.properties + - S7154758: NLS: 7u4 message drop 20 + - S7154770: NLS: 7u4 man page update + - S7154809: JDI: update JDI/JDB debugee commandline option parsing + - S7154822: forward port fix for Bug 13645891 to JDK8 jcmd (1024 byte file size limit issue) + - S7155051: DNS provider may return incorrect results + - S7155419: Remove reference to JRockit and commercial features from java man page + - S7155453: [macosx] re-enable jbb tests in JPRT + - S7155757: make jdk7u4 the default jprt release for hs23 + - S7156000: Change makefile to reflect refactored classes + - S7156191: [macosx] Can't type into applet demos in Pivot + - S7156194: [macosx] Can't type non-ASCII characters into applets + - S7156657: Version 7 doesn't support translucent popup menus against a translucent window + - S7156729: PPC: R_PPC_REL24 relocation error related to some libraries built without -fPIC + - S7156831: The jcmd man page is not included in generated bundles + - S7156842: test/java/util/zip/ZipFile/vmcrash.zip triggers McAffe virus warning + - S7156960: Incorrect copyright headers in parts of the Serviceability agent + - S7156963: Incorrect copyright header in java/io/SerialCallbackContext + - S7157141: crash in 64 bit with corrupted oops + - S7157296: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect OPT builds + - S7157365: jruby/bench.bench_timeout crashes with JVM internal error + - S7157608: One feature is not recognized. + - S7157609: Issues with loop + - S7157610: NullPointerException occurs when parsing XML doc + - S7157659: [macosx] Landscape Printing orientation doesn't work + - S7157855: jvisualvm.1 not included in binaries + - S7157903: JSSE client sockets are very slow + - S7158067: FDS: ENABLE_FULL_DEBUG_SYMBOLS flag should only affect product builds + - S7158116: Bump the hs23.1 build number to b02 + - S7158135: new hotspot build - hs23-b21 + - S7158366: [macosx] Print-to-file dialog doesn't have an entry field for a name + - S7158457: division by zero in adaptiveweightedaverage + - S7158483: (tz) Support tzdata2012c + - S7158712: Synth Property "ComboBox.popupInsets" is ignored + - S7158800: Improve storage of symbol tables + - S7158928: [macosx] NLS: Please change the mnemonic assignment system + - S7159016: Static import of member in processor-generated class fails in JDK 7 + - S7159266: [macosx] ApplicationDelegate should not be set in the headless mode + - S7159320: change default ZIP_DEBUGINFO_FILES back to '1' after fix for 7133529 is available + - S7159381: [macosx] Dock Icon defaults to Generic Java Application Category + - S7159766: Tiered compilation causes performance regressions + - S7160293: [macosx] FileDialog appears on secondary display + - S7160539: JDeveloper crashes on 64-bit Windows + - S7160623: [macosx] Editable TextArea/TextField are blocking GUI applications from exit + - S7160677: missing else in fix for 7152811 + - S7160757: Problem with hotspot/runtime_classfile + - S7160895: tools/launcher/VersionCheck.java attempts to launch .debuginfo + - S7161105: unused classes in jdk7u repository + - S7161766: [macosx] javax/swing/JPopupMenu/6694823/bug6694823.java failed on Mac OS X + - S7161881: (dc) DatagramChannel.bind(null) fails if IPv4 socket and running with preferIPv6Addresses=true + - S7162043: Add headless mode tests to problem list [macosx] + - S7162144: Missing AWT thread in headless mode in 7u4 b06 + - S7162440: Fix typo in BUNDLE_ID-related macro names + - S7162440: Fix typo in BUNDLE_ID variable so it can be overridden + - S7162440: Fix typo in macro so BUNDLE_ID can be overridden + - S7162902: Umbrella port of a number of corba bug fixes from JDK 6 to jdk7u/8 + - S7163117: Agent can't connect to process on Mac OSX + - S7163470: Licensee source bundle build failed with CipherSpi not found (7u4) + - S7163471: Licensee source bundle failed around 7u4 + - S7163524: Add SecTaskAccess attribute to jstack [macosx] + - S7163621: Bump the hs23.1 build number to b03 + - S7164344: enabling ZIP_DEBUGINFO_FILES causes unexpected test failures on Solaris and Windows + - S7165060: dtrace tests fail with FDS debug info files + - S7165257: Add JFR tests to the JDK code base + - S7165598: enable FDS on Solaris X64 when 7165593 is fixed + - S7165628: Issues with java.lang.invoke.MethodHandles.Lookup + - S7165725: JAVA6 HTML PARSER CANNOT PARSE MULTIPLE SCRIPT TAGS IN A LINE CORRECTLY + - S7165755: OS Information much longer on linux than other platforms + - S7166437: [macosx] Support for Window.Type.UTILITY on the Mac + - S7166498: JVM crash in ClassVerifier + - S7166570: JSSE certificate validation has started to fail for certificate chains + - S7166687: InetAddress.getLocalHost().getHostName() returns FQDN + - S7166956: Integrate the Java Access Bridge with Java Runtime + - S7167028: new hotspot build - hs23.2-b01 + - S7167142: Consider a warning when finding a .hotspotrc or .hotspot_compiler file that isn't used + - S7167157: jcmd command file parsing does not respect the "stop" command + - S7167254: Crash on OSX in Enumerator.nextElement() with compressed oops + - S7167266: missing copyright notes in 3rd party code + - S7167359: (tz) SEGV on solaris if TZ variable not set + - S7167406: (Zero) Fix for InvokeDynamic needed + - S7167625: Adjustments for SE-Embedded build process + - S7168098: Adjustments for SE-Embedded build process + - S7168110: Misleading jstack error message + - S7168191: Signature validation can fail under certain circumstances + - S7168249: new hotspot build - hs23.2-b02 + - S7168374: Upgrade of XML components to JAXB 2.2.4-2, SAAJ 1.3.16, JAXWS 2.2.4-1 + - S7168505: (bf) MappedByteBuffer.load does not load buffer's content into memory + - S7168520: No jdk8 TL Nightly linux builds due to broken link in b39-2012-05-13_231 + - S7168550: [macosx] duplicate OGL context state changes related to vertex cache + - S7169050: (se) Selector.select slow on Solaris due to insertion of POLLREMOVE and 0 events + - S7169111: Unreadable menu bar with Ambiance theme in GTK L&F + - S7169226: NLS: Please change the mnemonic assignment system for windows and motif properties + - S7169782: C2: SIGSEGV in LShiftLNode::Ideal(PhaseGVN*, bool) + - S7170009: new hotspot build - hs23.2-b03 + - S7170145: C1 doesn't respect the JMM with volatile field loads + - S7170169: (props) System.getProperty("os.name") should return "Windows 8" when run on Windows 8 + - S7170197: Update JPRT default build targets to support embedded builds + - S7170203: TEST_BUG: test/java/nio/MappedByteBuffer/Truncate.java failing intermittently + - S7170275: os::print_os_info needs to know about Windows 8 + - S7170449: Management is completely broken at least on Solaris 11 X86 + - S7170657: [macosx] There seems to be no keyboard/mouse action to select non-contiguous items in List + - S7170716: JVM crash when opening an AWT app from a registered file. + - S7171163: [macosx] Shortcomings in the design of the secondary native event loop made JavaFX DnD deadlock + - S7171223: Building ExtensionSubtables.cpp should use -fno-strict-aliasing + - S7171653: 32-bit cross-compile on 64-bit build host generates 64-bit data for awt/X11 leading to crash + - S7171703: JNI DefineClass crashes client VM when first parameter is NULL + - S7171852: new hotspot build - hs23.2-b04 + - S7172430: [macosx] debug message in non debug jdk build + - S7172552: jabswitch utility should not request elevated privilege on the system + - S7172708: 32/64 bit type issues on Windows after Mac OS X port + - S7172722: Latest jdk7u from OSX broke universal build + - S7173329: Fix build broken by 7126277 to jdk7u-dev + - S7173432: Handle null key at HashMap resize + - S7173436: new hotspot build - hs23.2-b05 + - S7173487: [macosx] Problems with popup menus, tooltips and dialog boxes in dual monitor setup + - S7173515: (se) Selector.open fails with OOME on Solaris when unlimited file descriptors + - S7173635: jprt.properties should include release jdk7u6 + - S7173645: (props) System.getProperty("os.name") should return "Windows Server 2012" for Windows Server 2012 + - S7173918: set alternative string hashing threshold. + - S7174244: NPE in Krb5ProxyImpl.getServerKeys() + - S7174363: Arrays.copyOfRange leads to VM crash with -Xcomp -server if executed by testing framework + - S7174510: 19 JCK compiler tests fail with C2 error: memNode.cpp:812 - ShouldNotReachHere + - S7174645: Could not enable access bridge + - S7174704: [macosx] New issue in 7u6 b12: HeadlessPrintingTest failure + - S7174718: [macosx] Regression in 7u6 b12: PopupFactory leaks DefaultFrames. + - S7174736: JCK test api/java_util/HashMap/index_EntrySet failing + - S7174861: all/OPT jdk build on Solaris with FDS enabled sets wrong options + - S7174928: JSR 292: unresolved invokedynamic call sites deopt and osr infinitely + - S7174970: NLS [ccjk] Extra mnemonic keys at standard filechooserdialog (open and save) in metal L&F + - S7175133: jinfo failed to get system properties after 6924259 + - S7175255: symlinks are wrong, which caused jdk8-promote-2 to fail (client/64/64 directories in debuginfo zips) + - S7175331: Remove FDS files from embedded JRE images + - S7175367: NLS: 7u6 message drop10 integration + - S7175516: new hotspot build - hs23.2-b06 + - S7175758: Improve unit test of Map iterators and Iterator.remove() + - S7175802: Missing jdk_jfr in top-level make file + - S7175845: "jar uf" changes file permissions unexpectedly + - S7176630: (sc) SocketChannel.write does not write more than 128k when channel configured blocking [win] + - S7176784: Windows authentication not working on some computers + - S7176894: back out LocaleNames_xx.properties files from 7u6 message drop10 + - S7177128: SA cannot get correct system properties after 7126277 + - S7177144: [macosx] Drag and drop not working (regression in 7u6) + - S7177173: [macosx] JFrame.setExtendedState(JFrame.MAXIMIZED_BOTH) not working as expected in JDK 7 + - S7177216: native2ascii changes file permissions of input file + - S7177365: new hotspot build - hs23.2-b07 + - S7177617: TEST_BUG: java/nio/channels/AsyncCloseAndInterrupt.java failing (win) + - S7177701: error: Filling jar message during javax/imageio/metadata/IIOMetadataFormatImpl compilation + - S7178079: REGRESSION: Some AWT Drag-n-Drop tests fail since JDK 7u6 b13 + - S7178113: build environment change + - S7178483: Change version string for Embedded releases + - S7178548: Hashtable alternative hashing threshold default ignored + - S7178670: runtime/7158800/BadUtf8.java fails in SymbolTable::rehash_table + - S7179138: Incorrect result with String concatenation optimization + - S7179194: new hotspot build - hs23.2-b08 + - S7179349: [macosx] Java processes on Mac should not use default Apple icon + - S7179759: ENV: Nightly fails during jdk copiyng for solaris platforms after FDS unzipping + - S7180240: Disable alternative string hashing by default + - S7180621: Hashtable has incorrect alternative hashing threshold default value + - S7180884: new hotspot build - hs23.2-b09 + - S7180907: Jarsigner -verify fails if rsa file used sha-256 with authenticated attributes + - S7181027: [macosx] Unable to use headless mode + - S7181200: JVM new hashing code breaks SA in product mode + - S7182135: Impossible to use some editors directly + - S7182226: NLS: jdk7u6 message drop20 integration + - S7182500: OCSP revocation checking fails if OCSP responce does not contain certificates + - S7182902: [macosx] Test api/java_awt/GraphicsDevice/indexTGF.html#SetDisplayMode fails on Mac OS X 10.7 + - S7182971: Need to include documentation content for JCMD man page + - S7183209: Backout 7105952 changes for jdk7u + - S7183251: Netbeans editor renders text wrong on JDK 7u6 build + - S7183292: HttpURLConnection.getHeaderFields() throws IllegalArgumentException: Illegal cookie name + - S7184145: (pack200) pack200 --repack throws NullPointerException when JAR file specified without path + - S7184401: JDk7u6 : Missing main menu bar in Netbeans after fix for 7162144 + - S7184845: Apps6: menu tree bean in form throws npe in jre 7 while closing + - S7184951: [macosx] Exception at java.awt.datatransfer on headless mode (only in GUI session) + - S7185512: The printout doesn't match image on screen. + - S7188168: 7071904 broke the DEBUG_BINARIES option on Linux + - S7190813: (launcher) RPATH needs to have additional paths + New in release 2.2.1 (2012-06-12): * Security fixes From andrew at icedtea.classpath.org Mon Sep 3 06:17:13 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 13:17:13 +0000 Subject: /hg/release/icedtea6-1.10: Prepare for 1.10.10. Message-ID: changeset 392687831ddb in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=392687831ddb author: Andrew John Hughes date: Mon Sep 03 14:16:38 2012 +0100 Prepare for 1.10.10. 2011-09-03 Andrew John Hughes * configure.ac: Bump to 1.10.10pre. * NEWS: Add new section. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r 3e99cfa5acbf -r 392687831ddb ChangeLog --- a/ChangeLog Fri Aug 31 20:06:44 2012 +0100 +++ b/ChangeLog Mon Sep 03 14:16:38 2012 +0100 @@ -1,3 +1,8 @@ +2011-09-03 Andrew John Hughes + + * configure.ac: Bump to 1.10.10pre. + * NEWS: Add new section. + 2012-08-31 Andrew John Hughes * Makefile.am: diff -r 3e99cfa5acbf -r 392687831ddb NEWS --- a/NEWS Fri Aug 31 20:06:44 2012 +0100 +++ b/NEWS Mon Sep 03 14:16:38 2012 +0100 @@ -9,6 +9,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 1.10.10 (2012-XX-XX): + New in release 1.10.9 (2012-08-31): * Security fixes diff -r 3e99cfa5acbf -r 392687831ddb configure.ac --- a/configure.ac Fri Aug 31 20:06:44 2012 +0100 +++ b/configure.ac Mon Sep 03 14:16:38 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea6],[1.10.9],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.10.10pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Mon Sep 3 06:18:42 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 13:18:42 +0000 Subject: /hg/release/icedtea6-1.11: Prepare for 1.11.5. Message-ID: changeset 1b067fbe251c in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=1b067fbe251c author: Andrew John Hughes date: Mon Sep 03 14:18:35 2012 +0100 Prepare for 1.11.5. 2011-09-03 Andrew John Hughes * configure.ac: Bump to 1.11.5pre. * NEWS: Add new section. diffstat: ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- 3 files changed, 8 insertions(+), 1 deletions(-) diffs (33 lines): diff -r 7b9660e0dee0 -r 1b067fbe251c ChangeLog --- a/ChangeLog Fri Aug 31 17:08:30 2012 +0100 +++ b/ChangeLog Mon Sep 03 14:18:35 2012 +0100 @@ -1,3 +1,8 @@ +2011-09-03 Andrew John Hughes + + * configure.ac: Bump to 1.11.5pre. + * NEWS: Add new section. + 2012-08-31 Andrew John Hughes * NEWS: Set 1.11.4 release date. diff -r 7b9660e0dee0 -r 1b067fbe251c NEWS --- a/NEWS Fri Aug 31 17:08:30 2012 +0100 +++ b/NEWS Mon Sep 03 14:18:35 2012 +0100 @@ -10,6 +10,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release 1.11.5 (2012-XX-XX): + New in release 1.11.4 (2012-08-31): * Security fixes diff -r 7b9660e0dee0 -r 1b067fbe251c configure.ac --- a/configure.ac Fri Aug 31 17:08:30 2012 +0100 +++ b/configure.ac Mon Sep 03 14:18:35 2012 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea6],[1.11.4],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.11.5pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Mon Sep 3 06:30:53 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 03 Sep 2012 13:30:53 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 5c199bcdebc8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5c199bcdebc8 author: Andrew John Hughes date: Fri Aug 31 15:26:08 2012 +0100 Add more meaningful names for hugepages patches, based on upstream summary. 2012-08-31 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Rename patches. * patches/openjdk/7034464-hugepage.patch: Renamed to... * patches/openjdk/7034464-transparent_huge_pages.patch: this. * patches/openjdk/7037939-hugepage.patch: Renamed to... * patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch this. changeset db084058f69b in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=db084058f69b author: Andrew John Hughes date: Mon Sep 03 14:30:48 2012 +0100 Add 1.10.9 & 1.11.4 to NEWS. 2012-09-03 Andrew John Hughes * NEWS: Add 1.10.9 & 1.11.4. diffstat: ChangeLog | 17 + Makefile.am | 4 +- NEWS | 21 + patches/openjdk/7034464-hugepage.patch | 458 ---------- patches/openjdk/7034464-transparent_huge_pages.patch | 458 ++++++++++ patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch | 71 + patches/openjdk/7037939-hugepage.patch | 71 - 7 files changed, 569 insertions(+), 531 deletions(-) diffs (truncated from 1143 to 500 lines): diff -r 0e0ec12a88e3 -r db084058f69b ChangeLog --- a/ChangeLog Fri Aug 31 15:21:42 2012 +0100 +++ b/ChangeLog Mon Sep 03 14:30:48 2012 +0100 @@ -1,3 +1,20 @@ +2012-09-03 Andrew John Hughes + + * NEWS: Add 1.10.9 & 1.11.4. + +2012-08-31 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_PATCHES): Rename patches. + * patches/openjdk/7034464-hugepage.patch: + Renamed to... + * patches/openjdk/7034464-transparent_huge_pages.patch: + this. + * patches/openjdk/7037939-hugepage.patch: + Renamed to... + * patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch + this. + 2012-08-31 Andrew John Hughes * Makefile.am: diff -r 0e0ec12a88e3 -r db084058f69b Makefile.am --- a/Makefile.am Fri Aug 31 15:21:42 2012 +0100 +++ b/Makefile.am Mon Sep 03 14:30:48 2012 +0100 @@ -349,8 +349,8 @@ patches/openjdk/6986968-crash_on_xim_restart.patch \ patches/openjdk/7036754-stroker-nan.patch \ patches/openjdk/pgram-pipe-regression.patch \ - patches/openjdk/7034464-hugepage.patch \ - patches/openjdk/7037939-hugepage.patch \ + patches/openjdk/7034464-transparent_huge_pages.patch + patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch \ patches/openjdk/7043564-hugepage.patch \ patches/openjdk/mutter.patch \ patches/fonts-rhel-version.patch \ diff -r 0e0ec12a88e3 -r db084058f69b NEWS --- a/NEWS Fri Aug 31 15:21:42 2012 +0100 +++ b/NEWS Mon Sep 03 14:30:48 2012 +0100 @@ -34,6 +34,27 @@ - Add missing REF_TO_OBJs for references passed from JNI, this enable JamVM to run Qt-Jambi +New in release 1.11.4 (2012-08-31): + +* Security fixes + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder + - S7163201, CVE-2012-0547: Simplify toolkit internals references +* OpenJDK + - S7182135: Impossible to use some editors directly + - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE + +New in release 1.10.9 (2012-08-31): + +* Security fixes + - S7162476, CVE-2012-1682: XMLDecoder security issue via ClassFinder + - S7163201, CVE-2012-0547: Simplify toolkit internals references +* OpenJDK + - S7182135: Impossible to use some editors directly + - S7185678: java/awt/Menu/NullMenuLabelTest/NullMenuLabelTest.java failed with NPE + - S6815182: GSSAPI/SPNEGO does not work with server using MIT Kerberos library + - S6979329: CCacheInputStream fails to read ticket cache files from Kerberos 1.8.1 + - S7110373: krb5 test in openjdk6 without test infrastructure + New in release 1.11.3 (2012-06-12): * Security fixes diff -r 0e0ec12a88e3 -r db084058f69b patches/openjdk/7034464-hugepage.patch --- a/patches/openjdk/7034464-hugepage.patch Fri Aug 31 15:21:42 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,458 +0,0 @@ -# HG changeset patch -# User iveresov -# Date 1303344724 25200 -# Node ID 139667d9836ae218ab06a74d5813a5a700a076c9 -# Parent 49a67202bc671d23d719c9e14752d80295a9e8f6 -7034464: Support transparent large pages on Linux -Summary: Support transparent huge pages on Linux available since 2.6.38 -Reviewed-by: iveresov, ysr -Contributed-by: aph at redhat.com -diff -u -r openjdk.patched/hotspot/src/os/linux/vm/globals_linux.hpp openjdk/hotspot/src/os/linux/vm/globals_linux.hpp ---- openjdk.patched/hotspot/src/os/linux/vm/globals_linux.hpp 2011-03-16 02:30:16.000000000 +0000 -+++ openjdk/hotspot/src/os/linux/vm/globals_linux.hpp 2011-05-04 11:57:15.083470027 +0100 -@@ -29,13 +29,19 @@ - // Defines Linux specific flags. They are not available on other platforms. - // - #define RUNTIME_OS_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct) \ -- product(bool, UseOprofile, false, \ -- "enable support for Oprofile profiler") \ -- \ -- product(bool, UseLinuxPosixThreadCPUClocks, true, \ -- "enable fast Linux Posix clocks where available") --// NB: The default value of UseLinuxPosixThreadCPUClocks may be --// overridden in Arguments::parse_each_vm_init_arg. -+ product(bool, UseOprofile, false, \ -+ "enable support for Oprofile profiler") \ -+ \ -+ product(bool, UseLinuxPosixThreadCPUClocks, true, \ -+ "enable fast Linux Posix clocks where available") \ -+/* NB: The default value of UseLinuxPosixThreadCPUClocks may be \ -+ overridden in Arguments::parse_each_vm_init_arg. */ \ -+ \ -+ product(bool, UseHugeTLBFS, false, \ -+ "Use MAP_HUGETLB for large pages") \ -+ \ -+ product(bool, UseSHM, false, \ -+ "Use SYSV shared memory for large pages") - - // - // Defines Linux-specific default values. The flags are available on all -diff -u -r openjdk.patched/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp ---- openjdk.patched/hotspot/src/os/linux/vm/os_linux.cpp 2011-05-03 14:32:54.285722656 +0100 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2011-05-09 14:31:51.358502774 +0100 -@@ -2495,16 +2495,40 @@ - return res != (uintptr_t) MAP_FAILED; - } - -+// Define MAP_HUGETLB here so we can build HotSpot on old systems. -+#ifndef MAP_HUGETLB -+#define MAP_HUGETLB 0x40000 -+#endif -+ -+// Define MADV_HUGEPAGE here so we can build HotSpot on old systems. -+#ifndef MADV_HUGEPAGE -+#define MADV_HUGEPAGE 14 -+#endif -+ - bool os::commit_memory(char* addr, size_t size, size_t alignment_hint, - bool exec) { -+ if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { -+ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; -+ uintptr_t res = -+ (uintptr_t) ::mmap(addr, size, prot, -+ MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_HUGETLB, -+ -1, 0); -+ return res != (uintptr_t) MAP_FAILED; -+ } -+ - return commit_memory(addr, size, exec); - } - --void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { } -+void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { -+ if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { -+ // We don't check the return value: madvise(MADV_HUGEPAGE) may not -+ // be supported or the memory may already be backed by huge pages. -+ ::madvise(addr, bytes, MADV_HUGEPAGE); -+ } -+} - - void os::free_memory(char *addr, size_t bytes) { -- ::mmap(addr, bytes, PROT_READ | PROT_WRITE, -- MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); -+ ::madvise(addr, bytes, MADV_DONTNEED); - } - - void os::numa_make_global(char *addr, size_t bytes) { -@@ -2870,7 +2894,16 @@ - static size_t _large_page_size = 0; - - bool os::large_page_init() { -- if (!UseLargePages) return false; -+ if (!UseLargePages) { -+ UseHugeTLBFS = false; -+ UseSHM = false; -+ return false; -+ } -+ -+ if (FLAG_IS_DEFAULT(UseHugeTLBFS) && FLAG_IS_DEFAULT(UseSHM)) { -+ // Our user has not expressed a preference, so we'll try both. -+ UseHugeTLBFS = UseSHM = true; -+ } - - if (LargePageSizeInBytes) { - _large_page_size = LargePageSizeInBytes; -@@ -2915,6 +2948,9 @@ - } - } - -+ // print a warning if any large page related flag is specified on command line -+ bool warn_on_failure = !FLAG_IS_DEFAULT(UseHugeTLBFS); -+ - const size_t default_page_size = (size_t)Linux::page_size(); - if (_large_page_size > default_page_size) { - _page_sizes[0] = _large_page_size; -@@ -2922,6 +2958,14 @@ - _page_sizes[2] = 0; - } - -+ UseHugeTLBFS = UseHugeTLBFS && -+ Linux::hugetlbfs_sanity_check(warn_on_failure, _large_page_size); -+ -+ if (UseHugeTLBFS) -+ UseSHM = false; -+ -+ UseLargePages = UseHugeTLBFS || UseSHM; -+ - // Large page support is available on 2.6 or newer kernel, some vendors - // (e.g. Redhat) have backported it to their 2.4 based distributions. - // We optimistically assume the support is available. If later it turns out -@@ -2936,7 +2980,7 @@ - char* os::reserve_memory_special(size_t bytes, char* req_addr, bool exec) { - // "exec" is passed in but not used. Creating the shared image for - // the code cache doesn't have an SHM_X executable permission to check. -- assert(UseLargePages, "only for large pages"); -+ assert(UseLargePages && UseSHM, "only for SHM large pages"); - - key_t key = IPC_PRIVATE; - char *addr; -@@ -3003,19 +3047,19 @@ - return _large_page_size; - } - --// Linux does not support anonymous mmap with large page memory. The only way --// to reserve large page memory without file backing is through SysV shared --// memory API. The entire memory region is committed and pinned upfront. --// Hopefully this will change in the future... -+// HugeTLBFS allows application to commit large page memory on demand; -+// with SysV SHM the entire memory region must be allocated as shared -+// memory. - bool os::can_commit_large_page_memory() { -- return false; -+ return UseHugeTLBFS; - } - - bool os::can_execute_large_page_memory() { -- return false; -+ return UseHugeTLBFS; - } - - // Reserve memory at an arbitrary address, only if that area is -+// Reserve memory at an arbitrary address, only if that area is - // available (and not reserved for something else). - - char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) { -@@ -5009,6 +5053,43 @@ - // JSR166 - // ------------------------------------------------------- - -+bool os::Linux::hugetlbfs_sanity_check(bool warn, size_t page_size) { -+ bool result = false; -+ void *p = mmap (NULL, page_size, PROT_READ|PROT_WRITE, -+ MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB, -+ -1, 0); -+ -+ if (p != (void *) -1) { -+ // We don't know if this really is a huge page or not. -+ FILE *fp = fopen("/proc/self/maps", "r"); -+ if (fp) { -+ while (!feof(fp)) { -+ char chars[257]; -+ long x = 0; -+ if (fgets(chars, sizeof(chars), fp)) { -+ if (sscanf(chars, "%lx-%*lx", &x) == 1 -+ && x == (long)p) { -+ if (strstr (chars, "hugepage")) { -+ result = true; -+ break; -+ } -+ } -+ } -+ } -+ fclose(fp); -+ } -+ munmap (p, page_size); -+ if (result) -+ return true; -+ } -+ -+ if (warn) { -+ warning("HugeTLBFS is not supported by the operating system."); -+ } -+ -+ return result; -+} -+ - /* - * The solaris and linux implementations of park/unpark are fairly - * conservative for now, but can be improved. They currently use a -diff -u -r openjdk.patched/hotspot/src/os/linux/vm/os_linux.cpp.orig openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig ---- openjdk.patched/hotspot/src/os/linux/vm/os_linux.cpp.orig 2011-05-03 14:32:53.972649764 +0100 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig 2011-05-04 11:57:15.085470494 +0100 -@@ -117,6 +117,10 @@ - # include - # include - -+#if __x86_64__ -+#include -+#endif -+ - #define MAX_PATH (2 * K) - - // for timer info max values which include all bits -@@ -2491,16 +2495,40 @@ - return res != (uintptr_t) MAP_FAILED; - } - -+// Define MAP_HUGETLB here so we can build HotSpot on old systems. -+#ifndef MAP_HUGETLB -+#define MAP_HUGETLB 0x40000 -+#endif -+ -+// Define MADV_HUGEPAGE here so we can build HotSpot on old systems. -+#ifndef MADV_HUGEPAGE -+#define MADV_HUGEPAGE 14 -+#endif -+ - bool os::commit_memory(char* addr, size_t size, size_t alignment_hint, - bool exec) { -+ if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { -+ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; -+ uintptr_t res = -+ (uintptr_t) ::mmap(addr, size, prot, -+ MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS|MAP_HUGETLB, -+ -1, 0); -+ return res != (uintptr_t) MAP_FAILED; -+ } -+ - return commit_memory(addr, size, exec); - } - --void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { } -+void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { -+ if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { -+ // We don't check the return value: madvise(MADV_HUGEPAGE) may not -+ // be supported or the memory may already be backed by huge pages. -+ ::madvise(addr, bytes, MADV_HUGEPAGE); -+ } -+} - - void os::free_memory(char *addr, size_t bytes) { -- ::mmap(addr, bytes, PROT_READ | PROT_WRITE, -- MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); -+ ::madvise(addr, bytes, MADV_DONTNEED); - } - - void os::numa_make_global(char *addr, size_t bytes) { -@@ -2544,6 +2572,21 @@ - return end; - } - -+static int sched_getcpu_syscall(void) { -+ unsigned int cpu; -+ int retval = -1; -+ -+#if __x86_64__ -+ typedef long (*vgetcpu_t)(unsigned int *cpu, unsigned int *node, unsigned long *tcache); -+ vgetcpu_t vgetcpu = (vgetcpu_t)VSYSCALL_ADDR(__NR_vgetcpu); -+ retval = vgetcpu(&cpu, NULL, NULL); -+#elif __i386__ -+ retval = syscall(SYS_getcpu, &cpu, NULL, NULL); -+#endif -+ -+ return (retval == -1) ? retval : cpu; -+} -+ - extern "C" void numa_warn(int number, char *where, ...) { } - extern "C" void numa_error(char *where) { } - -@@ -2565,6 +2608,10 @@ - set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t, - dlsym(RTLD_DEFAULT, "sched_getcpu"))); - -+ // If it's not, try a direct syscall. -+ if (sched_getcpu() == -1) -+ set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t, (void*)&sched_getcpu_syscall)); -+ - if (sched_getcpu() != -1) { // Does it work? - void *handle = dlopen("libnuma.so.1", RTLD_LAZY); - if (handle != NULL) { -@@ -2847,7 +2894,16 @@ - static size_t _large_page_size = 0; - - bool os::large_page_init() { -- if (!UseLargePages) return false; -+ if (!UseLargePages) { -+ UseHugeTLBFS = false; -+ UseSHM = false; -+ return false; -+ } -+ -+ if (FLAG_IS_DEFAULT(UseHugeTLBFS) && FLAG_IS_DEFAULT(UseSHM)) { -+ // Our user has not expressed a preference, so we'll try both. -+ UseHugeTLBFS = UseSHM = true; -+ } - - if (LargePageSizeInBytes) { - _large_page_size = LargePageSizeInBytes; -@@ -2892,6 +2948,9 @@ - } - } - -+ // print a warning if any large page related flag is specified on command line -+ bool warn_on_failure = !FLAG_IS_DEFAULT(UseHugeTLBFS); -+ - const size_t default_page_size = (size_t)Linux::page_size(); - if (_large_page_size > default_page_size) { - _page_sizes[0] = _large_page_size; -@@ -2899,6 +2958,14 @@ - _page_sizes[2] = 0; - } - -+ UseHugeTLBFS = UseHugeTLBFS && -+ Linux::hugetlbfs_sanity_check(warn_on_failure, _large_page_size); -+ -+ if (UseHugeTLBFS) -+ UseSHM = false; -+ -+ UseLargePages = UseHugeTLBFS || UseSHM; -+ - // Large page support is available on 2.6 or newer kernel, some vendors - // (e.g. Redhat) have backported it to their 2.4 based distributions. - // We optimistically assume the support is available. If later it turns out -@@ -2913,7 +2980,7 @@ - char* os::reserve_memory_special(size_t bytes, char* req_addr, bool exec) { - // "exec" is passed in but not used. Creating the shared image for - // the code cache doesn't have an SHM_X executable permission to check. -- assert(UseLargePages, "only for large pages"); -+ assert(UseLargePages && UseSHM, "only for SHM large pages"); - - key_t key = IPC_PRIVATE; - char *addr; -@@ -2980,19 +3047,19 @@ - return _large_page_size; - } - --// Linux does not support anonymous mmap with large page memory. The only way --// to reserve large page memory without file backing is through SysV shared --// memory API. The entire memory region is committed and pinned upfront. --// Hopefully this will change in the future... -+// HugeTLBFS allows application to commit large page memory on demand; -+// with SysV SHM the entire memory region must be allocated as shared -+// memory. - bool os::can_commit_large_page_memory() { -- return false; -+ return UseHugeTLBFS; - } - - bool os::can_execute_large_page_memory() { -- return false; -+ return UseHugeTLBFS; - } - - // Reserve memory at an arbitrary address, only if that area is -+// Reserve memory at an arbitrary address, only if that area is - // available (and not reserved for something else). - - char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) { -@@ -4081,6 +4148,23 @@ - UseNUMA = false; - } - } -+ // With SHM large pages we cannot uncommit a page, so there's not way -+ // we can make the adaptive lgrp chunk resizing work. If the user specified -+ // both UseNUMA and UseLargePages (or UseSHM) on the command line - warn and -+ // disable adaptive resizing. -+ if (UseNUMA && UseLargePages && UseSHM) { -+ if (!FLAG_IS_DEFAULT(UseNUMA)) { -+ if (FLAG_IS_DEFAULT(UseLargePages) && FLAG_IS_DEFAULT(UseSHM)) { -+ UseLargePages = false; -+ } else { -+ warning("UseNUMA is not fully compatible with SHM large pages, disabling adaptive resizing"); -+ UseAdaptiveSizePolicy = false; -+ UseAdaptiveNUMAChunkSizing = false; -+ } -+ } else { -+ UseNUMA = false; -+ } -+ } - if (!UseNUMA && ForceNUMA) { - UseNUMA = true; - } -@@ -4986,6 +5070,43 @@ - // JSR166 - // ------------------------------------------------------- - -+bool os::Linux::hugetlbfs_sanity_check(bool warn, size_t page_size) { -+ bool result = false; -+ void *p = mmap (NULL, page_size, PROT_READ|PROT_WRITE, -+ MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB, -+ -1, 0); -+ -+ if (p != (void *) -1) { -+ // We don't know if this really is a huge page or not. -+ FILE *fp = fopen("/proc/self/maps", "r"); -+ if (fp) { -+ while (!feof(fp)) { -+ char chars[257]; -+ long x = 0; -+ if (fgets(chars, sizeof(chars), fp)) { -+ if (sscanf(chars, "%lx-%*lx", &x) == 1 -+ && x == (long)p) { -+ if (strstr (chars, "hugepage")) { -+ result = true; -+ break; -+ } -+ } -+<+ } From jvanek at redhat.com Mon Sep 3 08:11:55 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 03 Sep 2012 17:11:55 +0200 Subject: [fyi][icedtea-web] fixed reproducer engine for better reproducing of PR905 Message-ID: <5044C8BB.1030401@redhat.com> I had an flaw in processing of "?" query in test-engine. Here I'm fixing it with enhanced pr905 testcase and other minor clean-ups in engine. this should go to head and 1.3 2012-09-03 Jiri Vanek Fixing several errors which were causing incorrect behaviour causing correct reproduction of PR905 * tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.htm Using different jar for reproducing * tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java Added tests for hardcoded codebase (same and different) enhanced original PR905 reproducers * tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java: added flush for logs * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: cleaned and enhanced getUrl* methods. * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: delegated socket * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: fixed processing of question mark. -------------- next part -------------- A non-text attachment was scrubbed... Name: fixed905Reproducer.patch Type: text/x-patch Size: 12283 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/62cf0144/fixed905Reproducer.patch From jvanek at redhat.com Mon Sep 3 08:12:00 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 03 Sep 2012 17:12:00 +0200 Subject: [rfc][icedtea-web] multiple applets on one page tests Message-ID: <5044C8C0.4030607@redhat.com> This set of tests was ordered by Pavel, so here it is. All test are green :) The most expected one was the one which was testing exit from applet when other was/was not running. 2012-09-03 Jiri Vanek * tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java: Signed applet painting to canvas and periodically printing out counted messages * tests/reproducers/signed2/AppletTestSigned2/srcs/AppletTestSigned2: Second simple signed applet for testing two different simple ones parallel * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1E_x_2s.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_1.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2E.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2e.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2sk.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1e_x_2s.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1k_x_2.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2s.html: * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2ss.html: Various combinations of plain, signed, crashing, exception throwing and exiting applets on single web-page * tests/reproducers/simple/CountingApplet1/srcs/CountingApplet1.java: Simple applet painting to canvas and periodically printing out counted messages * tests/reproducers/simple/CountingApplet1/testcases/ParallelAppletsTest.java: testcases launching above html files. * tests/reproducers/simple/CountingApplet2/srcs/CountingApplet2.java: Second simple applet painting to canvas and periodically printing out counted messages * tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java: Enhanced exception throwing reproducer. -------------- next part -------------- A non-text attachment was scrubbed... Name: multiParallelAppeltsTest.diff Type: text/x-patch Size: 49885 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120903/c5015263/multiParallelAppeltsTest.diff From ptisnovs at icedtea.classpath.org Mon Sep 3 09:30:16 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 03 Sep 2012 16:30:16 +0000 Subject: /hg/gfx-test: Added four test cases to the following test: Message-ID: changeset 408898949c65 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=408898949c65 author: Pavel Tisnovsky date: Mon Sep 03 18:32:49 2012 +0200 Added four test cases to the following test: src/org/gfxtest/testsuites/PrintTestCubicCurves.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestCubicCurves.java | 142 +++++++++++++++++++ 2 files changed, 147 insertions(+), 0 deletions(-) diffs (178 lines): diff -r 54be940ff585 -r 408898949c65 ChangeLog --- a/ChangeLog Wed Aug 29 17:56:15 2012 +0200 +++ b/ChangeLog Mon Sep 03 18:32:49 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-03 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestCubicCurves.java: + Added four test cases to this test. + 2012-08-29 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestCubicCurves.java: diff -r 54be940ff585 -r 408898949c65 src/org/gfxtest/testsuites/PrintTestCubicCurves.java --- a/src/org/gfxtest/testsuites/PrintTestCubicCurves.java Wed Aug 29 17:56:15 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestCubicCurves.java Mon Sep 03 18:32:49 2012 +0200 @@ -40,6 +40,7 @@ package org.gfxtest.testsuites; +import java.awt.BasicStroke; import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.CubicCurve2D; @@ -47,6 +48,9 @@ import org.gfxtest.callbacks.CubicCurveDrawCallbacks; +import org.gfxtest.framework.ColorPalette; +import org.gfxtest.framework.GrayscalePalette; +import org.gfxtest.framework.HSBPalette; import org.gfxtest.framework.PrintTest; import org.gfxtest.framework.TestImage; import org.gfxtest.framework.TestResult; @@ -185,6 +189,144 @@ } /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with default width and default end caps. + * Color of all rendered curves are selected from a palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesColorPalette(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set curve color + this.graphics.setColor(ColorPalette.getColor(index)); + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with default width and default end caps. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesGrayScale(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // compute grayscale value + float gray = y1 * 1.0f / this.image.getHeight(); + // set curve color + this.graphics.setColor(GrayscalePalette.createGrayscaleColor(gray)); + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with default width and default end caps. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesColorScale(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // compute hue value + float hue = y1 * 1.0f / this.image.getHeight(); + // set curve color + this.graphics.setColor(HSBPalette.createHsbColor(hue)); + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Cubic curves are rendered with various width and default end caps. + * Color of all rendered curves are selected from a grayscale palette. + * All rendered cubic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawCubicCurvesChangeWidth(TestImage image, Graphics2D graphics) + { + drawCubicCurve(image, graphics, CUBIC_CURVE_STEP, new CubicCurveDrawCallbacks() + { + /** + * Stroke width. + */ + float strokeWidth = 0.0f; + + /** + * Callback function called before each cubic curve is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4, int index) + { + // set stroke width + this.graphics.setStroke(new BasicStroke(this.strokeWidth)); + // set new stroke width + this.strokeWidth = this.strokeWidth < MAX_STROKE_WIDTH ? this.strokeWidth + STROKE_WIDTH_DELTA : this.strokeWidth; + return; + } + }); + + // test return value + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args From mark at klomp.org Mon Sep 3 11:07:57 2012 From: mark at klomp.org (Mark Wielaard) Date: Mon, 3 Sep 2012 20:07:57 +0200 Subject: FYI [PATCH] add missing backslash Message-ID: <20120903180757.GA7845@toonder.wildebeest.org> There were some failures in the icedtea6 build caused by some patches not being applied. For some reason automake/make seems to not warn about this which makes it hard to spot. The fix is trivial: # HG changeset patch # User Mark Wielaard # Date 1346695613 -7200 # Node ID 7fe15479d7193af69af48e675b55f12bc01fc1a2 # Parent db084058f69b1b244f198e2ea90e52351abccd02 Makefile.am (ICEDTEA_PATCHES): Add missing backslash. There was backslash missing after 7034464-transparent_huge_pages.patch which caused all patches after that one to be note included in the list. diff -r db084058f69b -r 7fe15479d719 ChangeLog --- a/ChangeLog Mon Sep 03 14:30:48 2012 +0100 +++ b/ChangeLog Mon Sep 03 20:06:53 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-03 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after + patches/openjdk/7034464-transparent_huge_pages.patch. + 2012-09-03 Andrew John Hughes * NEWS: Add 1.10.9 & 1.11.4. diff -r db084058f69b -r 7fe15479d719 Makefile.am --- a/Makefile.am Mon Sep 03 14:30:48 2012 +0100 +++ b/Makefile.am Mon Sep 03 20:06:53 2012 +0200 @@ -349,7 +349,7 @@ patches/openjdk/6986968-crash_on_xim_restart.patch \ patches/openjdk/7036754-stroker-nan.patch \ patches/openjdk/pgram-pipe-regression.patch \ - patches/openjdk/7034464-transparent_huge_pages.patch + patches/openjdk/7034464-transparent_huge_pages.patch \ patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch \ patches/openjdk/7043564-hugepage.patch \ patches/openjdk/mutter.patch \ From mark at icedtea.classpath.org Mon Sep 3 11:07:46 2012 From: mark at icedtea.classpath.org (mark at icedtea.classpath.org) Date: Mon, 03 Sep 2012 18:07:46 +0000 Subject: /hg/icedtea6: Makefile.am (ICEDTEA_PATCHES): Add missing backslash. Message-ID: changeset 7fe15479d719 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7fe15479d719 author: Mark Wielaard date: Mon Sep 03 20:06:53 2012 +0200 Makefile.am (ICEDTEA_PATCHES): Add missing backslash. There was backslash missing after 7034464-transparent_huge_pages.patch which caused all patches after that one to be note included in the list. diffstat: ChangeLog | 5 +++++ Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diffs (24 lines): diff -r db084058f69b -r 7fe15479d719 ChangeLog --- a/ChangeLog Mon Sep 03 14:30:48 2012 +0100 +++ b/ChangeLog Mon Sep 03 20:06:53 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-03 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after + patches/openjdk/7034464-transparent_huge_pages.patch. + 2012-09-03 Andrew John Hughes * NEWS: Add 1.10.9 & 1.11.4. diff -r db084058f69b -r 7fe15479d719 Makefile.am --- a/Makefile.am Mon Sep 03 14:30:48 2012 +0100 +++ b/Makefile.am Mon Sep 03 20:06:53 2012 +0200 @@ -349,7 +349,7 @@ patches/openjdk/6986968-crash_on_xim_restart.patch \ patches/openjdk/7036754-stroker-nan.patch \ patches/openjdk/pgram-pipe-regression.patch \ - patches/openjdk/7034464-transparent_huge_pages.patch + patches/openjdk/7034464-transparent_huge_pages.patch \ patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch \ patches/openjdk/7043564-hugepage.patch \ patches/openjdk/mutter.patch \ From ahughes at redhat.com Mon Sep 3 13:59:10 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Mon, 3 Sep 2012 16:59:10 -0400 (EDT) Subject: FYI [PATCH] add missing backslash In-Reply-To: <20120903180757.GA7845@toonder.wildebeest.org> Message-ID: <1062887402.14889253.1346705950140.JavaMail.root@redhat.com> ----- Original Message ----- > There were some failures in the icedtea6 build caused by some patches > not being applied. For some reason automake/make seems to not warn > about this which makes it hard to spot. The fix is trivial: > > # HG changeset patch > # User Mark Wielaard > # Date 1346695613 -7200 > # Node ID 7fe15479d7193af69af48e675b55f12bc01fc1a2 > # Parent db084058f69b1b244f198e2ea90e52351abccd02 > Makefile.am (ICEDTEA_PATCHES): Add missing backslash. > > There was backslash missing after > 7034464-transparent_huge_pages.patch > which caused all patches after that one to be note included in the > list. > > diff -r db084058f69b -r 7fe15479d719 ChangeLog > --- a/ChangeLog Mon Sep 03 14:30:48 2012 +0100 > +++ b/ChangeLog Mon Sep 03 20:06:53 2012 +0200 > @@ -1,3 +1,8 @@ > +2012-09-03 Mark Wielaard > + > + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after > + patches/openjdk/7034464-transparent_huge_pages.patch. > + > 2012-09-03 Andrew John Hughes > > * NEWS: Add 1.10.9 & 1.11.4. > diff -r db084058f69b -r 7fe15479d719 Makefile.am > --- a/Makefile.am Mon Sep 03 14:30:48 2012 +0100 > +++ b/Makefile.am Mon Sep 03 20:06:53 2012 +0200 > @@ -349,7 +349,7 @@ > patches/openjdk/6986968-crash_on_xim_restart.patch \ > patches/openjdk/7036754-stroker-nan.patch \ > patches/openjdk/pgram-pipe-regression.patch \ > - patches/openjdk/7034464-transparent_huge_pages.patch > + patches/openjdk/7034464-transparent_huge_pages.patch \ > patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch > \ > patches/openjdk/7043564-hugepage.patch \ > patches/openjdk/mutter.patch \ > > Ah, good spot. This is why I should always rebuild, no matter how trivial the change (just a rename here) :-( -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From stefan at complang.tuwien.ac.at Mon Sep 3 22:41:08 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Tue, 4 Sep 2012 07:41:08 +0200 Subject: CACAO 1.6.0 released Message-ID: CACAO 1.6.0 released. This is the first release in quite some time, so the following list of the most important changes is necessarily incomplete: * Large parts rewritten in C++. * No more cacaoh, simplifying cross-compilation. * --enable-handles switch for making native code ready for moving GC (currently broken). * park/unpark support. * Simplified signal handling -- reduced code duplication. * Stack unwinding mostly rewritten in C -- reduced assembler code. * Added support for OpenSolaris. * Experimental python mode for easier inspection of internal compiler structures. * Fixed various array-related bugs, including PR116, PR119. * Fixed PR120 (races in thread code). * Correct placement of memory barriers on x86 and x86-64. * Fixed code generation bugs on Alpha, ARM, MIPS and PPC64. * Fixed support for armv7 hard-float. * Supports ARM Thumb interworking. * Partially unified code generation. * Numerous other improvements and fixes. In the traditional configuration, CACAO uses GNU Classpath as its default Java runtime library and supports upstream releases or the current git master branch. This release is tested against GNU Classpath 0.99. Alternatively, the preferred configuration is to build against OpenJDK 6. See INSTALL.CACAO for details. Currently supported JIT compiler architectures are: * arm (armv5l, armv7l) * i386 * powerpc * powerpc64 * x86_64 Currently orphaned architectures, on which earlier releases of CACAO were known to work, are: * alpha * m68k * mips (mipsel, mips64) * s390 * sparc64 Building against OpenJDK on PowerPC platforms is known to be a bit challenging at the time of this release. The CACAO wiki can be found here: http://c1.complang.tuwien.ac.at/cacaowiki/ The CACAO mailing lists can be found here: http://c1.complang.tuwien.ac.at/cgi-bin/mailman/listinfo/ CACAO 1.6.0 can be downloaded from http://www.complang.tuwien.ac.at/cacaojvm/download/cacao-1.6.0/ File : cacao-1.6.0.tar.gz md5sum : aa856066e33f86c4fc7669c6dff07cbc sha1sum: d7bf97c8ed94ac3866d559a29711dcbee8f8bcfc File : cacao-1.6.0.tar.xz md5sum : 2ac8075f9c9cf21690babd3dde41860a sha1sum: f9dacdf5205d7c49c006b8148be9777db213b04c Enjoy! CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO cacao at cacaojvm.org From bugzilla-daemon at icedtea.classpath.org Tue Sep 4 05:56:38 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 04 Sep 2012 12:56:38 +0000 Subject: [Bug 1154] Minecraft wont play in the browser In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1154 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |unassigned at icedtea.classpat | |h.org Component|IcedTea |Plugin Assignee|ahughes at redhat.com |dbhole at redhat.com Product|IcedTea |IcedTea-Web -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120904/96dad856/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 4 05:56:52 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 04 Sep 2012 12:56:52 +0000 Subject: [Bug 1154] Minecraft wont play in the browser In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1154 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahughes at redhat.com Severity|blocker |normal -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120904/d8562675/attachment.html From jvanek at redhat.com Tue Sep 4 09:43:45 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 04 Sep 2012 18:43:45 +0200 Subject: [RFC][icedtea-web] Fix for single instance service with applets using jnlp_href In-Reply-To: <50369334.6000207@redhat.com> References: <4F2849F3.2030003@redhat.com> <4F5DD2F8.8000904@redhat.com> <4F5E2C2F.7090603@redhat.com> <4F912D3C.9080804@redhat.com> <4FB54921.1010106@redhat.com> <50369334.6000207@redhat.com> Message-ID: <50462FC1.9040806@redhat.com> On 08/23/2012 10:31 PM, Danesh Dadachanji wrote: > > On 17/05/12 02:53 PM, Danesh Dadachanji wrote: >> >> >> On 20/04/12 05:32 AM, Jiri Vanek wrote: >>>>> >>>> >>>> Yeah, it was a confusing service to wrap my head around. :S >>>> >>>> Right now, SingleInstanceService is available to use from applets/applications run by javaws. I am >>>> trying to port this over to the plugin so that when jnlp_href is used, applets have access to it. >>>> >>>> The point of the service itself is to only let one instance of an applet run at a time. There's a >>>> catch to running another instance of the applet though. While the first one is running, it is setup >>>> with a listener for later instances to use. The idea is that the second instance can communicate >>>> with the running instance, passing along some args to be handled by the listener, and then exit. >>>> When you run another instance of the applet, icedtea-web is supposed to recognize this as the second >>>> instance and pass on a list of arguments provided by the dev. See the API for >>>> SingleInstanceListener[1] for the methods. I think the following signleapp example[2] might help you >>>> too. >>>> >>>> Here's an example run path: >>>> >>>> 1. Start single instance app. The dev has set it up to handle params accordingly, say to spit it out >>>> on the screen to log. >>>> 2. IcedTea-Web sets up a single instance server to keep track of the instance running. >>>> 3. The second app is run, args are passed in by the dev again. Let's say they are the current >>>> date/time. >>>> 4. IcedTea-Web notices the second app is a second instance of the first one and checks that the >>>> first one's server is still running, then denies init of the second applet. The second instance's >>>> args are taken and passed along to the first instance's newActivation(String[] args) method. >>>> 5. Dev's newActivation method reacts accordingly. >>>> >>>> I hope the example[2] helps clear up any doubts I have not covered but please ask if it doesn't! >>>> >>>>>> Attached is a patch to fix SingleInstanceService to work when applets >>>>>> use jnlp_href. >>>>>> >>>>>> If a single instance exists, it'll throw a fatal exception for the >>>>>> second applet and stop running it. The applet passes the args along >>>>>> while checking. However, proprietary documentation is unclear about >>>>>> which args are passed so for now I have left it as a FIXME until >>>>>> that's cleared up. >>>>> I believe applets parameters inside tag/jnlp descriptor are correct way. >>>> >>>> These args I was referring to are from the second instance being run so we're talking about >>>> different things here. =) Please see above. >>>> >>> Well well... It was digging to find what this should be doing, and it looks tome like it is not doing something. >>> >>> Can I ask for large set of reproducers? >>> >>> two same javaws applications runnig together/ two same javaws applications running as SingleInstance and passing params / two different >>> javaws running together/ two different javaws applications running as SingleInstance and "passing" params >>> >>> two same applets-in-javaws applications runig together/ two same applets-in-javaws applications running as SingleInstance and passing >>> params / two different applets-in-javaws running together/ two different applets-in-javaws applications running as SingleInstance and >>> "passing" params >>> >>> two same applets-in-browser running together/ two same applets-in-javaws applications running as SingleInstance and passing params /two >>> different applets-in-browser running together/ two different applets-in-javaws applications running as SingleInstance and "passing" >>> params >>> >>> >> >> Could you elaborate more on the purpose of "two same javaws applications running together"? Similarly for the "applets-in-browser" and >> "applets-in-javaws" ones. As I understand it, these are just normal runs without SingleInstance, right? How is this related to the patch? >> >>> >>> It will need similar approach as I have used in xfork test, but better then sleep use StdOut use contentReader listeners and do not >>> wait for timeout (as it really delays test runs) >>> >> >> I'm not sure how this would be run in the current engine. We need to ensure both apps (for each test) are running at the same time. I >> don't think there is a way to guarantee this, is there? I know the tests are run one after another but they are only ordered >> alphabetically right? There is no way to specify I want to run test X and then immediately after run test Y (while test X is still >> running), is there? >> >>> >>> The patch itself looks ok, and if will pass above tests, then it is ok for head. The only issue is passing params to applet. Yes, >> >> By param you mean through SingleInstance, not through tags right? >> >>> specification is silent in this issue, but I'm against String[0] (at least it is hard to test!:)). My idea here is to pass new >>> String{key1,value1, key2,value2...keyn,valuen}. Better then nothing I believe. >>> >> >> Would you mind elaborating on this some more too? I don't understand what the String{key,value,...} is meant to be. >> >>> Thanx for hard work! >> >> Thanks for the comments! Sorry for the long delay. > > Hey all, > > I ran out of time and couldn't get a chance to finish the reproducer for this patch. The tests are in place, all that needs doing is getting the 2 applets to run side by side. I couldn't figure out the magic for that. I'm posting it here in case anyone wants to pick it up again. > > Here's the last ChangeLog I had (minus tests additions). > > +2012-01-31 Danesh Dadachanji > + > + Fixed SingleInstanceService to work with jnlp_href. > + * netx/net/sourceforge/jnlp/Launcher.java > + (launchApplication): Print existing single instance in debug mode. > + (launchApplet): Added check for single instance, throws launchError if > + single instance already exists. > + (getApplet): Same as above. > + (launchInstaller): Added TODO reminder for when it is implemented. > + * netx/net/sourceforge/jnlp/resources/Messages.properties: > + Added LSingleInstanceExists. > + * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java > + (initializeSingleInstance): Modified to always initialize if the applet is > + being run by the plugin. > + (checkSingleInstanceRunning): Modified args passed to SingleInstanceListener. > + Marked applets' args as FIXME, for now it passes an empty args array. > + > > Regards, > Danesh So here is his patch with finished and test: 2012-09-04 Jiri Vanek Danesh Dadachanji Single instance support for jnlp-href and tests * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: (initializeSingleInstance) fixed code for catching running instance (checkSingleInstanceRunning) Added handling of parameters. * netx/net/sourceforge/jnlp/Launcher.java: (launchApplication), (launchApplet) Added debug output that instance is already running. (getApplet) added check for services and debug output * netx/net/sourceforge/jnlp/resources/Messages.properties: added (LSingleInstanceExists) entry for exception. tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp: * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html: * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html: Applet and application in jnlp or html launching files. * tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java SingleInstance implementing applet/application * tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java Testfile for launching for above jnlps/htmls as testcases. When looking to it now, I would suggest also new type of exception instead of LaunchException (SingleInstanceLaunchException perhaps...) Is (Will) it be ok for head/1.3? J -------------- next part -------------- A non-text attachment was scrubbed... Name: singleInstanceFixAndTests.patch Type: text/x-patch Size: 36112 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120904/91518a4b/singleInstanceFixAndTests.patch From adomurad at redhat.com Tue Sep 4 13:48:01 2012 From: adomurad at redhat.com (adomurad) Date: Tue, 04 Sep 2012 16:48:01 -0400 Subject: [RFC][icedtea-web] Fix for single instance service with applets using jnlp_href In-Reply-To: <50462FC1.9040806@redhat.com> References: <4F2849F3.2030003@redhat.com> <4F5DD2F8.8000904@redhat.com> <4F5E2C2F.7090603@redhat.com> <4F912D3C.9080804@redhat.com> <4FB54921.1010106@redhat.com> <50369334.6000207@redhat.com> <50462FC1.9040806@redhat.com> Message-ID: <1346791681.6847.9.camel@adomurad-desktop> Comments inline. > So here is his patch with finished and test: > > > 2012-09-04 Jiri Vanek > Danesh Dadachanji > > Single instance support for jnlp-href and tests > * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: > (initializeSingleInstance) fixed code for catching running instance > (checkSingleInstanceRunning) Added handling of parameters. > * netx/net/sourceforge/jnlp/Launcher.java: (launchApplication), > (launchApplet) Added debug output that instance is already running. > (getApplet) added check for services and debug output > * netx/net/sourceforge/jnlp/resources/Messages.properties: added > (LSingleInstanceExists) entry for exception. > tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp > * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp: > * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html: > * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html: > Applet and application in jnlp or html launching files. > * tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java > SingleInstance implementing applet/application > * tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java > Testfile for launching for above jnlps/htmls as testcases. > > > > When looking to it now, I would suggest also new type of exception instead of LaunchException (SingleInstanceLaunchException perhaps...) > > Is (Will) it be ok for head/1.3? > > J > diff -r 855087771e7e netx/net/sourceforge/jnlp/Launcher.java > --- a/netx/net/sourceforge/jnlp/Launcher.java Tue Aug 28 14:36:06 2012 -0400 > +++ b/netx/net/sourceforge/jnlp/Launcher.java Tue Sep 04 18:13:54 2012 +0200 > @@ -536,6 +536,9 @@ > try { > ServiceUtil.checkExistingSingleInstance(file); > } catch (InstanceExistsException e) { > + if (JNLPRuntime.isDebug()) { > + System.out.println("Single instance application is already running."); > + } > return null; > } > > @@ -653,11 +656,17 @@ > throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); > > try { > + ServiceUtil.checkExistingSingleInstance(file); > AppletInstance applet = createApplet(file, enableCodeBase, cont); > applet.initialize(); > > applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance > return applet; > + } catch (InstanceExistsException ieex) { > + if (JNLPRuntime.isDebug()) { > + System.out.println("Single instance applet is already running."); > + } > + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); > } catch (LaunchException lex) { > throw launchError(lex); > } catch (Exception ex) { > @@ -673,9 +682,17 @@ > throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); > > try { > + ServiceUtil.checkExistingSingleInstance(file); > + > AppletInstance applet = createApplet(file, enableCodeBase, cont); > applet.initialize(); > return applet; > + > + } catch (InstanceExistsException ieex) { > + if (JNLPRuntime.isDebug()) { > + System.out.println("Single instance applet is already running."); > + } > + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); A new exception type for these calls (as you said) would probably be good. > } catch (LaunchException lex) { > throw launchError(lex); > } catch (Exception ex) { > @@ -688,6 +705,8 @@ > * a thread in the application's thread group. > */ > protected ApplicationInstance launchInstaller(JNLPFile file) throws LaunchException { > + // TODO Check for an existing single instance once implemented. > + // ServiceUtil.checkExistingSingleInstance(file); > throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCNotSupported"), R("LNoInstallers"), R("LNoInstallersInfo"))); > > } > [..snip..] > diff -r 855087771e7e tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp Tue Sep 04 18:13:54 2012 +0200 > @@ -0,0 +1,60 @@ > + > + > + > + > + SingleInstanceApplet > + IcedTea > + > + SingleInstanceApplet > + > + > + > + > + > + > + + documentBase="." > + name="SingleInstanceChecker" > + main-class="SingleInstanceChecker" > + width="100" > + height="100"> > + > + > + > + > \ No newline at end of file > diff -r 855087771e7e tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp Tue Sep 04 18:13:54 2012 +0200 > @@ -0,0 +1,55 @@ > + > + > + > + > + SingleInstanceAppletWS > + IcedTea > + > + SingleInstanceAppletWS > + > + > + > + > + > + > + > + v7 > + v8 > + > + > \ No newline at end of file > diff -r 855087771e7e tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html Tue Sep 04 18:13:54 2012 +0200 > @@ -0,0 +1,50 @@ > + > + > + > + > + + archive="SingleInstanceServiceTest.jar" > + code="SingleInstanceChecker.class" > + width="100" > + height="100"> > + > + > + > + > + > diff -r 855087771e7e tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html Tue Sep 04 18:13:54 2012 +0200 > @@ -0,0 +1,47 @@ > + > + > + > + > + > + > + > + > + > + > + > diff -r 855087771e7e tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java Tue Sep 04 18:13:54 2012 +0200 > @@ -0,0 +1,158 @@ > +/* SingleInstanceChecker.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import java.applet.Applet; > + > +import javax.jnlp.SingleInstanceListener; > +import javax.jnlp.SingleInstanceService; > +import javax.jnlp.ServiceManager; > +import javax.jnlp.UnavailableServiceException; > + > +public class SingleInstanceChecker extends Applet implements SingleInstanceListener { > + > + private SingleInstanceChecker self; > + Killer killer; > + > + private static class Killer extends Thread { > + > + private int timeout; > + private String timeoutText; > + > + public Killer() { > + timeout = 5000; > + timeoutText = Integer.toString(timeout); > + } > + > + public Killer(int n) { > + timeout = n; > + timeoutText = Integer.toString(timeout); > + } > + > + public Killer(int n, String s) { > + timeout = n; > + timeoutText = s; > + } > + > + @Override > + public void run() { > + try { > + Thread.sleep(timeout); > + System.out.println("Applet killing itself after " + timeoutText + " ms of life"); > + System.exit(0); > + } catch (Exception ex) { > + } > + } > + } > + > + public SingleInstanceChecker() { > + self = this; > + } > + > + private void proceed() { > + > + try { > + SingleInstanceService testService = (SingleInstanceService) ServiceManager.lookup("javax.jnlp.SingleInstanceService"); > + System.out.println("SingleInstanceChecker: Adding listener to service."); > + testService.addSingleInstanceListener(this); > + System.out.println("SingleInstanceChecker: Listener added."); > + } catch (UnavailableServiceException use) { > + System.err.println("SingleInstanceChecker: Service lookup failed."); > + use.printStackTrace(); > + } finally { > + new Thread(new Runnable() { > + > + @Override > + public void run() { > + try { > + Thread.sleep(5000); > + } catch (Exception ex) { > + ex.printStackTrace(); > + } finally { > + startKiller(2); > + } > + } > + }).start(); > + } > + } > + > + //killer is started when params are recieved, or when application is running to long recieved -> received :) (nit, non-blocker) > + private void startKiller(int a) { > + synchronized (self) { > + if (killer == null) { > + if (a == 2) { > + killer = new Killer(5000, "10000"); > + killer.start(); > + } else { > + killer = new Killer(5000); > + killer.start(); > + } > + } > + } > + } > + > + @Override > + public void newActivation(String[] params) { > + String paramsString = ""; > + for (String param : params) { > + paramsString += " "+param; > + } > + System.out.println("Paramaters received by SingleInstanceChecker:" + paramsString); paramaters -> parameters in a few places (nit, non-blocker) > > + startKiller(1); > + } > + > + @Override > + public void start() { > + System.out.print("Paramaters received by during launch:"); > + for (int i=1; i<10; i++ ) { > + String s=getParameter("p"+i); > + if (s!=null){ > + System.out.print(" "+s); > + } > + } > + System.out.println(); > + proceed(); > + } > + > + public static void main(String[] args) { > + System.out.print("Paramaters received by during launch:"); > + for (String string : args) { > + System.out.print(" "+string); > + } > + System.out.println(); > + new SingleInstanceChecker().proceed(); > + } > +} > diff -r 855087771e7e tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java Tue Sep 04 18:13:54 2012 +0200 > @@ -0,0 +1,265 @@ > +/* SingleInstanceTest.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import net.sourceforge.jnlp.ContentReaderListener; > +import net.sourceforge.jnlp.ProcessResult; > + > +import net.sourceforge.jnlp.ServerAccess; > +import net.sourceforge.jnlp.annotations.NeedsDisplay; > +import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import net.sourceforge.jnlp.browsertesting.BrowserFactory; > +import net.sourceforge.jnlp.browsertesting.BrowserTest; > +import net.sourceforge.jnlp.browsertesting.Browsers; > + > +import org.junit.Assert; > +import org.junit.Test; > + > +public class SingleInstanceTest extends BrowserTest { > + > + private static boolean isJnlp(String launchFile) { > + return launchFile.toLowerCase().endsWith(".jnlp"); > + } > + > + private static boolean isHtml(String launchFile) { > + return launchFile.toLowerCase().endsWith(".html"); > + } > + > + private static void checkNulls(String testName, ProcessResult prSecondInst, String var) { > + Assert.assertNotNull(var + " SingleInstanceTest." + testName + "result was null ", prSecondInst); > + Assert.assertNotNull(var + " SingleInstanceTest." + testName + "result was null ", prSecondInst.stdout); > + Assert.assertNotNull(var + " SingleInstanceTest." + testName + "result was null ", prSecondInst.stderr); > + } > + > + private static void evaluateFirstInstance(ProcessResult prFirstInst, String testName) { > + checkNulls(testName, prFirstInst, "First"); > + // First Instance's result should run without exceptions. > + String s0 = "SingleInstanceChecker: Adding listener to service."; > + String s1 = "Paramaters received by SingleInstanceChecker"; > + String ss = "SingleInstanceChecker: Service lookup failed."; > + Assert.assertTrue("SingleInstanceTest." + testName > + + "'s first PR stdout should contain " + s0 + " but didn't", > + prFirstInst.stdout.contains(s0)); > + Assert.assertTrue("SingleInstanceTest." + testName > + + "'s first PR stdout should contain " + s1 + " but didn't", > + prFirstInst.stdout.contains(s1)); > + Assert.assertFalse("SingleInstanceTest." + testName > + + "'s first PR stderr should not contain " + ss + " but did", > + prFirstInst.stderr.contains(ss)); > + } > + > + private static void evaluateSecondInstance(ProcessResult prSecondInst, String testName) { > + checkNulls(testName, prSecondInst, "Second"); > + // Second Instance's result should throw a LaunchException. > + String s2 = "net.sourceforge.jnlp.LaunchException"; > + Assert.assertTrue("SingleInstanceTest." + testName > + + "'s second PR stderr should contain " + s2 + " but didn't", > + prSecondInst.stderr.contains(s2)); > + } > + > + private static boolean bothHtml(String app1, String app2) { > + return isHtml(app1) && isHtml(app2); > + } > + > + private static class AsyncProcess extends Thread { > + > + private ProcessResult pr = null; > + private String launchFile; > + > + public AsyncProcess(String launchFile) { > + this.launchFile = launchFile; > + > + } > + > + @Override > + public void run() { > + try { > + boolean isJavawsTest = isJnlp(launchFile); > + pr = isJavawsTest ? server.executeJavawsHeadless(launchFile, null, null) > + : server.executeBrowser(launchFile, null, null); > + } catch (Exception ex) { > + ServerAccess.logException(ex); > + } finally { > + if (pr == null) { > + pr = new ProcessResult("", "", null, true, null, null); > + } > + } > + } > + > + public ProcessResult getPr() { > + return pr; > + } > + } > + > + private ProcessResult[] executeSingleInstanceCheck(String app1, String app2) throws Exception { > + > + final AsyncProcess ap = new AsyncProcess(app2); > + ContentReaderListener clr = new ContentReaderListener() { > + > + @Override > + public void charReaded(char ch) { > + //nothing to do > + } > + > + @Override > + public void lineReaded(String s) { > + if (s.contains(listenerConfirmed)) { > + ap.start(); > + } > + } > + }; > + boolean isJavawsTest = isJnlp(app1); > + final ProcessResult pr = isJavawsTest ? server.executeJavawsHeadless(app1, clr, null) > + : server.executeBrowser(app1, clr, null); > + > + int timeout = 0; > + while (ap.pr == null) { > + timeout++; > + Thread.sleep(500); > + if (timeout > 20) { > + break; > + } > + } > + return new ProcessResult[]{pr, ap.getPr()}; > + > + } > + //files > + private static final String jnlpApplet = "/SingleInstanceTest.jnlp"; > + private static final String jnlpApplication = "/SingleInstanceTestWS.jnlp"; > + private static final String htmlpApplet = "/SingleInstanceTest_clasical.html"; > + private static final String htmlJnlpHrefApplet = "/SingleInstanceTest_jnlpHref.html"; > + //constants > + private static final String listenerConfirmed = "SingleInstanceChecker: Listener added."; > + > + @Test > + @NeedsDisplay > + @TestInBrowsers(testIn = Browsers.one) > + public void htmlpAppletXhtmlpApplet() throws Exception { > + ProcessResult[] results = executeSingleInstanceCheck(htmlpApplet, htmlpApplet); > + String id = "htmlpAppletXhtmlpApplet"; > + evaluateFirstInstance(results[0], id); > + //the first browser is consuming all the output > + evaluateSecondInstance(results[0], id); > + > + } > + > + @Test > + @NeedsDisplay > + @TestInBrowsers(testIn = Browsers.one) > + public void htmlJnlpHrefAppletXhtmlJnlpHrefApplet() throws Exception { > + ProcessResult[] results = executeSingleInstanceCheck(htmlJnlpHrefApplet, htmlJnlpHrefApplet); > + String id = "htmlJnlpHrefAppletXhtmlJnlpHrefApplet"; > + evaluateFirstInstance(results[0], id); > + //the first browser is consuming all the output > + evaluateSecondInstance(results[0], id); > + > + } > + > + @Test > + public void jnlpApplicationXjnlpApplication() throws Exception { > + ProcessResult[] results = executeSingleInstanceCheck(jnlpApplication, jnlpApplication); > + String id = "jnlpApplicationXjnlpApplication"; > + evaluateFirstInstance(results[0], id); > + evaluateSecondInstance(results[1], id); > + > + } > + > + @Test > + @NeedsDisplay > + public void jnlpAppleXjnlpApplet() throws Exception { > + ProcessResult[] results = executeSingleInstanceCheck(jnlpApplet, jnlpApplet); > + String id = "jnlpAppleXjnlpApplet"; > + evaluateFirstInstance(results[0], id); > + evaluateSecondInstance(results[1], id); > + } > + > + public static void main(String[] args) throws Exception { > + new SingleInstanceTest().main(); > + } > + > + /** > + * This "test" is testing all possible variations of launches. > + * However html x jnlp (or vice versa) tests are failing > + * I do not suppose this should ever happen in real life, so I'm not including this as @KnownToFail > + * See the list of results on bottom of this file for couriosity ;) > + */ > + public void main() throws Exception { > + //just for fun try all not so probable cominations > + String[] args = new String[]{jnlpApplet, jnlpApplication, htmlJnlpHrefApplet, htmlpApplet}; > + //normally handled by annotation > + server.setCurrentBrowser(BrowserFactory.getFactory().getRandom()); > + for (int i = 0; i < args.length; i++) { > + String app1 = args[i]; > + for (int j = 0; j < args.length; j++) { > + String app2 = args[j]; > + try { > + ProcessResult[] results = executeSingleInstanceCheck(app1, app2); > + evaluateFirstInstance(results[0], "main"); > + if (bothHtml(app1, app2)) { > + evaluateSecondInstance(results[0], "main"); > + } else { > + evaluateSecondInstance(results[1], "main"); > + } > + System.out.println("Passed " + app1 + " x " + app2); > + } catch (Error ex) { > + System.out.println("FAILED " + app1 + " x " + app2 + " - " + ex.toString()); > + //ex.printStackTrace(); > + } > + } > + > + } > + > + } I don't know how I feel about this main 'test'. I suppose theres no better place for it. > + /** > + *Passed /SingleInstanceTest.jnlp x /SingleInstanceTest.jnlp > + *Passed /SingleInstanceTest.jnlp x /SingleInstanceTestWS.jnlp > + *FAILED /SingleInstanceTest.jnlp x /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTest.jnlp x /SingleInstanceTest_clasical.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *Passed /SingleInstanceTestWS.jnlp x /SingleInstanceTest.jnlp > + *Passed /SingleInstanceTestWS.jnlp x /SingleInstanceTestWS.jnlp > + *java.lang.NoSuchMethodException: SingleInstanceTest.access$000() > + *FAILED /SingleInstanceTestWS.jnlp x /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTestWS.jnlp x /SingleInstanceTest_clasical.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTest_jnlpHref.html x /SingleInstanceTest.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTest_jnlpHref.html x /SingleInstanceTestWS.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *Passed /SingleInstanceTest_jnlpHref.html x /SingleInstanceTest_jnlpHref.html > + *FAILED /SingleInstanceTest_jnlpHref.html x /SingleInstanceTest_clasical.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTest_clasical.html x /SingleInstanceTest.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTest_clasical.html x /SingleInstanceTestWS.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *FAILED /SingleInstanceTest_clasical.html x /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't > + *Passed /SingleInstanceTest_clasical.html x /SingleInstanceTest_clasical.html > + */ > +} Please put a comment on the top of this block or remove it ... its rather confusing to see when skimming the test. Fine to push assuming tests pass - the only thing that I really want changed before pushing is a comment before the block of Pass/FAIL's, or its removal. Exception could be good to add too but its up to you. From ptisnovs at icedtea.classpath.org Wed Sep 5 01:45:53 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 05 Sep 2012 08:45:53 +0000 Subject: /hg/gfx-test: Updated src/org/gfxtest/testsuites/PrintTestQuadra... Message-ID: changeset cab54d813cdb in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=cab54d813cdb author: Pavel Tisnovsky date: Wed Sep 05 10:48:28 2012 +0200 Updated src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java: added basic test & functionality to create a Shape based on QuadraticCurve. diffstat: ChangeLog | 6 + src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java | 116 ++++++++++++++- 2 files changed, 121 insertions(+), 1 deletions(-) diffs (147 lines): diff -r 408898949c65 -r cab54d813cdb ChangeLog --- a/ChangeLog Mon Sep 03 18:32:49 2012 +0200 +++ b/ChangeLog Wed Sep 05 10:48:28 2012 +0200 @@ -1,3 +1,9 @@ +2012-09-05 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java: + Updated: added basic test & functionality to create a Shape + based on QuadraticCurve. + 2012-09-03 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestCubicCurves.java: diff -r 408898949c65 -r cab54d813cdb src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java --- a/src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java Mon Sep 03 18:32:49 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java Wed Sep 05 10:48:28 2012 +0200 @@ -39,7 +39,16 @@ */ package org.gfxtest.testsuites; +import java.awt.Graphics2D; +import java.awt.Shape; +import java.awt.geom.QuadCurve2D; + + + +import org.gfxtest.callbacks.QuadraticCurveDrawCallbacks; import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.TestImage; +import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -64,7 +73,112 @@ @Zoom(1) public class PrintTestQuadraticCurves extends PrintTest { - + + /** + * Create Shape which contains one quadratic curve. + * + * @param x1 + * x coordinate of the first control point + * @param y1 + * y coordinate of the first control point + * @param x2 + * x coordinate of the second control point + * @param y2 + * y coordinate of the second control point + * @param x3 + * x coordinate of third control point + * @param y3 + * y coordinate of third control point + * @return newly created shape + */ + private static Shape createQuadraticCurveShape(int x1, int y1, int x2, int y2, int x3, int y3) + { + QuadCurve2D quadraticCurve = new QuadCurve2D.Float(); + // set all four control points + quadraticCurve.setCurve(x1, y1, x2, y2, x3, y3); + return quadraticCurve; + } + + /** + * Method which renders set of qudratic curves using various colors and + * stroke styles. For each curve, the callback function/method is called to + * perform all required setup. Curves are represented by a Path object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @param verticalStep + * between two near curves + * @param quadraticCurveCallback + * class containing set of callback methods + */ + private static void drawQuadraticCurve(TestImage image, Graphics2D graphics, int verticalStep, QuadraticCurveDrawCallbacks quadraticCurveCallback) + { + // setup rendering + quadraticCurveCallback.setup(image, graphics); + + // image width and height + final int width = image.getWidth(); + final int height = image.getHeight(); + + // horizontal coordinates of curve endpoints + final int x1 = BORDER; + final int x3 = width - BORDER; + final int x2 = (x1 + x3) >> 1; + + // index to color palette + int colorIndex = 0; + + // draw all lines onto a paper + for (int y = BORDER * 10; y < height - BORDER * 10; y += verticalStep) + { + // compute other control points coordinates + final int y1 = y + (BORDER << 2); + final int y2 = y - (BORDER << 4); + final int y3 = y + (BORDER << 2); + // setup can be made for each line + quadraticCurveCallback.iterationCallBack(x1, y1, x2, y2, x3, y3, colorIndex++); + // create new path which contains just one line + Shape shape = createQuadraticCurveShape(x1, y1, x2, y2, x3, y3); + // render the quadratic shape + graphics.draw(shape); + } + + // cleanup rendering + quadraticCurveCallback.cleanup(); + } + + /** + * Test basic behavior of method Graphics.draw(Shape). + * Quadratic curves are rendered with default width and default end caps. + * Color of all rendered curves are set to black. + * All rendered quadratic curves are represented by a Shape object. + * + * @param image + * image to which lines are to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testDrawQuadraticCurvesBasicStyle(TestImage image, Graphics2D graphics) + { + drawQuadraticCurve(image, graphics, QUADRATIC_CURVE_STEP, new QuadraticCurveDrawCallbacks() + { + /** + * Callback function called before each quadratic shape is rendered. + */ + @Override + public void iterationCallBack(int x1, int y1, int x2, int y2, int x3, int y3, int index) + { + return; + } + }); + + // test return value + return TestResult.PASSED; + } + /** * Entry point to the test suite. * From doko at icedtea.classpath.org Wed Sep 5 02:32:27 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Wed, 05 Sep 2012 09:32:27 +0000 Subject: /hg/release/icedtea7-2.3: Remove the autoconf Xp header and libr... Message-ID: changeset 9fc75486d031 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=9fc75486d031 author: doko at ubuntu.com date: Wed Sep 05 11:27:46 2012 +0200 Remove the autoconf Xp header and library checks. 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r c05782d9083f -r 9fc75486d031 ChangeLog --- a/ChangeLog Mon Sep 03 13:34:49 2012 +0100 +++ b/ChangeLog Wed Sep 05 11:27:46 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-05 Matthias Klose + + * configure.ac: Remove the Xp header and library checks. + 2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.3.3pre. diff -r c05782d9083f -r 9fc75486d031 configure.ac --- a/configure.ac Mon Sep 03 13:34:49 2012 +0100 +++ b/configure.ac Wed Sep 05 11:27:46 2012 +0200 @@ -215,16 +215,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From doko at icedtea.classpath.org Wed Sep 5 02:42:41 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Wed, 05 Sep 2012 09:42:41 +0000 Subject: /hg/release/icedtea7-2.2: Remove the autoconf Xp header and libr... Message-ID: changeset 3c80f4c091b5 in /hg/release/icedtea7-2.2 details: http://icedtea.classpath.org/hg/release/icedtea7-2.2?cmd=changeset;node=3c80f4c091b5 author: doko at ubuntu.com date: Wed Sep 05 11:38:00 2012 +0200 Remove the autoconf Xp header and library checks. 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r 0c28205afaca -r 3c80f4c091b5 ChangeLog --- a/ChangeLog Mon Sep 03 13:31:12 2012 +0100 +++ b/ChangeLog Wed Sep 05 11:38:00 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-05 Matthias Klose + + * configure.ac: Remove the Xp header and library checks. + 2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.2.3pre. diff -r 0c28205afaca -r 3c80f4c091b5 configure.ac --- a/configure.ac Mon Sep 03 13:31:12 2012 +0100 +++ b/configure.ac Wed Sep 05 11:38:00 2012 +0200 @@ -199,16 +199,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From doko at icedtea.classpath.org Wed Sep 5 02:43:50 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Wed, 05 Sep 2012 09:43:50 +0000 Subject: /hg/release/icedtea7-2.1: Remove the autoconf Xp header and libr... Message-ID: changeset a15eb826e53b in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=a15eb826e53b author: doko at ubuntu.com date: Wed Sep 05 11:39:09 2012 +0200 Remove the autoconf Xp header and library checks. 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r 8557b0fc502a -r a15eb826e53b ChangeLog --- a/ChangeLog Mon Sep 03 12:27:19 2012 +0100 +++ b/ChangeLog Wed Sep 05 11:39:09 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-05 Matthias Klose + + * configure.ac: Remove the Xp header and library checks. + 2011-09-03 Andrew John Hughes * configure.ac: Bump to 2.1.3pre. diff -r 8557b0fc502a -r a15eb826e53b configure.ac --- a/configure.ac Mon Sep 03 12:27:19 2012 +0100 +++ b/configure.ac Wed Sep 05 11:39:09 2012 +0200 @@ -195,16 +195,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From doko at icedtea.classpath.org Wed Sep 5 02:46:02 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Wed, 05 Sep 2012 09:46:02 +0000 Subject: /hg/icedtea: Remove the autoconf Xp header and library checks. Message-ID: changeset 2eb479d57f25 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=2eb479d57f25 author: doko at ubuntu.com date: Wed Sep 05 11:41:19 2012 +0200 Remove the autoconf Xp header and library checks. 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r e909b2c85913 -r 2eb479d57f25 ChangeLog --- a/ChangeLog Mon Mar 19 23:34:01 2012 +0000 +++ b/ChangeLog Wed Sep 05 11:41:19 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-05 Matthias Klose + + configure.ac: Remove the Xp header and library checks. + 2012-03-19 Andrew John Hughes * Makefile.am: diff -r e909b2c85913 -r 2eb479d57f25 configure.ac --- a/configure.ac Mon Mar 19 23:34:01 2012 +0000 +++ b/configure.ac Wed Sep 05 11:41:19 2012 +0200 @@ -194,16 +194,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From doko at icedtea.classpath.org Wed Sep 5 02:48:11 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Wed, 05 Sep 2012 09:48:11 +0000 Subject: /hg/release/icedtea6-1.11: Remove the autoconf Xp header and lib... Message-ID: changeset 7f603a40c817 in /hg/release/icedtea6-1.11 details: http://icedtea.classpath.org/hg/release/icedtea6-1.11?cmd=changeset;node=7f603a40c817 author: doko at ubuntu.com date: Wed Sep 05 11:43:29 2012 +0200 Remove the autoconf Xp header and library checks. 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r 1b067fbe251c -r 7f603a40c817 ChangeLog --- a/ChangeLog Mon Sep 03 14:18:35 2012 +0100 +++ b/ChangeLog Wed Sep 05 11:43:29 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-05 Matthias Klose + + * configure.ac: Remove the Xp header and library checks. + 2011-09-03 Andrew John Hughes * configure.ac: Bump to 1.11.5pre. diff -r 1b067fbe251c -r 7f603a40c817 configure.ac --- a/configure.ac Mon Sep 03 14:18:35 2012 +0100 +++ b/configure.ac Wed Sep 05 11:43:29 2012 +0200 @@ -216,16 +216,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From doko at icedtea.classpath.org Wed Sep 5 02:53:15 2012 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Wed, 05 Sep 2012 09:53:15 +0000 Subject: /hg/release/icedtea7-2.1: Remove ChangeLog entry about JDK_UPDAT... Message-ID: changeset 812a19049ddb in /hg/release/icedtea7-2.1 details: http://icedtea.classpath.org/hg/release/icedtea7-2.1?cmd=changeset;node=812a19049ddb author: doko at ubuntu.com date: Wed Sep 05 11:48:34 2012 +0200 Remove ChangeLog entry about JDK_UPDATE_VERSION bump to 05, still set to 03 on the 2.1 branch. diffstat: ChangeLog | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diffs (11 lines): diff -r a15eb826e53b -r 812a19049ddb ChangeLog --- a/ChangeLog Wed Sep 05 11:39:09 2012 +0200 +++ b/ChangeLog Wed Sep 05 11:48:34 2012 +0200 @@ -45,7 +45,6 @@ 2012-06-12 Andrew John Hughes * Makefile.am: - (JDK_UPDATE_VERSION): Bump to 05. (CORBA_CHANGESET): Update to 2.1.1 release tag. (HOTSPOT_CHANGESET): Likewise. (JAXP_CHANGESET): Likewise. From jvanek at icedtea.classpath.org Wed Sep 5 03:30:17 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Wed, 05 Sep 2012 10:30:17 +0000 Subject: /hg/icedtea-web: Single instance support for jnlp-href and tests Message-ID: changeset 03803e23d0e6 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=03803e23d0e6 author: Jiri Vanek date: Wed Sep 05 12:30:30 2012 +0200 Single instance support for jnlp-href and tests diffstat: ChangeLog | 22 + netx/net/sourceforge/jnlp/Launcher.java | 19 + netx/net/sourceforge/jnlp/resources/Messages.properties | 3 +- netx/net/sourceforge/jnlp/services/XSingleInstanceService.java | 38 +- tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp | 60 ++ tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp | 55 ++ tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html | 50 + tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html | 47 + tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java | 158 +++++ tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java | 265 ++++++++++ 10 files changed, 709 insertions(+), 8 deletions(-) diffs (truncated from 838 to 500 lines): diff -r 855087771e7e -r 03803e23d0e6 ChangeLog --- a/ChangeLog Tue Aug 28 14:36:06 2012 -0400 +++ b/ChangeLog Wed Sep 05 12:30:30 2012 +0200 @@ -1,3 +1,25 @@ +2012-09-04 Jiri Vanek + Danesh Dadachanji + + Single instance support for jnlp-href and tests + * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: + (initializeSingleInstance) fixed code for catching running instance + (checkSingleInstanceRunning) Added handling of parameters. + * netx/net/sourceforge/jnlp/Launcher.java: (launchApplication), + (launchApplet) Added debug output that instance is already running. + (getApplet) added check for services and debug output + * netx/net/sourceforge/jnlp/resources/Messages.properties: added + (LSingleInstanceExists) entry for exception. + tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp: + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html: + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html: + Applet and application in jnlp or html launching files. + * tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java + SingleInstance implementing applet/application + * tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java + Testfile for launching for above jnlps/htmls as testcases. + 2012-08-27 Adam Domurad Fixes PR920, duplicate loading of classes in certain cases diff -r 855087771e7e -r 03803e23d0e6 netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Tue Aug 28 14:36:06 2012 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Sep 05 12:30:30 2012 +0200 @@ -536,6 +536,9 @@ try { ServiceUtil.checkExistingSingleInstance(file); } catch (InstanceExistsException e) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance application is already running."); + } return null; } @@ -653,11 +656,17 @@ throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); try { + ServiceUtil.checkExistingSingleInstance(file); AppletInstance applet = createApplet(file, enableCodeBase, cont); applet.initialize(); applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance return applet; + } catch (InstanceExistsException ieex) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance applet is already running."); + } + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); } catch (LaunchException lex) { throw launchError(lex); } catch (Exception ex) { @@ -673,9 +682,17 @@ throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); try { + ServiceUtil.checkExistingSingleInstance(file); + AppletInstance applet = createApplet(file, enableCodeBase, cont); applet.initialize(); return applet; + + } catch (InstanceExistsException ieex) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance applet is already running."); + } + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); } catch (LaunchException lex) { throw launchError(lex); } catch (Exception ex) { @@ -688,6 +705,8 @@ * a thread in the application's thread group. */ protected ApplicationInstance launchInstaller(JNLPFile file) throws LaunchException { + // TODO Check for an existing single instance once implemented. + // ServiceUtil.checkExistingSingleInstance(file); throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCNotSupported"), R("LNoInstallers"), R("LNoInstallersInfo"))); } diff -r 855087771e7e -r 03803e23d0e6 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Aug 28 14:36:06 2012 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Sep 05 12:30:30 2012 +0200 @@ -82,7 +82,8 @@ LSignedAppJarUsingUnsignedJarInfo=The main application jar is signed, but some of the jars it is using aren't. LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file. LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing -LCertFoundIn={0} found in cacerts ({1}) +LCertFoundIn={0} found in cacerts ({1}) +LSingleInstanceExists=Another instance of this applet already exists and only one may be run at the same time. JNotApplet=File is not an applet. JNotApplication=File is not an application. diff -r 855087771e7e -r 03803e23d0e6 netx/net/sourceforge/jnlp/services/XSingleInstanceService.java --- a/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Tue Aug 28 14:36:06 2012 -0400 +++ b/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Wed Sep 05 12:30:30 2012 +0200 @@ -24,11 +24,14 @@ import java.net.UnknownHostException; import java.util.LinkedList; import java.util.List; +import java.util.Map.Entry; +import java.util.Set; import javax.jnlp.SingleInstanceListener; import javax.management.InstanceAlreadyExistsException; import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.PluginBridge; import net.sourceforge.jnlp.runtime.JNLPRuntime; /** @@ -104,13 +107,14 @@ * @throws InstanceAlreadyExistsException if the instance already exists */ public void initializeSingleInstance() { - if (!initialized) { - // this is called after the application has started. so safe to use - // JNLPRuntime.getApplication() - checkSingleInstanceRunning(JNLPRuntime.getApplication().getJNLPFile()); + // this is called after the application has started. so safe to use + // JNLPRuntime.getApplication() + JNLPFile jnlpFile = JNLPRuntime.getApplication().getJNLPFile(); + if (!initialized || jnlpFile instanceof PluginBridge) { + // Either a new process or a new applet being handled by the plugin. + checkSingleInstanceRunning(jnlpFile); initialized = true; SingleInstanceLock lockFile; - JNLPFile jnlpFile = JNLPRuntime.getApplication().getJNLPFile(); lockFile = new SingleInstanceLock(jnlpFile); if (!lockFile.isValid()) { startListeningServer(lockFile); @@ -127,6 +131,7 @@ * @throws InstanceExistsException if an instance of this application * already exists */ + @Override public void checkSingleInstanceRunning(JNLPFile jnlpFile) { SingleInstanceLock lockFile = new SingleInstanceLock(jnlpFile); if (lockFile.isValid()) { @@ -134,9 +139,28 @@ if (JNLPRuntime.isDebug()) { System.out.println("Lock file is valid (port=" + port + "). Exiting."); } + + String[] args = null; + if (jnlpFile.isApplet()) { + // FIXME Proprietary plug-in is unclear about how to handle + // applets and their parameters. + //Right now better to forward at least something + Set> currentParams = jnlpFile.getApplet().getParameters().entrySet(); + args = new String[currentParams.size() * 2]; + int i = 0; + for (Entry entry : currentParams) { + args[i] = entry.getKey(); + args[i+1] = entry.getValue(); + i += 2; + } + } else if (jnlpFile.isInstaller()) { + // TODO Implement this once installer service is available. + } else { + args = jnlpFile.getApplication().getArguments(); + } + try { - sendProgramArgumentsToExistingApplication(port, jnlpFile.getApplication() - .getArguments()); + sendProgramArgumentsToExistingApplication(port, args); throw new InstanceExistsException(String.valueOf(port)); } catch (IOException e) { throw new RuntimeException(e); diff -r 855087771e7e -r 03803e23d0e6 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp Wed Sep 05 12:30:30 2012 +0200 @@ -0,0 +1,60 @@ + + + + + SingleInstanceApplet + IcedTea + + SingleInstanceApplet + + + + + + + + + + + \ No newline at end of file diff -r 855087771e7e -r 03803e23d0e6 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp Wed Sep 05 12:30:30 2012 +0200 @@ -0,0 +1,55 @@ + + + + + SingleInstanceAppletWS + IcedTea + + SingleInstanceAppletWS + + + + + + + + v7 + v8 + + \ No newline at end of file diff -r 855087771e7e -r 03803e23d0e6 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html Wed Sep 05 12:30:30 2012 +0200 @@ -0,0 +1,50 @@ + + + + + + + + + + diff -r 855087771e7e -r 03803e23d0e6 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html Wed Sep 05 12:30:30 2012 +0200 @@ -0,0 +1,47 @@ + + + + + + + + + + + diff -r 855087771e7e -r 03803e23d0e6 tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java Wed Sep 05 12:30:30 2012 +0200 @@ -0,0 +1,158 @@ +/* SingleInstanceChecker.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import java.applet.Applet; + +import javax.jnlp.SingleInstanceListener; +import javax.jnlp.SingleInstanceService; +import javax.jnlp.ServiceManager; +import javax.jnlp.UnavailableServiceException; + +public class SingleInstanceChecker extends Applet implements SingleInstanceListener { + + private SingleInstanceChecker self; + Killer killer; + + private static class Killer extends Thread { + + private int timeout; + private String timeoutText; + + public Killer() { + timeout = 5000; + timeoutText = Integer.toString(timeout); + } + + public Killer(int n) { + timeout = n; + timeoutText = Integer.toString(timeout); + } + + public Killer(int n, String s) { + timeout = n; + timeoutText = s; + } + + @Override + public void run() { + try { + Thread.sleep(timeout); + System.out.println("Applet killing itself after " + timeoutText + " ms of life"); + System.exit(0); + } catch (Exception ex) { + } + } + } + + public SingleInstanceChecker() { + self = this; + } + + private void proceed() { + + try { + SingleInstanceService testService = (SingleInstanceService) ServiceManager.lookup("javax.jnlp.SingleInstanceService"); + System.out.println("SingleInstanceChecker: Adding listener to service."); From jvanek at icedtea.classpath.org Wed Sep 5 03:58:18 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Wed, 05 Sep 2012 10:58:18 +0000 Subject: /hg/release/icedtea-web-1.3: Single instance support for jnlp-hr... Message-ID: changeset 2905e24a50bd in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=2905e24a50bd author: Jiri Vanek date: Wed Sep 05 12:58:30 2012 +0200 Single instance support for jnlp-href and tests diffstat: ChangeLog | 22 + netx/net/sourceforge/jnlp/Launcher.java | 19 + netx/net/sourceforge/jnlp/resources/Messages.properties | 1 + netx/net/sourceforge/jnlp/services/XSingleInstanceService.java | 38 +- tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp | 60 ++ tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp | 55 ++ tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html | 50 + tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html | 47 + tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java | 158 +++++ tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java | 265 ++++++++++ 10 files changed, 708 insertions(+), 7 deletions(-) diffs (truncated from 836 to 500 lines): diff -r a63733958565 -r 2905e24a50bd ChangeLog --- a/ChangeLog Mon Aug 27 15:32:08 2012 -0400 +++ b/ChangeLog Wed Sep 05 12:58:30 2012 +0200 @@ -1,3 +1,25 @@ +2012-09-04 Jiri Vanek + Danesh Dadachanji + + Single instance support for jnlp-href and tests + * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: + (initializeSingleInstance) fixed code for catching running instance + (checkSingleInstanceRunning) Added handling of parameters. + * netx/net/sourceforge/jnlp/Launcher.java: (launchApplication), + (launchApplet) Added debug output that instance is already running. + (getApplet) added check for services and debug output + * netx/net/sourceforge/jnlp/resources/Messages.properties: added + (LSingleInstanceExists) entry for exception. + tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp: + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html: + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html: + Applet and application in jnlp or html launching files. + * tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java + SingleInstance implementing applet/application + * tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java + Testfile for launching for above jnlps/htmls as testcases. + 2012-08-27 Deepak Bhole * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java diff -r a63733958565 -r 2905e24a50bd netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Mon Aug 27 15:32:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Sep 05 12:58:30 2012 +0200 @@ -536,6 +536,9 @@ try { ServiceUtil.checkExistingSingleInstance(file); } catch (InstanceExistsException e) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance application is already running."); + } return null; } @@ -653,11 +656,17 @@ throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); try { + ServiceUtil.checkExistingSingleInstance(file); AppletInstance applet = createApplet(file, enableCodeBase, cont); applet.initialize(); applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance return applet; + } catch (InstanceExistsException ieex) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance applet is already running."); + } + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); } catch (LaunchException lex) { throw launchError(lex); } catch (Exception ex) { @@ -673,9 +682,17 @@ throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); try { + ServiceUtil.checkExistingSingleInstance(file); + AppletInstance applet = createApplet(file, enableCodeBase, cont); applet.initialize(); return applet; + + } catch (InstanceExistsException ieex) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance applet is already running."); + } + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); } catch (LaunchException lex) { throw launchError(lex); } catch (Exception ex) { @@ -688,6 +705,8 @@ * a thread in the application's thread group. */ protected ApplicationInstance launchInstaller(JNLPFile file) throws LaunchException { + // TODO Check for an existing single instance once implemented. + // ServiceUtil.checkExistingSingleInstance(file); throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCNotSupported"), R("LNoInstallers"), R("LNoInstallersInfo"))); } diff -r a63733958565 -r 2905e24a50bd netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon Aug 27 15:32:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Sep 05 12:58:30 2012 +0200 @@ -83,6 +83,7 @@ LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file. LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing LCertFoundIn={0} found in cacerts ({1}) +LSingleInstanceExists=Another instance of this applet already exists and only one may be run at the same time. JNotApplet=File is not an applet. JNotApplication=File is not an application. diff -r a63733958565 -r 2905e24a50bd netx/net/sourceforge/jnlp/services/XSingleInstanceService.java --- a/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Mon Aug 27 15:32:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Wed Sep 05 12:58:30 2012 +0200 @@ -24,11 +24,14 @@ import java.net.UnknownHostException; import java.util.LinkedList; import java.util.List; +import java.util.Map.Entry; +import java.util.Set; import javax.jnlp.SingleInstanceListener; import javax.management.InstanceAlreadyExistsException; import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.PluginBridge; import net.sourceforge.jnlp.runtime.JNLPRuntime; /** @@ -104,13 +107,14 @@ * @throws InstanceAlreadyExistsException if the instance already exists */ public void initializeSingleInstance() { - if (!initialized) { - // this is called after the application has started. so safe to use - // JNLPRuntime.getApplication() - checkSingleInstanceRunning(JNLPRuntime.getApplication().getJNLPFile()); + // this is called after the application has started. so safe to use + // JNLPRuntime.getApplication() + JNLPFile jnlpFile = JNLPRuntime.getApplication().getJNLPFile(); + if (!initialized || jnlpFile instanceof PluginBridge) { + // Either a new process or a new applet being handled by the plugin. + checkSingleInstanceRunning(jnlpFile); initialized = true; SingleInstanceLock lockFile; - JNLPFile jnlpFile = JNLPRuntime.getApplication().getJNLPFile(); lockFile = new SingleInstanceLock(jnlpFile); if (!lockFile.isValid()) { startListeningServer(lockFile); @@ -127,6 +131,7 @@ * @throws InstanceExistsException if an instance of this application * already exists */ + @Override public void checkSingleInstanceRunning(JNLPFile jnlpFile) { SingleInstanceLock lockFile = new SingleInstanceLock(jnlpFile); if (lockFile.isValid()) { @@ -134,9 +139,28 @@ if (JNLPRuntime.isDebug()) { System.out.println("Lock file is valid (port=" + port + "). Exiting."); } + + String[] args = null; + if (jnlpFile.isApplet()) { + // FIXME Proprietary plug-in is unclear about how to handle + // applets and their parameters. + //Right now better to forward at least something + Set> currentParams = jnlpFile.getApplet().getParameters().entrySet(); + args = new String[currentParams.size() * 2]; + int i = 0; + for (Entry entry : currentParams) { + args[i] = entry.getKey(); + args[i+1] = entry.getValue(); + i += 2; + } + } else if (jnlpFile.isInstaller()) { + // TODO Implement this once installer service is available. + } else { + args = jnlpFile.getApplication().getArguments(); + } + try { - sendProgramArgumentsToExistingApplication(port, jnlpFile.getApplication() - .getArguments()); + sendProgramArgumentsToExistingApplication(port, args); throw new InstanceExistsException(String.valueOf(port)); } catch (IOException e) { throw new RuntimeException(e); diff -r a63733958565 -r 2905e24a50bd tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp Wed Sep 05 12:58:30 2012 +0200 @@ -0,0 +1,60 @@ + + + + + SingleInstanceApplet + IcedTea + + SingleInstanceApplet + + + + + + + + + + + \ No newline at end of file diff -r a63733958565 -r 2905e24a50bd tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp Wed Sep 05 12:58:30 2012 +0200 @@ -0,0 +1,55 @@ + + + + + SingleInstanceAppletWS + IcedTea + + SingleInstanceAppletWS + + + + + + + + v7 + v8 + + \ No newline at end of file diff -r a63733958565 -r 2905e24a50bd tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html Wed Sep 05 12:58:30 2012 +0200 @@ -0,0 +1,50 @@ + + + + + + + + + + diff -r a63733958565 -r 2905e24a50bd tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html Wed Sep 05 12:58:30 2012 +0200 @@ -0,0 +1,47 @@ + + + + + + + + + + + diff -r a63733958565 -r 2905e24a50bd tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java Wed Sep 05 12:58:30 2012 +0200 @@ -0,0 +1,158 @@ +/* SingleInstanceChecker.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import java.applet.Applet; + +import javax.jnlp.SingleInstanceListener; +import javax.jnlp.SingleInstanceService; +import javax.jnlp.ServiceManager; +import javax.jnlp.UnavailableServiceException; + +public class SingleInstanceChecker extends Applet implements SingleInstanceListener { + + private SingleInstanceChecker self; + Killer killer; + + private static class Killer extends Thread { + + private int timeout; + private String timeoutText; + + public Killer() { + timeout = 5000; + timeoutText = Integer.toString(timeout); + } + + public Killer(int n) { + timeout = n; + timeoutText = Integer.toString(timeout); + } + + public Killer(int n, String s) { + timeout = n; + timeoutText = s; + } + + @Override + public void run() { + try { + Thread.sleep(timeout); + System.out.println("Applet killing itself after " + timeoutText + " ms of life"); + System.exit(0); + } catch (Exception ex) { + } + } + } + + public SingleInstanceChecker() { + self = this; + } + + private void proceed() { + + try { + SingleInstanceService testService = (SingleInstanceService) ServiceManager.lookup("javax.jnlp.SingleInstanceService"); + System.out.println("SingleInstanceChecker: Adding listener to service."); + testService.addSingleInstanceListener(this); + System.out.println("SingleInstanceChecker: Listener added."); From jvanek at redhat.com Wed Sep 5 04:02:36 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 05 Sep 2012 13:02:36 +0200 Subject: [RFC][icedtea-web] Fix for single instance service with applets using jnlp_href In-Reply-To: <1346791681.6847.9.camel@adomurad-desktop> References: <4F2849F3.2030003@redhat.com> <4F5DD2F8.8000904@redhat.com> <4F5E2C2F.7090603@redhat.com> <4F912D3C.9080804@redhat.com> <4FB54921.1010106@redhat.com> <50369334.6000207@redhat.com> <50462FC1.9040806@redhat.com> <1346791681.6847.9.camel@adomurad-desktop> Message-ID: <5047314C.3090106@redhat.com> On 09/04/2012 10:48 PM, adomurad wrote: > Comments inline. > Thanx. Pushed to head and 1.3 >> So here is his patch with finished and test: >> ... >> + if (JNLPRuntime.isDebug()) { >> + System.out.println("Single instance applet is already running."); >> + } >> + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); > A new exception type for these calls (as you said) would probably be good. Not done - there is already InstanceRunning exception, and Danesh have wrapped it (see ieex above) So I'm considering it as more correct. >> } catch (LaunchException lex) { >> throw launchError(lex); ... >> + } >> + } >> + >> + //killer is started when params are recieved, or when application is running to long > recieved -> received :) (nit, non-blocker) >> + private void startKiller(int a) { >> + synchronized (self) { >> + if (killer == null) { ... >> + } >> + System.out.println("Paramaters received by SingleInstanceChecker:" + paramsString); > paramaters -> parameters in a few places (nit, non-blocker) Both fixed. Thanx >> >> + startKiller(1); >> + } ... >> + >> + } > I don't know how I feel about this main 'test'. I suppose theres no better place for it. Ok. Kept and moved to the Javadoc of main method (as You wished?) Removed from bottom where you didnt like it. >> + /** >> + *Passed /SingleInstanceTest.jnlp x /SingleInstanceTest.jnlp >> + *Passed /SingleInstanceTest.jnlp x /SingleInstanceTestWS.jnlp >> + *FAILED /SingleInstanceTest.jnlp x /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTest.jnlp x /SingleInstanceTest_clasical.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *Passed /SingleInstanceTestWS.jnlp x /SingleInstanceTest.jnlp >> + *Passed /SingleInstanceTestWS.jnlp x /SingleInstanceTestWS.jnlp >> + *java.lang.NoSuchMethodException: SingleInstanceTest.access$000() >> + *FAILED /SingleInstanceTestWS.jnlp x /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTestWS.jnlp x /SingleInstanceTest_clasical.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTest_jnlpHref.html x /SingleInstanceTest.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTest_jnlpHref.html x /SingleInstanceTestWS.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *Passed /SingleInstanceTest_jnlpHref.html x /SingleInstanceTest_jnlpHref.html >> + *FAILED /SingleInstanceTest_jnlpHref.html x /SingleInstanceTest_clasical.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTest_clasical.html x /SingleInstanceTest.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTest_clasical.html x /SingleInstanceTestWS.jnlp - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *FAILED /SingleInstanceTest_clasical.html x /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: SingleInstanceTest.main's first PR stdout should contain Paramaters received by SingleInstanceChecker but didn't >> + *Passed /SingleInstanceTest_clasical.html x /SingleInstanceTest_clasical.html >> + */ >> +} > Please put a comment on the top of this block or remove it ... its > rather confusing to see when skimming the test. > > Fine to push assuming tests pass - the only thing that I really want > changed before pushing is a comment before the block of Pass/FAIL's, or > its removal. Exception could be good to add too but its up to you. Yap they are passing everywhere except epiphany in f16 (whic is ignoring --new-tab) > From ptisnovs at redhat.com Wed Sep 5 04:28:41 2012 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Wed, 5 Sep 2012 07:28:41 -0400 (EDT) Subject: [rfc][icedtea-web] multiple applets on one page tests In-Reply-To: <5044C8C0.4030607@redhat.com> Message-ID: <773579493.4143163.1346844521682.JavaMail.root@redhat.com> Hi Jiri, these new tests look ok. Just a minor issue - you left the line containing only single semicolon in two applet sources: + if (args.length > 0) { + counter = new Integer(args[0]); + ; <--- is it necessary? :) + } Regardless of this issue (feel free to fix/don't fix it) I'm ok with pushing these test to HEAD. Thanks, Pavel ----- Jiri Vanek wrote: > This set of tests was ordered by Pavel, so here it is. All test are green :) The most expected one > was the one which was testing exit from applet when other was/was not running. > > > > 2012-09-03 Jiri Vanek > > * tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java: > Signed applet painting to canvas and periodically printing out counted messages > * tests/reproducers/signed2/AppletTestSigned2/srcs/AppletTestSigned2: > Second simple signed applet for testing two different simple ones parallel > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1E_x_2s.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_1.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2E.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2e.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2sk.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1e_x_2s.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1k_x_2.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2s.html: > * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2ss.html: > Various combinations of plain, signed, crashing, exception throwing and > exiting applets on single web-page > * tests/reproducers/simple/CountingApplet1/srcs/CountingApplet1.java: > Simple applet painting to canvas and periodically printing out counted messages > * tests/reproducers/simple/CountingApplet1/testcases/ParallelAppletsTest.java: > testcases launching above html files. > * tests/reproducers/simple/CountingApplet2/srcs/CountingApplet2.java: > Second simple applet painting to canvas and periodically printing out counted messages > * tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java: Enhanced > exception throwing reproducer. From ptisnovs at redhat.com Wed Sep 5 04:50:37 2012 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Wed, 5 Sep 2012 07:50:37 -0400 (EDT) Subject: [fyi][icedtea-web] fixed reproducer engine for better reproducing of PR905 In-Reply-To: <5044C8BB.1030401@redhat.com> Message-ID: <2028609032.4157083.1346845837517.JavaMail.root@redhat.com> Hi Jiri, in overall I think this fix is ok, but I have some objections (as usual :-): 1) should be cteateCodeBase according to Java code style: + private void createCodeBAse(String originalResourceName, String newResourceName, URL codebase) throws MalformedURLException, IOException { 2) s/to strict/too strict: +// to strict! 3) s/Ctreate/Create 4) there's wrong indentation on the third line (Ctrl+Shift+F in Eclipse, gg=G in Vim :) + public URL getUrlUponThisInstance(String resource) throws MalformedURLException { + getInstance(); + return getUrlUponInstance(server,resource); + } 5) missing spaces before and after = + p=p.replaceAll("\\?.*", ""); If this minor issues were fixed, I'm ok with pushing to HEAD. Thank you, Pavel ----- Jiri Vanek wrote: > I had an flaw in processing of "?" query in test-engine. Here I'm fixing it with enhanced pr905 > testcase and other minor clean-ups in engine. > > this should go to head and 1.3 > > 2012-09-03 Jiri Vanek > > Fixing several errors which were causing incorrect behaviour causing > correct reproduction of PR905 > * tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.htm > Using different jar for reproducing > * tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java > Added tests for hardcoded codebase (same and different) > enhanced original PR905 reproducers > * tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java: > added flush for logs > * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: cleaned > and enhanced getUrl* methods. > * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: delegated > socket > * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: fixed > processing of question mark. From andrew at icedtea.classpath.org Wed Sep 5 06:15:07 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 05 Sep 2012 13:15:07 +0000 Subject: /hg/release/icedtea6-1.10: Remove the autoconf Xp header and lib... Message-ID: changeset d64dd8e0811e in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=d64dd8e0811e author: doko at ubuntu.com date: Wed Sep 05 11:43:29 2012 +0200 Remove the autoconf Xp header and library checks. 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diffstat: ChangeLog | 4 ++++ configure.ac | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diffs (31 lines): diff -r 392687831ddb -r d64dd8e0811e ChangeLog --- a/ChangeLog Mon Sep 03 14:16:38 2012 +0100 +++ b/ChangeLog Wed Sep 05 11:43:29 2012 +0200 @@ -1,3 +1,7 @@ +2012-09-05 Matthias Klose + + * configure.ac: Remove the Xp header and library checks. + 2011-09-03 Andrew John Hughes * configure.ac: Bump to 1.10.10pre. diff -r 392687831ddb -r d64dd8e0811e configure.ac --- a/configure.ac Mon Sep 03 14:16:38 2012 +0100 +++ b/configure.ac Wed Sep 05 11:43:29 2012 +0200 @@ -221,16 +221,6 @@ AC_SUBST(XT_CFLAGS) AC_SUBST(XT_LIBS) -dnl Check for libXp headers and libraries. -PKG_CHECK_MODULES(XP, xp,[XP_FOUND=yes],[XP_FOUND=no]) -if test "x${XP_FOUND}" = xno -then - AC_MSG_ERROR([Could not find Xp - \ - Try installing libXp-devel.]) -fi -AC_SUBST(XP_CFLAGS) -AC_SUBST(XP_LIBS) - dnl Check for libX11 headers and libraries. PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no]) if test "x${X11_FOUND}" = xno From jvanek at icedtea.classpath.org Wed Sep 5 06:46:52 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Wed, 05 Sep 2012 13:46:52 +0000 Subject: /hg/icedtea-web: Added multiple-applets tests Message-ID: changeset b61292f73b60 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=b61292f73b60 author: Jiri Vanek date: Wed Sep 05 15:46:56 2012 +0200 Added multiple-applets tests diffstat: ChangeLog | 28 + tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java | 110 ++++ tests/reproducers/signed2/AppletTestSigned2/srcs/AppletTestSigned2.java | 62 ++ tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1E_x_2s.html | 44 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_1.html | 44 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2.html | 44 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2E.html | 44 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2e.html | 44 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2sk.html | 45 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1e_x_2s.html | 44 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1k_x_2.html | 45 + tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2.html | 48 ++ tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2s.html | 48 ++ tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2ss.html | 44 + tests/reproducers/simple/CountingApplet1/srcs/CountingApplet1.java | 109 ++++ tests/reproducers/simple/CountingApplet1/testcases/ParallelAppletsTest.java | 227 ++++++++++ tests/reproducers/simple/CountingApplet2/srcs/CountingApplet2.java | 109 ++++ tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java | 30 +- 18 files changed, 1166 insertions(+), 3 deletions(-) diffs (truncated from 1255 to 500 lines): diff -r 03803e23d0e6 -r b61292f73b60 ChangeLog --- a/ChangeLog Wed Sep 05 12:30:30 2012 +0200 +++ b/ChangeLog Wed Sep 05 15:46:56 2012 +0200 @@ -1,3 +1,31 @@ +2012-09-05 Jiri Vanek + + * tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java: + Signed applet painting to canvas and periodically printing out counted messages + * tests/reproducers/signed2/AppletTestSigned2/srcs/AppletTestSigned2: + Second simple signed applet for testing two different simple ones parallel + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1E_x_2s.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_1.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2E.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2e.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2sk.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1e_x_2s.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1k_x_2.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2s.html: + * tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1s_x_2ss.html: + Various combinations of plain, signed, crashing, exception throwing and + exiting applets on single web-page + * tests/reproducers/simple/CountingApplet1/srcs/CountingApplet1.java: + Simple applet painting to canvas and periodically printing out counted messages + * tests/reproducers/simple/CountingApplet1/testcases/ParallelAppletsTest.java: + testcases launching above html files. + * tests/reproducers/simple/CountingApplet2/srcs/CountingApplet2.java: + Second simple applet painting to canvas and periodically printing out counted messages + * tests/reproducers/simple/simpletest2/srcs/SimpleTest2.java: Enhanced + exception throwing reproducer. + 2012-09-04 Jiri Vanek Danesh Dadachanji diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,110 @@ + +import java.applet.Applet; +import java.awt.BorderLayout; +import javax.swing.JLabel; +import javax.swing.SwingUtilities; + +/* CountingAppletSigned.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +public class CountingAppletSigned extends Applet { + + public static void main(String[] args) throws InterruptedException { + Integer counter = null; + if (args.length > 0) { + counter = new Integer(args[0]); + ; + } + int i = 0; + while (true) { + System.out.println("counting... " + i); + if (counter != null && i == counter.intValue()) { + System.exit(-i); + } + i++; + Thread.sleep(1000); + } + } + + @Override + public void init() { + System.out.println("applet was initialised"); + final CountingAppletSigned self = this; + SwingUtilities.invokeLater(new Runnable() { + + @Override + public void run() { + self.setLayout(new BorderLayout()); + self.add(new JLabel("S")); + self.validateTree(); + self.repaint(); + } + }); + } + + @Override + public void start() { + System.out.println("applet was started"); + String s = getParameter("kill"); + final String[] params; + if (s != null) { + params = new String[]{s}; + } else { + params = new String[0]; + } + new Thread(new Runnable() { + + @Override + public void run() { + try { + main(params); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + }).start(); + } + + @Override + public void stop() { + System.out.println("applet was stopped"); + } + + @Override + public void destroy() { + System.out.println("applet will be destroyed"); + } +} diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/signed2/AppletTestSigned2/srcs/AppletTestSigned2.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed2/AppletTestSigned2/srcs/AppletTestSigned2.java Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,62 @@ +/* AppletTestSigned2.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import java.applet.Applet; + +public class AppletTestSigned2 extends Applet { + + + @Override + public void init() { + System.out.println("AppletTestSigned2 was initialised"); + } + + @Override + public void start() { + System.out.println("AppletTestSigned2 was started"); + } + + @Override + public void stop() { + System.out.println("AppletTestSigned2 was stopped"); + } + + @Override + public void destroy() { + System.out.println("AppletTestSigned2 will be destroyed"); + } +} diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1E_x_2s.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1E_x_2s.html Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,44 @@ + + +

+

+

+

+ + diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_1.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_1.html Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,44 @@ + + +

+

+

+

+ + diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2.html Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,44 @@ + + +

+

+

+

+ + diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2E.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2E.html Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,44 @@ + + +

+

+

+

+ + diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2e.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2e.html Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,44 @@ + + +

+

+

+

+ + diff -r 03803e23d0e6 -r b61292f73b60 tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2sk.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/CountingApplet1/resources/ParallelAppletsTest_1_x_2sk.html Wed Sep 05 15:46:56 2012 +0200 @@ -0,0 +1,45 @@ + + +

+

+

From jvanek at icedtea.classpath.org Wed Sep 5 07:02:03 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Wed, 05 Sep 2012 14:02:03 +0000 Subject: /hg/icedtea-web: Fixing several errors which were causing incorr... Message-ID: changeset 4d8eccca14ed in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=4d8eccca14ed author: Jiri Vanek date: Wed Sep 05 16:02:18 2012 +0200 Fixing several errors which were causing incorrect behaviour causing correct reproduction of PR905 diffstat: ChangeLog | 18 ++ tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.html | 2 +- tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java | 83 +++++++-- tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java | 3 + tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 18 +- tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java | 22 ++- tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java | 5 +- 7 files changed, 120 insertions(+), 31 deletions(-) diffs (294 lines): diff -r b61292f73b60 -r 4d8eccca14ed ChangeLog --- a/ChangeLog Wed Sep 05 15:46:56 2012 +0200 +++ b/ChangeLog Wed Sep 05 16:02:18 2012 +0200 @@ -1,3 +1,21 @@ +2012-09-05 Jiri Vanek + + Fixing several errors which were causing incorrect behaviour causing + correct reproduction of PR905 + * tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.htm + Using different jar for reproducing + * tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java + Added tests for hardcoded codebase (same and different) + enhanced original PR905 reproducers + * tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java: + added flush for logs + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: cleaned + and enhanced getUrl* methods. + * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: delegated + socket + * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: fixed + processing of question mark. + 2012-09-05 Jiri Vanek * tests/reproducers/signed/CountingAppletSigned/srcs/CountingAppletSigned.java: diff -r b61292f73b60 -r 4d8eccca14ed tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.html --- a/tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.html Wed Sep 05 15:46:56 2012 +0200 +++ b/tests/reproducers/simple/ParametrizedJarUrl/resources/ParametrizedJarUrlSigned.html Wed Sep 05 16:02:18 2012 +0200 @@ -36,7 +36,7 @@ --> -

+

diff -r b61292f73b60 -r 4d8eccca14ed tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java --- a/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java Wed Sep 05 15:46:56 2012 +0200 +++ b/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java Wed Sep 05 16:02:18 2012 +0200 @@ -35,27 +35,76 @@ exception statement from your version. */ +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; import java.util.Arrays; import java.util.Collections; import java.util.List; import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.ServerLauncher; import net.sourceforge.jnlp.annotations.Bug; import net.sourceforge.jnlp.annotations.TestInBrowsers; import net.sourceforge.jnlp.browsertesting.BrowserTest; import net.sourceforge.jnlp.browsertesting.Browsers; -import net.sourceforge.jnlp.annotations.KnownToFail; import org.junit.Assert; import org.junit.Test; -/** - * set of tests to reproduce PR905 behaviour - */ public class ParametrizedJarUrlTests extends BrowserTest{ private final List l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"})); @Test + @TestInBrowsers(testIn = Browsers.one) + @Bug(id = "PR905") + public void parametrizedAppletTestSignedBrowserTest_hardcodedDifferentCodeBase() throws Exception { + ServerLauncher server2 = ServerAccess.getIndependentInstance(); + String originalResourceName = "ParametrizedJarUrlSigned.html"; + String newResourceName = "ParametrizedJarUrlSigned_COPY2.html"; + createCodeBAse(originalResourceName, newResourceName, server2.getUrl("")); + //set codebase to second server + ProcessResult pr = server.executeBrowser(newResourceName); + server2.stop(); + evaluateSignedApplet(pr); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + @Bug(id = "PR905") + public void parametrizedAppletTestSignedBrowserTest_hardcodedCodeBase() throws Exception { + String originalResourceName = "ParametrizedJarUrlSigned.html"; + String newResourceName = "ParametrizedJarUrlSigned_COPY1.html"; + createCodeBAse(originalResourceName, newResourceName, server.getUrl("")); + ProcessResult pr = server.executeBrowser(newResourceName); + evaluateSignedApplet(pr); + } + + private void createCodeBAse(String originalResourceName, String newResourceName, URL codebase) throws MalformedURLException, IOException { + String originalContent = ServerAccess.getContentOfStream(new FileInputStream(new File(server.getDir(), originalResourceName))); + String nwContent = originalContent.replaceAll("codebase=\".\"", "codebase=\"" + codebase + "\""); + ServerAccess.saveFile(nwContent, new File(server.getDir(), newResourceName)); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + @Bug(id = "PR905") + public void parametrizedAppletTestSignedBrowserTest() throws Exception { + ProcessResult pr = server.executeBrowser("/ParametrizedJarUrlSigned.html"); + evaluateSignedApplet(pr); + } + + @Test + @TestInBrowsers(testIn=Browsers.one) + public void parametrizedAppletInBrowserWithParamTest() throws Exception { + ProcessResult pr = server.executeBrowser("/ParametrizedJarUrl.html?giveMeMore?orNot"); + evaluateApplet(pr); + } + + @Test public void parametrizedAppletJavawsTest() throws Exception { ProcessResult pr = server.executeJavawsHeadless(null, "/ParametrizedJarAppletUrl2.jnlp"); evaluateApplet(pr); @@ -100,26 +149,18 @@ Assert.assertTrue("AppletTestSigned stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1)); String s2 = "value2"; Assert.assertTrue("AppletTestSigned stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2)); - String s4 = "AppletTestSigned was stopped"; - Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s4 + " but did", pr.stdout.contains(s4)); - String s5 = "AppletTestSigned will be destroyed"; - Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s5 + " but did", pr.stdout.contains(s5)); - String ss = "xception"; - Assert.assertFalse("AppletTestSigned stderr should not contains " + ss + " but did", pr.stderr.contains(ss)); +// to strict! +// String s4 = "AppletTestSigned was stopped"; +// Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s4 + " but did", pr.stdout.contains(s4)); +// String s5 = "AppletTestSigned will be destroyed"; +// Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s5 + " but did", pr.stdout.contains(s5)); +// String ss = "xception"; +// Assert.assertFalse("AppletTestSigned stderr should not contains " + ss + " but did", pr.stderr.contains(ss)); String s7 = "AppletTestSigned killing himself after 2000 ms of life"; Assert.assertTrue("AppletTestSigned stdout should contain " + s7 + " but didn't", pr.stdout.contains(s7)); } - @Test - @TestInBrowsers(testIn=Browsers.all) - @Bug(id="PR905") - @KnownToFail - public void parametrizedAppletTestSignedBrowserTest() throws Exception { - ProcessResult pr = server.executeBrowser("/ParametrizedJarUrlSigned.html"); - pr.process.destroy(); - evaluateSignedApplet(pr); - } - + @Test public void testParametrizedJarUrlSigned1() throws Exception { ProcessResult pr = server.executeJavawsHeadless(l, "/ParametrizedJarUrlSigned1.jnlp"); @@ -196,7 +237,7 @@ } @Test - @TestInBrowsers(testIn=Browsers.all) + @TestInBrowsers(testIn=Browsers.one) public void parametrizedAppletInBrowserTest() throws Exception { ProcessResult pr = server.executeBrowser("/ParametrizedJarUrl.html"); pr.process.destroy(); diff -r b61292f73b60 -r 4d8eccca14ed tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java --- a/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java Wed Sep 05 15:46:56 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java Wed Sep 05 16:02:18 2012 +0200 @@ -201,15 +201,18 @@ private void stdout(String idded) throws IOException { DEFAULT_STDOUT_WRITER.write(idded); DEFAULT_STDOUT_WRITER.newLine(); + DEFAULT_STDOUT_WRITER.flush(); } private void stderr(String idded) throws IOException { DEFAULT_STDERR_WRITER.write(idded); DEFAULT_STDERR_WRITER.newLine(); + DEFAULT_STDERR_WRITER.flush(); } private void stdeall(String idded) throws IOException { DEFAULT_STDLOGS_WRITER.write(idded); DEFAULT_STDLOGS_WRITER.newLine(); + DEFAULT_STDLOGS_WRITER.flush(); } } diff -r b61292f73b60 -r 4d8eccca14ed tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Wed Sep 05 15:46:56 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Wed Sep 05 16:02:18 2012 +0200 @@ -585,16 +585,24 @@ } /** + * Ctreate resource on http, on 'localhost' on port on which this cached instance is running + * @param resource + * @return + * @throws MalformedURLException + */ + public URL getUrlUponThisInstance(String resource) throws MalformedURLException { + getInstance(); + return getUrlUponInstance(server,resource); + } + + /** * Ctreate resource on http, on 'localhost' on port on which this instance is running * @param resource * @return * @throws MalformedURLException */ - public URL getUrlUponThisInstance(String resource) throws MalformedURLException { - if (!resource.startsWith("/")) { - resource = "/" + resource; - } - return new URL("http", server.getServerName(), getPort(), resource); + public static URL getUrlUponInstance(ServerLauncher instance,String resource) throws MalformedURLException { + return instance.getUrl(resource); } /** diff -r b61292f73b60 -r 4d8eccca14ed tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java Wed Sep 05 15:46:56 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java Wed Sep 05 16:02:18 2012 +0200 @@ -56,6 +56,7 @@ private boolean running; private final Integer port; private final File dir; + private ServerSocket serverSocket; public String getServerName() { return serverName; @@ -99,9 +100,9 @@ public void run() { running = true; try { - ServerSocket s = new ServerSocket(port); + serverSocket = new ServerSocket(port); while (running) { - new TinyHttpdImpl(s.accept(), dir, port); + new TinyHttpdImpl(serverSocket.accept(), dir, port); } } catch (Exception e) { e.printStackTrace(); @@ -111,10 +112,27 @@ } public URL getUrl(String resource) throws MalformedURLException { + if (resource == null) { + resource = ""; + } + if (resource.trim().length() > 0 && !resource.startsWith("/")) { + resource = "/" + resource; + } return new URL("http", getServerName(), getPort(), resource); } public URL getUrl() throws MalformedURLException { return getUrl(""); } + + public void stop() { + this.running = false; + if (serverSocket != null) { + try { + serverSocket.close(); + } catch (Exception ex) { + ServerAccess.logException(ex); + } + } + } } diff -r b61292f73b60 -r 4d8eccca14ed tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java --- a/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java Wed Sep 05 15:46:56 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java Wed Sep 05 16:02:18 2012 +0200 @@ -99,8 +99,9 @@ } ServerAccess.logNoReprint("Getting: " + p); p = URLDecoder.decode(p, "UTF-8"); + p=p.replaceAll("\\?.*", ""); + p = (".".concat((p.endsWith("/")) ? p.concat("index.html") : p)).replace('/', File.separatorChar); ServerAccess.logNoReprint("Serving: " + p); - p = (".".concat((p.endsWith("/")) ? p.concat("index.html") : p)).replace('/', File.separatorChar); File pp = new File(dir, p); int l = (int) pp.length(); byte[] b = new byte[l]; @@ -115,7 +116,7 @@ } else if (p.toLowerCase().endsWith(".jar")) { content = ct + "application/x-jar\n"; } - o.writeBytes("HTTP/1.0 200 OK\nConten" + "t-Length:" + l + "\n" + content + "\n"); + o.writeBytes("HTTP/1.0 200 OK\nContent-Length:" + l + "\n" + content + "\n"); if (op.startsWith(XSX)) { byte[][] bb = splitArray(b, 10); for (int j = 0; j < bb.length; j++) { From jvanek at icedtea.classpath.org Wed Sep 5 07:09:34 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Wed, 05 Sep 2012 14:09:34 +0000 Subject: /hg/release/icedtea-web-1.3: Fixing several errors which were ca... Message-ID: changeset b26d52214ed6 in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=b26d52214ed6 author: Jiri Vanek date: Wed Sep 05 16:09:40 2012 +0200 Fixing several errors which were causing incorrect behaviour causing correct reproduction of PR905 diffstat: ChangeLog | 13 +++++ tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java | 3 + tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 18 +++++-- tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java | 22 +++++++++- tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java | 5 +- 5 files changed, 52 insertions(+), 9 deletions(-) diffs (149 lines): diff -r 2905e24a50bd -r b26d52214ed6 ChangeLog --- a/ChangeLog Wed Sep 05 12:58:30 2012 +0200 +++ b/ChangeLog Wed Sep 05 16:09:40 2012 +0200 @@ -1,3 +1,16 @@ +2012-09-05 Jiri Vanek + + Fixing several errors which were causing incorrect behaviour causing + correct reproduction of PR905 + * tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java: + added flush for logs + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: cleaned + and enhanced getUrl* methods. + * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: delegated + socket + * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: fixed + processing of question mark. + 2012-09-04 Jiri Vanek Danesh Dadachanji diff -r 2905e24a50bd -r b26d52214ed6 tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java --- a/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java Wed Sep 05 12:58:30 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java Wed Sep 05 16:09:40 2012 +0200 @@ -201,15 +201,18 @@ private void stdout(String idded) throws IOException { DEFAULT_STDOUT_WRITER.write(idded); DEFAULT_STDOUT_WRITER.newLine(); + DEFAULT_STDOUT_WRITER.flush(); } private void stderr(String idded) throws IOException { DEFAULT_STDERR_WRITER.write(idded); DEFAULT_STDERR_WRITER.newLine(); + DEFAULT_STDERR_WRITER.flush(); } private void stdeall(String idded) throws IOException { DEFAULT_STDLOGS_WRITER.write(idded); DEFAULT_STDLOGS_WRITER.newLine(); + DEFAULT_STDLOGS_WRITER.flush(); } } diff -r 2905e24a50bd -r b26d52214ed6 tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Wed Sep 05 12:58:30 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Wed Sep 05 16:09:40 2012 +0200 @@ -585,16 +585,24 @@ } /** + * Ctreate resource on http, on 'localhost' on port on which this cached instance is running + * @param resource + * @return + * @throws MalformedURLException + */ + public URL getUrlUponThisInstance(String resource) throws MalformedURLException { + getInstance(); + return getUrlUponInstance(server,resource); + } + + /** * Ctreate resource on http, on 'localhost' on port on which this instance is running * @param resource * @return * @throws MalformedURLException */ - public URL getUrlUponThisInstance(String resource) throws MalformedURLException { - if (!resource.startsWith("/")) { - resource = "/" + resource; - } - return new URL("http", server.getServerName(), getPort(), resource); + public static URL getUrlUponInstance(ServerLauncher instance,String resource) throws MalformedURLException { + return instance.getUrl(resource); } /** diff -r 2905e24a50bd -r b26d52214ed6 tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java Wed Sep 05 12:58:30 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java Wed Sep 05 16:09:40 2012 +0200 @@ -56,6 +56,7 @@ private boolean running; private final Integer port; private final File dir; + private ServerSocket serverSocket; public String getServerName() { return serverName; @@ -99,9 +100,9 @@ public void run() { running = true; try { - ServerSocket s = new ServerSocket(port); + serverSocket = new ServerSocket(port); while (running) { - new TinyHttpdImpl(s.accept(), dir, port); + new TinyHttpdImpl(serverSocket.accept(), dir, port); } } catch (Exception e) { e.printStackTrace(); @@ -111,10 +112,27 @@ } public URL getUrl(String resource) throws MalformedURLException { + if (resource == null) { + resource = ""; + } + if (resource.trim().length() > 0 && !resource.startsWith("/")) { + resource = "/" + resource; + } return new URL("http", getServerName(), getPort(), resource); } public URL getUrl() throws MalformedURLException { return getUrl(""); } + + public void stop() { + this.running = false; + if (serverSocket != null) { + try { + serverSocket.close(); + } catch (Exception ex) { + ServerAccess.logException(ex); + } + } + } } diff -r 2905e24a50bd -r b26d52214ed6 tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java --- a/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java Wed Sep 05 12:58:30 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java Wed Sep 05 16:09:40 2012 +0200 @@ -99,8 +99,9 @@ } ServerAccess.logNoReprint("Getting: " + p); p = URLDecoder.decode(p, "UTF-8"); + p=p.replaceAll("\\?.*", ""); + p = (".".concat((p.endsWith("/")) ? p.concat("index.html") : p)).replace('/', File.separatorChar); ServerAccess.logNoReprint("Serving: " + p); - p = (".".concat((p.endsWith("/")) ? p.concat("index.html") : p)).replace('/', File.separatorChar); File pp = new File(dir, p); int l = (int) pp.length(); byte[] b = new byte[l]; @@ -115,7 +116,7 @@ } else if (p.toLowerCase().endsWith(".jar")) { content = ct + "application/x-jar\n"; } - o.writeBytes("HTTP/1.0 200 OK\nConten" + "t-Length:" + l + "\n" + content + "\n"); + o.writeBytes("HTTP/1.0 200 OK\nContent-Length:" + l + "\n" + content + "\n"); if (op.startsWith(XSX)) { byte[][] bb = splitArray(b, 10); for (int j = 0; j < bb.length; j++) { From bugzilla-daemon at icedtea.classpath.org Wed Sep 5 09:13:49 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 05 Sep 2012 16:13:49 +0000 Subject: [Bug 1154] Minecraft wont play in the browser In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1154 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smohammad at redhat.com --- Comment #1 from Saad Mohammad --- I have confirmed this behaviour with IcedTea-Web 1.2 on Linux Mint 13 Maya 64bit. This is the log from Firefox: mint at mint ~/Desktop/ $ firefox java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.12.04.1) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at net.minecraft.GameUpdater$2.getPermissions(GameUpdater.java:320) at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:210) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at net.minecraft.GameUpdater.createApplet(GameUpdater.java:373) at net.minecraft.Launcher$1.run(Launcher.java:79) Caused by: java.lang.NullPointerException at net.sourceforge.jnlp.runtime.JNLPClassLoader.getPermissions(JNLPClassLoader.java:915) ... 16 more java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at net.minecraft.GameUpdater$2.getPermissions(GameUpdater.java:320) at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:210) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at net.minecraft.client.MinecraftApplet.init(SourceFile:36) at net.minecraft.Launcher.replace(Launcher.java:136) at net.minecraft.Launcher$1.run(Launcher.java:79) Caused by: java.lang.NullPointerException at net.sourceforge.jnlp.runtime.JNLPClassLoader.getPermissions(JNLPClassLoader.java:915) ... 17 more Exception in thread "Thread-13" java.lang.ExceptionInInitializerError at net.minecraft.client.Minecraft.F(SourceFile:1857) at aof.(SourceFile:20) at net.minecraft.client.Minecraft.(SourceFile:77) at anw.(SourceFile:36) at net.minecraft.client.MinecraftApplet.init(SourceFile:36) at net.minecraft.Launcher.replace(Launcher.java:136) at net.minecraft.Launcher$1.run(Launcher.java:79) Caused by: java.lang.NullPointerException at net.sourceforge.jnlp.runtime.JNLPClassLoader.getPermissions(JNLPClassLoader.java:915) at net.sourceforge.jnlp.runtime.JNLPPolicy.getPermissions(JNLPPolicy.java:86) at net.sourceforge.jnlp.runtime.JNLPPolicy.implies(JNLPPolicy.java:182) at java.security.ProtectionDomain.implies(ProtectionDomain.java:240) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:371) at java.security.AccessController.checkPermission(AccessController.java:553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:284) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302) at java.lang.System.getProperty(System.java:669) at org.lwjgl.LWJGLUtil$2.run(LWJGLUtil.java:402) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.LWJGLUtil.getPrivilegedProperty(LWJGLUtil.java:400) at org.lwjgl.LWJGLUtil.getPlatform(LWJGLUtil.java:282) at org.lwjgl.Sys.createImplementation(Sys.java:109) at org.lwjgl.Sys.(Sys.java:97) ... 7 more java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at net.minecraft.GameUpdater$2.getPermissions(GameUpdater.java:320) at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:210) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at net.minecraft.GameUpdater.createApplet(GameUpdater.java:373) at net.minecraft.Launcher$1.run(Launcher.java:79) Caused by: java.lang.NullPointerException at net.sourceforge.jnlp.runtime.JNLPClassLoader.getPermissions(JNLPClassLoader.java:915) ... 16 more java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at net.minecraft.GameUpdater$2.getPermissions(GameUpdater.java:320) at java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:210) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) at net.minecraft.client.MinecraftApplet.init(SourceFile:36) at net.minecraft.Launcher.replace(Launcher.java:136) at net.minecraft.Launcher$1.run(Launcher.java:79) Caused by: java.lang.NullPointerException at net.sourceforge.jnlp.runtime.JNLPClassLoader.getPermissions(JNLPClassLoader.java:915) ... 17 more Exception in thread "Thread-20" java.lang.ExceptionInInitializerError at net.minecraft.client.Minecraft.F(SourceFile:1857) at aof.(SourceFile:20) at net.minecraft.client.Minecraft.(SourceFile:77) at anw.(SourceFile:36) at net.minecraft.client.MinecraftApplet.init(SourceFile:36) at net.minecraft.Launcher.replace(Launcher.java:136) at net.minecraft.Launcher$1.run(Launcher.java:79) Caused by: java.lang.NullPointerException at net.sourceforge.jnlp.runtime.JNLPClassLoader.getPermissions(JNLPClassLoader.java:915) at net.sourceforge.jnlp.runtime.JNLPPolicy.getPermissions(JNLPPolicy.java:86) at net.sourceforge.jnlp.runtime.JNLPPolicy.implies(JNLPPolicy.java:182) at java.security.ProtectionDomain.implies(ProtectionDomain.java:240) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:371) at java.security.AccessController.checkPermission(AccessController.java:553) at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:284) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1302) at java.lang.System.getProperty(System.java:669) at org.lwjgl.LWJGLUtil$2.run(LWJGLUtil.java:402) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.LWJGLUtil.getPrivilegedProperty(LWJGLUtil.java:400) at org.lwjgl.LWJGLUtil.getPlatform(LWJGLUtil.java:282) at org.lwjgl.Sys.createImplementation(Sys.java:109) at org.lwjgl.Sys.(Sys.java:97) ... 7 more -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120905/379f8d41/attachment.html From smohammad at redhat.com Wed Sep 5 12:54:04 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Wed, 05 Sep 2012 15:54:04 -0400 Subject: [RFC][icedtea-web]: Added signed jnlp tests for applications using multiple jars In-Reply-To: <1344888329.19536.29.camel@voip-10-15-18-79.yyz.redhat.com> References: <4FF4B022.2000608@redhat.com> <1342557461.15784.16.camel@linux-laptop> <500EF833.9040509@redhat.com> <1344888329.19536.29.camel@voip-10-15-18-79.yyz.redhat.com> Message-ID: <5047ADDC.9020702@redhat.com> On 08/13/2012 04:05 PM, Adam Domurad wrote: > I'm afraid you'll have to elaborate on this because I'm not aware of > when jnlp files are classified as signed. Hi Adam, Sorry for the late reply and all the confusion. I updated the patch with major changes that includes additional comments and better file names. I think this patch will be much easier to understand. Sorry again for the confusion. The purpose of these tests, in the simplest form, is to ensure _only_ the main jar (jar with the main class) is checked (and correctly validated) for a signed jnlp file. This test covers three grounds: 1) Main jar with a signed jnlp application is correctly validated, ignoring the other jars that may have a signed jnlp file. 2) Main jar with a signed jnlp application_template is correctly validated with same rules as above. 3) Signed jnlp file check is skipped and ignored with an application that's main jar does not contain any signed jnlp file, _but_ other jars do. I am using reflection with 3 different classes to ensures that other jars with the required classes are correctly loaded during runtime. I hope this clear things out. Please let me know if you have any other questions. Changelog: 2012-09-05 Saad Mohammad Added signed jnlp tests for applications with multiple jar resources. * tests/reproducers/signed/MultiJar-NoSignedJnlp/resources/MainJarWithoutSignedJnlp.jnlp: Launching jnlp file that's main jar does not have a signed jnlp file, but other jar resources do. * tests/reproducers/signed/MultiJar-NoSignedJnlp/srcs/SimpleApplication.java: A class that uses reflection to access resources from different jars. * tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithMatchingSignedJnlpApplication.jnlp: Launching jnlp file that's main jar matches the signed jnlp application file. * tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithUnmatchingSignedJnlpApplication.jnlp: Launching jnlp file that's main jar does not match the signed jnlp application file. * tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp: Signed JNLP application file for MultiJar-SignedJnlpApplication. * tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/SignedJnlpApplication.java: A class that uses reflection to access resources from different jars. * tests/reproducers/signed/MultiJar-SignedJnlpApplication/testcases/MultiJarSignedJnlpTest.java: Testcase that tests the launch and validation of signed jnlp files for application that have multiple jar resources. * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/resources/MainJarWithMatchingSignedJnlpTemplate.jnlp: Launching jnlp file that's main jar matches the signed jnlp application template file. * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/resources/MainJarWithUnmatchingSignedJnlpTemplate.jnlp: Launching jnlp file that's main jar does not match the signed jnlp application template file. * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp: Signed JNLP application template file for MultiJar-SignedJnlpTemplate.jar * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/srcs/SignedJnlpTemplate.java: A class that uses reflection to access resources from different jars. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: changelog0-1.patch Type: text/x-patch Size: 2372 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120905/f6b8f535/changelog0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: patch0-7.patch Type: text/x-patch Size: 0 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120905/f6b8f535/patch0-7.patch From smohammad at redhat.com Wed Sep 5 12:59:37 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Wed, 05 Sep 2012 15:59:37 -0400 Subject: [RFC][icedtea-web]: Added signed jnlp tests for applications using multiple jars In-Reply-To: <5047ADDC.9020702@redhat.com> References: <4FF4B022.2000608@redhat.com> <1342557461.15784.16.camel@linux-laptop> <500EF833.9040509@redhat.com> <1344888329.19536.29.camel@voip-10-15-18-79.yyz.redhat.com> <5047ADDC.9020702@redhat.com> Message-ID: <5047AF29.3050809@redhat.com> Yikes, sorry, I attached an empty patch in the previous email. :( -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: patch0-7.patch Type: text/x-patch Size: 36108 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120905/7c1854fb/patch0-7.patch From ahughes at redhat.com Wed Sep 5 13:49:54 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Wed, 5 Sep 2012 16:49:54 -0400 (EDT) Subject: /hg/release/icedtea-web-1.3: Fixing several errors which were ca... In-Reply-To: Message-ID: <266953394.1405272.1346878194053.JavaMail.root@redhat.com> ----- Original Message ----- > changeset b26d52214ed6 in /hg/release/icedtea-web-1.3 > details: > http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=b26d52214ed6 > author: Jiri Vanek > date: Wed Sep 05 16:09:40 2012 +0200 > > Fixing several errors which were causing incorrect behaviour causing > correct reproduction of PR905 > > > diffstat: > > ChangeLog | > 13 +++++ > tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java | > 3 + > tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | > 18 +++++-- > tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java | > 22 +++++++++- > tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java | > 5 +- > 5 files changed, 52 insertions(+), 9 deletions(-) > > diffs (149 lines): > > diff -r 2905e24a50bd -r b26d52214ed6 ChangeLog > --- a/ChangeLog Wed Sep 05 12:58:30 2012 +0200 > +++ b/ChangeLog Wed Sep 05 16:09:40 2012 +0200 > @@ -1,3 +1,16 @@ > +2012-09-05 Jiri Vanek > + > + Fixing several errors which were causing incorrect behaviour > causing > + correct reproduction of PR905 > + * > tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java: > + added flush for logs > + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: > cleaned > + and enhanced getUrl* methods. > + * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: > delegated > + socket > + * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: > fixed > + processing of question mark. > + > 2012-09-04 Jiri Vanek > Danesh Dadachanji > > diff -r 2905e24a50bd -r b26d52214ed6 > tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java > --- > a/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java > Wed Sep 05 12:58:30 2012 +0200 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java > Wed Sep 05 16:09:40 2012 +0200 > @@ -201,15 +201,18 @@ > private void stdout(String idded) throws IOException { > DEFAULT_STDOUT_WRITER.write(idded); > DEFAULT_STDOUT_WRITER.newLine(); > + DEFAULT_STDOUT_WRITER.flush(); > } > > private void stderr(String idded) throws IOException { > DEFAULT_STDERR_WRITER.write(idded); > DEFAULT_STDERR_WRITER.newLine(); > + DEFAULT_STDERR_WRITER.flush(); > } > > private void stdeall(String idded) throws IOException { > DEFAULT_STDLOGS_WRITER.write(idded); > DEFAULT_STDLOGS_WRITER.newLine(); > + DEFAULT_STDLOGS_WRITER.flush(); > } > } > diff -r 2905e24a50bd -r b26d52214ed6 > tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java > --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java > Wed Sep 05 12:58:30 2012 +0200 > +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java > Wed Sep 05 16:09:40 2012 +0200 > @@ -585,16 +585,24 @@ > } > > /** > + * Ctreate resource on http, on 'localhost' on port on which > this cached instance is running > + * @param resource > + * @return > + * @throws MalformedURLException > + */ > + public URL getUrlUponThisInstance(String resource) throws > MalformedURLException { > + getInstance(); > + return getUrlUponInstance(server,resource); > + } > + > + /** > * Ctreate resource on http, on 'localhost' on port on which > this instance is running > * @param resource > * @return > * @throws MalformedURLException > */ > - public URL getUrlUponThisInstance(String resource) throws > MalformedURLException { > - if (!resource.startsWith("/")) { > - resource = "/" + resource; > - } > - return new URL("http", server.getServerName(), getPort(), > resource); > + public static URL getUrlUponInstance(ServerLauncher > instance,String resource) throws MalformedURLException { > + return instance.getUrl(resource); > } > > /** > diff -r 2905e24a50bd -r b26d52214ed6 > tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java > --- a/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java > Wed Sep 05 12:58:30 2012 +0200 > +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java > Wed Sep 05 16:09:40 2012 +0200 > @@ -56,6 +56,7 @@ > private boolean running; > private final Integer port; > private final File dir; > + private ServerSocket serverSocket; > > public String getServerName() { > return serverName; > @@ -99,9 +100,9 @@ > public void run() { > running = true; > try { > - ServerSocket s = new ServerSocket(port); > + serverSocket = new ServerSocket(port); > while (running) { > - new TinyHttpdImpl(s.accept(), dir, port); > + new TinyHttpdImpl(serverSocket.accept(), dir, port); > } > } catch (Exception e) { > e.printStackTrace(); > @@ -111,10 +112,27 @@ > } > > public URL getUrl(String resource) throws MalformedURLException > { > + if (resource == null) { > + resource = ""; > + } > + if (resource.trim().length() > 0 && > !resource.startsWith("/")) { > + resource = "/" + resource; > + } > return new URL("http", getServerName(), getPort(), > resource); > } > > public URL getUrl() throws MalformedURLException { > return getUrl(""); > } > + > + public void stop() { > + this.running = false; > + if (serverSocket != null) { > + try { > + serverSocket.close(); > + } catch (Exception ex) { > + ServerAccess.logException(ex); > + } > + } > + } > } > diff -r 2905e24a50bd -r b26d52214ed6 > tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java > --- a/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java > Wed Sep 05 12:58:30 2012 +0200 > +++ b/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java > Wed Sep 05 16:09:40 2012 +0200 > @@ -99,8 +99,9 @@ > } > ServerAccess.logNoReprint("Getting: " + p); > p = URLDecoder.decode(p, "UTF-8"); > + p=p.replaceAll("\\?.*", ""); > + p = (".".concat((p.endsWith("/")) ? > p.concat("index.html") : p)).replace('/', File.separatorChar); > ServerAccess.logNoReprint("Serving: " + p); > - p = (".".concat((p.endsWith("/")) ? > p.concat("index.html") : p)).replace('/', File.separatorChar); > File pp = new File(dir, p); > int l = (int) pp.length(); > byte[] b = new byte[l]; > @@ -115,7 +116,7 @@ > } else if (p.toLowerCase().endsWith(".jar")) > { > content = ct + "application/x-jar\n"; > } > - o.writeBytes("HTTP/1.0 200 OK\nConten" + > "t-Length:" + l + "\n" + content + "\n"); > + o.writeBytes("HTTP/1.0 200 > OK\nContent-Length:" + l + "\n" + content + "\n"); > if (op.startsWith(XSX)) { > byte[][] bb = splitArray(b, 10); > for (int j = 0; j < bb.length; j++) { > Pavel's e-mail only approved this for HEAD: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020187.html This commit also seems to be missing some of the changes in that review. Thanks, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From dbhole at icedtea.classpath.org Wed Sep 5 15:07:00 2012 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Wed, 05 Sep 2012 22:07:00 +0000 Subject: /hg/release/icedtea-web-1.3: 4 new changesets Message-ID: changeset 03ac5dc76069 in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=03ac5dc76069 author: Deepak Bhole date: Mon Aug 27 15:35:27 2012 -0400 Prepare for 1.3 changeset 1e8f5072818c in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=1e8f5072818c author: Deepak Bhole date: Mon Aug 27 15:35:32 2012 -0400 Added tag icedtea-web-1.3 for changeset 03ac5dc76069 changeset e34ee5812e99 in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=e34ee5812e99 author: Deepak Bhole date: Mon Aug 27 15:36:22 2012 -0400 Prepare for 1.3.1 changeset 956ca57557a0 in /hg/release/icedtea-web-1.3 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.3?cmd=changeset;node=956ca57557a0 author: Deepak Bhole date: Wed Sep 05 17:54:22 2012 -0400 Merge diffstat: .hgtags | 1 + ChangeLog | 45 + NEWS | 4 +- configure.ac | 2 +- netx/net/sourceforge/jnlp/Launcher.java | 19 + netx/net/sourceforge/jnlp/resources/Messages.properties | 1 + netx/net/sourceforge/jnlp/services/XSingleInstanceService.java | 38 +- tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp | 60 ++ tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp | 55 ++ tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html | 50 + tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html | 47 + tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java | 158 +++++ tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java | 265 ++++++++++ tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java | 3 + tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 18 +- tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java | 22 +- tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java | 5 +- 17 files changed, 775 insertions(+), 18 deletions(-) diffs (truncated from 1019 to 500 lines): diff -r a63733958565 -r 956ca57557a0 .hgtags --- a/.hgtags Mon Aug 27 15:32:08 2012 -0400 +++ b/.hgtags Wed Sep 05 17:54:22 2012 -0400 @@ -1,3 +1,4 @@ 692d7e5b31039156aff1600fd7f5034fead2f258 icedtea-web-1.0-branchpoint b605505179459c9f2119e4dfde999fc6300e4c87 icedtea-web-1.1-branchpoint 41f03d932cdf040a89d09c5683fcc7dac6fd2003 icedtea-web-1.2-branchpoint +03ac5dc76069aac927946ccc26698f52e1965260 icedtea-web-1.3 diff -r a63733958565 -r 956ca57557a0 ChangeLog --- a/ChangeLog Mon Aug 27 15:32:08 2012 -0400 +++ b/ChangeLog Wed Sep 05 17:54:22 2012 -0400 @@ -1,3 +1,48 @@ +2012-09-05 Jiri Vanek + + Fixing several errors which were causing incorrect behaviour causing + correct reproduction of PR905 + * tests/test-extensions/net/sourceforge/jnlp/LoggingBottleneck.java: + added flush for logs + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: cleaned + and enhanced getUrl* methods. + * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: delegated + socket + * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: fixed + processing of question mark. + +2012-09-04 Jiri Vanek + Danesh Dadachanji + + Single instance support for jnlp-href and tests + * netx/net/sourceforge/jnlp/services/XSingleInstanceService.java: + (initializeSingleInstance) fixed code for catching running instance + (checkSingleInstanceRunning) Added handling of parameters. + * netx/net/sourceforge/jnlp/Launcher.java: (launchApplication), + (launchApplet) Added debug output that instance is already running. + (getApplet) added check for services and debug output + * netx/net/sourceforge/jnlp/resources/Messages.properties: added + (LSingleInstanceExists) entry for exception. + tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp: + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html: + * tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html: + Applet and application in jnlp or html launching files. + * tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java + SingleInstance implementing applet/application + * tests/reproducers/simple/SingleInstanceServiceTest/testcases/SingleInstanceTest.java + Testfile for launching for above jnlps/htmls as testcases. + +2012-08-27 Deepak Bhole + + * configure.ac: Prepare for 1.3.1 + * NEWS: Same + +2012-08-27 Deepak Bhole + + * configure.ac: Prepare for 1.3 + * NEWS: Same + 2012-08-27 Deepak Bhole * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java diff -r a63733958565 -r 956ca57557a0 NEWS --- a/NEWS Mon Aug 27 15:32:08 2012 -0400 +++ b/NEWS Wed Sep 05 17:54:22 2012 -0400 @@ -8,7 +8,9 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.3 (2012-XX-XX): +New in release 1.3.1 (2012-XX-XX): + +New in release 1.3 (2012-09-04): * Security updates - CVE-2012-3422, RH840592: Potential read from an uninitialized memory location - CVE-2012-3423, RH841345: Incorrect handling of not 0-terminated strings diff -r a63733958565 -r 956ca57557a0 configure.ac --- a/configure.ac Mon Aug 27 15:32:08 2012 -0400 +++ b/configure.ac Wed Sep 05 17:54:22 2012 -0400 @@ -1,4 +1,4 @@ -AC_INIT([icedtea-web],[1.3pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) +AC_INIT([icedtea-web],[1.3.1pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile netx.manifest]) diff -r a63733958565 -r 956ca57557a0 netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Mon Aug 27 15:32:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Sep 05 17:54:22 2012 -0400 @@ -536,6 +536,9 @@ try { ServiceUtil.checkExistingSingleInstance(file); } catch (InstanceExistsException e) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance application is already running."); + } return null; } @@ -653,11 +656,17 @@ throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); try { + ServiceUtil.checkExistingSingleInstance(file); AppletInstance applet = createApplet(file, enableCodeBase, cont); applet.initialize(); applet.getAppletEnvironment().startApplet(); // this should be a direct call to applet instance return applet; + } catch (InstanceExistsException ieex) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance applet is already running."); + } + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); } catch (LaunchException lex) { throw launchError(lex); } catch (Exception ex) { @@ -673,9 +682,17 @@ throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LNotApplet"), R("LNotAppletInfo"))); try { + ServiceUtil.checkExistingSingleInstance(file); + AppletInstance applet = createApplet(file, enableCodeBase, cont); applet.initialize(); return applet; + + } catch (InstanceExistsException ieex) { + if (JNLPRuntime.isDebug()) { + System.out.println("Single instance applet is already running."); + } + throw launchError(new LaunchException(file, ieex, R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), R("LSingleInstanceExists"))); } catch (LaunchException lex) { throw launchError(lex); } catch (Exception ex) { @@ -688,6 +705,8 @@ * a thread in the application's thread group. */ protected ApplicationInstance launchInstaller(JNLPFile file) throws LaunchException { + // TODO Check for an existing single instance once implemented. + // ServiceUtil.checkExistingSingleInstance(file); throw launchError(new LaunchException(file, null, R("LSFatal"), R("LCNotSupported"), R("LNoInstallers"), R("LNoInstallersInfo"))); } diff -r a63733958565 -r 956ca57557a0 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon Aug 27 15:32:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Sep 05 17:54:22 2012 -0400 @@ -83,6 +83,7 @@ LSignedJNLPFileDidNotMatch=The signed JNLP file did not match the launching JNLP file. LNoSecInstance=Error: No security instance for {0}. The application may have trouble continuing LCertFoundIn={0} found in cacerts ({1}) +LSingleInstanceExists=Another instance of this applet already exists and only one may be run at the same time. JNotApplet=File is not an applet. JNotApplication=File is not an application. diff -r a63733958565 -r 956ca57557a0 netx/net/sourceforge/jnlp/services/XSingleInstanceService.java --- a/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Mon Aug 27 15:32:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/services/XSingleInstanceService.java Wed Sep 05 17:54:22 2012 -0400 @@ -24,11 +24,14 @@ import java.net.UnknownHostException; import java.util.LinkedList; import java.util.List; +import java.util.Map.Entry; +import java.util.Set; import javax.jnlp.SingleInstanceListener; import javax.management.InstanceAlreadyExistsException; import net.sourceforge.jnlp.JNLPFile; +import net.sourceforge.jnlp.PluginBridge; import net.sourceforge.jnlp.runtime.JNLPRuntime; /** @@ -104,13 +107,14 @@ * @throws InstanceAlreadyExistsException if the instance already exists */ public void initializeSingleInstance() { - if (!initialized) { - // this is called after the application has started. so safe to use - // JNLPRuntime.getApplication() - checkSingleInstanceRunning(JNLPRuntime.getApplication().getJNLPFile()); + // this is called after the application has started. so safe to use + // JNLPRuntime.getApplication() + JNLPFile jnlpFile = JNLPRuntime.getApplication().getJNLPFile(); + if (!initialized || jnlpFile instanceof PluginBridge) { + // Either a new process or a new applet being handled by the plugin. + checkSingleInstanceRunning(jnlpFile); initialized = true; SingleInstanceLock lockFile; - JNLPFile jnlpFile = JNLPRuntime.getApplication().getJNLPFile(); lockFile = new SingleInstanceLock(jnlpFile); if (!lockFile.isValid()) { startListeningServer(lockFile); @@ -127,6 +131,7 @@ * @throws InstanceExistsException if an instance of this application * already exists */ + @Override public void checkSingleInstanceRunning(JNLPFile jnlpFile) { SingleInstanceLock lockFile = new SingleInstanceLock(jnlpFile); if (lockFile.isValid()) { @@ -134,9 +139,28 @@ if (JNLPRuntime.isDebug()) { System.out.println("Lock file is valid (port=" + port + "). Exiting."); } + + String[] args = null; + if (jnlpFile.isApplet()) { + // FIXME Proprietary plug-in is unclear about how to handle + // applets and their parameters. + //Right now better to forward at least something + Set> currentParams = jnlpFile.getApplet().getParameters().entrySet(); + args = new String[currentParams.size() * 2]; + int i = 0; + for (Entry entry : currentParams) { + args[i] = entry.getKey(); + args[i+1] = entry.getValue(); + i += 2; + } + } else if (jnlpFile.isInstaller()) { + // TODO Implement this once installer service is available. + } else { + args = jnlpFile.getApplication().getArguments(); + } + try { - sendProgramArgumentsToExistingApplication(port, jnlpFile.getApplication() - .getArguments()); + sendProgramArgumentsToExistingApplication(port, args); throw new InstanceExistsException(String.valueOf(port)); } catch (IOException e) { throw new RuntimeException(e); diff -r a63733958565 -r 956ca57557a0 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest.jnlp Wed Sep 05 17:54:22 2012 -0400 @@ -0,0 +1,60 @@ + + + + + SingleInstanceApplet + IcedTea + + SingleInstanceApplet + + + + + + + + + + + \ No newline at end of file diff -r a63733958565 -r 956ca57557a0 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTestWS.jnlp Wed Sep 05 17:54:22 2012 -0400 @@ -0,0 +1,55 @@ + + + + + SingleInstanceAppletWS + IcedTea + + SingleInstanceAppletWS + + + + + + + + v7 + v8 + + \ No newline at end of file diff -r a63733958565 -r 956ca57557a0 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_clasical.html Wed Sep 05 17:54:22 2012 -0400 @@ -0,0 +1,50 @@ + + + + + + + + + + diff -r a63733958565 -r 956ca57557a0 tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/resources/SingleInstanceTest_jnlpHref.html Wed Sep 05 17:54:22 2012 -0400 @@ -0,0 +1,47 @@ + + + + + + + + + + + diff -r a63733958565 -r 956ca57557a0 tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/SingleInstanceServiceTest/srcs/SingleInstanceChecker.java Wed Sep 05 17:54:22 2012 -0400 @@ -0,0 +1,158 @@ +/* SingleInstanceChecker.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + From dbhole at redhat.com Wed Sep 5 15:09:55 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 5 Sep 2012 18:09:55 -0400 Subject: IcedTea-Web 1.3 released! Message-ID: <20120905220954.GB4504@redhat.com> Hi Everyone, IcedTea-Web 1.3 is now released and available for download! This release is the first of what we hope will be regular releases based on time rather than features. It includes many bug fixes and new features. Some of the highlights include: New features: - Web Start launch errors are now printed to give proper indication as to the cause - Significant performance improvement when loading applets that refer to missing classes - Support for latest versions of Chromium - Security warning dialog improvements to better clarify security request - Support build with GTK2 and GTK3 - Cookie write support (i.e set cookies in browser via Java/Applet) Bug fixes: Common: - Applet window icon improved Plug-in: - PR975: Ignore classpaths specified in jar manifests when using jnlp_href - PR1011: Treat folders as such when specified in archive tags - PR855: AppletStub getDocumentBase() now returns full URL - PR722: Unsigned META-INF entries are ignored - PR861: Jars can now load from non codebase hosts Web Start: - PR898: Large signed JNLP files now supported - PR811: URLs with spaces now handled correctly Full notes with bug ids are available in the NEWS file: http://icedtea.classpath.org/hg/release/icedtea-web-1.3/file/a63733958565/NEWS Available for download here: http://icedtea.classpath.org/download/source/icedtea-web-1.3.tar.gz Build instructions are here: http://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web SHA256 sum: d46ec10700732cea103da2aae64ff01e717cb1281b83e1797ce48cc53280b49f icedtea-web-1.3.tar.gz Thanks to everyone who helped with this release: Danesh Dadachanji Adam Domurad Peter Hatina Lars Herschke Andrew Hughes Omair Majid Thomas Meyer Saad Mohammad Martin Olsson Jiri Vanek From ptisnovs at icedtea.classpath.org Thu Sep 6 00:31:23 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 06 Sep 2012 07:31:23 +0000 Subject: /hg/gfx-test: Changed test annotations, updated tests, updated M... Message-ID: changeset 15eba2d75bf7 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=15eba2d75bf7 author: Pavel Tisnovsky date: Thu Sep 06 09:33:59 2012 +0200 Changed test annotations, updated tests, updated Makefile. diffstat: ChangeLog | 22 +++ Makefile | 4 + src/org/gfxtest/framework/annotations/GraphicsPrimitives.java | 15 +- src/org/gfxtest/framework/annotations/PathVariant.java | 57 +++++++ src/org/gfxtest/framework/annotations/PathVariants.java | 73 ++++++++++ src/org/gfxtest/framework/annotations/ShapeVariant.java | 57 +++++++ src/org/gfxtest/framework/annotations/ShapeVariants.java | 61 ++++++++ src/org/gfxtest/testsuites/NormalCubicCurves.java | 3 +- src/org/gfxtest/testsuites/NormalCubicCurvesAsPaths.java | 3 +- src/org/gfxtest/testsuites/NormalQuadraticCurves.java | 3 +- src/org/gfxtest/testsuites/NormalQuadraticCurvesAsPaths.java | 3 +- src/org/gfxtest/testsuites/PrintTestCubicCurves.java | 5 +- src/org/gfxtest/testsuites/PrintTestCubicCurvesAsPaths.java | 5 +- src/org/gfxtest/testsuites/PrintTestLinesAsPaths.java | 5 +- src/org/gfxtest/testsuites/PrintTestPaths.java | 3 + src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java | 5 +- src/org/gfxtest/testsuites/PrintTestQuadraticCurvesAsPaths.java | 5 +- 17 files changed, 310 insertions(+), 19 deletions(-) diffs (truncated from 519 to 500 lines): diff -r cab54d813cdb -r 15eba2d75bf7 ChangeLog --- a/ChangeLog Wed Sep 05 10:48:28 2012 +0200 +++ b/ChangeLog Thu Sep 06 09:33:59 2012 +0200 @@ -1,3 +1,25 @@ +2012-09-06 Pavel Tisnovsky + + * src/org/gfxtest/framework/annotations/GraphicsPrimitives.java: + Removed unused annotation types. + * src/org/gfxtest/framework/annotations/PathVariant.java: + * src/org/gfxtest/framework/annotations/PathVariants.java: + * src/org/gfxtest/framework/annotations/ShapeVariant.java: + * src/org/gfxtest/framework/annotations/ShapeVariants.java: + Added new annotations for gfx. tests. + * src/org/gfxtest/testsuites/NormalCubicCurves.java: + * src/org/gfxtest/testsuites/NormalCubicCurvesAsPaths.java: + * src/org/gfxtest/testsuites/NormalQuadraticCurves.java: + * src/org/gfxtest/testsuites/NormalQuadraticCurvesAsPaths.java: + * src/org/gfxtest/testsuites/PrintTestCubicCurves.java: + * src/org/gfxtest/testsuites/PrintTestCubicCurvesAsPaths.java: + * src/org/gfxtest/testsuites/PrintTestLinesAsPaths.java: + * src/org/gfxtest/testsuites/PrintTestPaths.java: + * src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java: + * src/org/gfxtest/testsuites/PrintTestQuadraticCurvesAsPaths.java: + Updated tests according to changes in test annotations. + * Makefile: Added new classes to compile. + 2012-09-05 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java: diff -r cab54d813cdb -r 15eba2d75bf7 Makefile --- a/Makefile Wed Sep 05 10:48:28 2012 +0200 +++ b/Makefile Thu Sep 06 09:33:59 2012 +0200 @@ -76,6 +76,10 @@ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/TestType.class \ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/Transformations.class \ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/Transformation.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/PathVariant.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/PathVariants.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/ShapeVariant.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/ShapeVariants.class \ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/Zoom.class \ $(CLASSES)/$(FRAMEWORK_DIR)/ColorPalette.class \ $(CLASSES)/$(FRAMEWORK_DIR)/GrayscalePalette.class \ diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/framework/annotations/GraphicsPrimitives.java --- a/src/org/gfxtest/framework/annotations/GraphicsPrimitives.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/framework/annotations/GraphicsPrimitives.java Thu Sep 06 09:33:59 2012 +0200 @@ -103,21 +103,16 @@ ELLIPSE, /** - * Quadratic parametric curve segment in (x, y) coordinate space. - */ - QUADRATIC_CURVE, - - /** - * Cubic parametric curve segment in (x, y) coordinate space. - */ - CUBIC_CURVE, - - /** * Generic path consisting of line segments, quadratic curves and cubic curves. */ PATH, /** + * Generic shape consisting of line segment, quadratic curve, cubic curve etc. + */ + SHAPE, + + /** * Generic area, ie. closed shape. */ AREA, diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/framework/annotations/PathVariant.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/PathVariant.java Thu Sep 06 09:33:59 2012 +0200 @@ -0,0 +1,57 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * Declaration of interface used to specify graphics path type for each test + * suite based on rendering Path2D. + * @see PathPrimitives + * + * @author Pavel Tisnovsky + */ + at Retention(RetentionPolicy.RUNTIME) +public @interface PathVariant +{ + PathVariants value(); +} diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/framework/annotations/PathVariants.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/PathVariants.java Thu Sep 06 09:33:59 2012 +0200 @@ -0,0 +1,73 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + + + +/** + * Names of path variants used for annotation of test suite which + * uses Path2D. + * @see PathVariant + * + * @author Pavel Tisnovsky + */ +public enum PathVariants +{ + /** + * Line segment in (x, y) coordinate space. + */ + LINE, + + /** + * Quadratic parametric curve segment in (x, y) coordinate space. + */ + QUADRATIC_CURVE, + + /** + * Cubic parametric curve segment in (x, y) coordinate space. + */ + CUBIC_CURVE, + + /** + * Various path segments + */ + VARIOUS +} diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/framework/annotations/ShapeVariant.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/ShapeVariant.java Thu Sep 06 09:33:59 2012 +0200 @@ -0,0 +1,57 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + +/** + * Declaration of interface used to specify graphics path type for each test + * suite based on rendering Path2D. + * @see ShapeVariants + * + * @author Pavel Tisnovsky + */ + at Retention(RetentionPolicy.RUNTIME) +public @interface ShapeVariant +{ + ShapeVariants value(); +} diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/framework/annotations/ShapeVariants.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/ShapeVariants.java Thu Sep 06 09:33:59 2012 +0200 @@ -0,0 +1,61 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + +/** + * Names of path variants used for annotation of test suite which + * uses Shape. + * @see ShapeVariant + * + * @author Pavel Tisnovsky + */ +public enum ShapeVariants +{ + /** + * Quadratic parametric curve segment in (x, y) coordinate space. + */ + QUADRATIC_CURVE, + + /** + * Cubic parametric curve segment in (x, y) coordinate space. + */ + CUBIC_CURVE, +} diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/NormalCubicCurves.java --- a/src/org/gfxtest/testsuites/NormalCubicCurves.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/NormalCubicCurves.java Thu Sep 06 09:33:59 2012 +0200 @@ -57,7 +57,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.RENDER_TEST) - at GraphicsPrimitive(GraphicsPrimitives.CUBIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.SHAPE) + at ShapeVariant(ShapeVariants.CUBIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/NormalCubicCurvesAsPaths.java --- a/src/org/gfxtest/testsuites/NormalCubicCurvesAsPaths.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/NormalCubicCurvesAsPaths.java Thu Sep 06 09:33:59 2012 +0200 @@ -57,7 +57,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.RENDER_TEST) - at GraphicsPrimitive(GraphicsPrimitives.CUBIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.PATH) + at PathVariant(PathVariants.CUBIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/NormalQuadraticCurves.java --- a/src/org/gfxtest/testsuites/NormalQuadraticCurves.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/NormalQuadraticCurves.java Thu Sep 06 09:33:59 2012 +0200 @@ -58,7 +58,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.RENDER_TEST) - at GraphicsPrimitive(GraphicsPrimitives.QUADRATIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.SHAPE) + at ShapeVariant(ShapeVariants.QUADRATIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/NormalQuadraticCurvesAsPaths.java --- a/src/org/gfxtest/testsuites/NormalQuadraticCurvesAsPaths.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/NormalQuadraticCurvesAsPaths.java Thu Sep 06 09:33:59 2012 +0200 @@ -57,7 +57,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.RENDER_TEST) - at GraphicsPrimitive(GraphicsPrimitives.QUADRATIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.PATH) + at PathVariant(PathVariants.QUADRATIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/PrintTestCubicCurves.java --- a/src/org/gfxtest/testsuites/PrintTestCubicCurves.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestCubicCurves.java Thu Sep 06 09:33:59 2012 +0200 @@ -58,6 +58,8 @@ import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.ShapeVariant; +import org.gfxtest.framework.annotations.ShapeVariants; import org.gfxtest.framework.annotations.TestType; import org.gfxtest.framework.annotations.TestTypes; import org.gfxtest.framework.annotations.Transformation; @@ -70,7 +72,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.PRINT_TEST) - at GraphicsPrimitive(GraphicsPrimitives.CUBIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.SHAPE) + at ShapeVariant(ShapeVariants.CUBIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/PrintTestCubicCurvesAsPaths.java --- a/src/org/gfxtest/testsuites/PrintTestCubicCurvesAsPaths.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestCubicCurvesAsPaths.java Thu Sep 06 09:33:59 2012 +0200 @@ -55,6 +55,8 @@ import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.PathVariant; +import org.gfxtest.framework.annotations.PathVariants; import org.gfxtest.framework.annotations.RenderStyle; import org.gfxtest.framework.annotations.RenderStyles; import org.gfxtest.framework.annotations.TestType; @@ -72,7 +74,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.PRINT_TEST) - at GraphicsPrimitive(GraphicsPrimitives.CUBIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.PATH) + at PathVariant(PathVariants.CUBIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/PrintTestLinesAsPaths.java --- a/src/org/gfxtest/testsuites/PrintTestLinesAsPaths.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestLinesAsPaths.java Thu Sep 06 09:33:59 2012 +0200 @@ -56,6 +56,8 @@ import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.PathVariant; +import org.gfxtest.framework.annotations.PathVariants; import org.gfxtest.framework.annotations.RenderStyle; import org.gfxtest.framework.annotations.RenderStyles; import org.gfxtest.framework.annotations.TestType; @@ -73,7 +75,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.PRINT_TEST) - at GraphicsPrimitive(GraphicsPrimitives.LINE) + at GraphicsPrimitive(GraphicsPrimitives.PATH) + at PathVariant(PathVariants.LINE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/PrintTestPaths.java --- a/src/org/gfxtest/testsuites/PrintTestPaths.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestPaths.java Thu Sep 06 09:33:59 2012 +0200 @@ -55,6 +55,8 @@ import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.PathVariant; +import org.gfxtest.framework.annotations.PathVariants; import org.gfxtest.framework.annotations.RenderStyle; import org.gfxtest.framework.annotations.RenderStyles; import org.gfxtest.framework.annotations.TestType; @@ -72,6 +74,7 @@ */ @TestType(TestTypes.PRINT_TEST) @GraphicsPrimitive(GraphicsPrimitives.PATH) + at PathVariant(PathVariants.VARIOUS) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java --- a/src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestQuadraticCurves.java Thu Sep 06 09:33:59 2012 +0200 @@ -53,6 +53,8 @@ import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.ShapeVariant; +import org.gfxtest.framework.annotations.ShapeVariants; import org.gfxtest.framework.annotations.TestType; import org.gfxtest.framework.annotations.TestTypes; import org.gfxtest.framework.annotations.Transformation; @@ -67,7 +69,8 @@ * @author Pavel Tisnovsky */ @TestType(TestTypes.PRINT_TEST) - at GraphicsPrimitive(GraphicsPrimitives.QUADRATIC_CURVE) + at GraphicsPrimitive(GraphicsPrimitives.SHAPE) + at ShapeVariant(ShapeVariants.QUADRATIC_CURVE) @RenderStyle(RenderStyles.NORMAL) @Transformation(Transformations.NONE) @Zoom(1) diff -r cab54d813cdb -r 15eba2d75bf7 src/org/gfxtest/testsuites/PrintTestQuadraticCurvesAsPaths.java --- a/src/org/gfxtest/testsuites/PrintTestQuadraticCurvesAsPaths.java Wed Sep 05 10:48:28 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestQuadraticCurvesAsPaths.java Thu Sep 06 09:33:59 2012 +0200 From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 03:38:58 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 10:38:58 +0000 Subject: [Bug 1156] New: Fatal: Read Error: Could not read or parse the JNLP file. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1156 Priority: P3 Bug ID: 1156 CC: unassigned at icedtea.classpath.org Assignee: omajid at redhat.com Summary: Fatal: Read Error: Could not read or parse the JNLP file. Severity: normal Classification: Unclassified OS: Linux Reporter: botta at pik-potsdam.de Hardware: x86_64 Status: NEW Version: 1.2 Component: NetX (javaws) Product: IcedTea-Web Created attachment 751 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=751&action=edit output of javaws -verbose [problem JNLP file] 2>&1 | tee javaws.log -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/777ee81a/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 03:46:55 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 10:46:55 +0000 Subject: [Bug 1157] New: icedtea-web locks up browser and future applets after first visit a page with missing code applet class. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1157 Priority: P3 Bug ID: 1157 CC: unassigned at icedtea.classpath.org Assignee: dbhole at redhat.com Summary: icedtea-web locks up browser and future applets after first visit a page with missing code applet class. Severity: normal Classification: Unclassified OS: Linux Reporter: xerxes at zafena.se Hardware: 32-bit Status: NEW Version: hg Component: Plugin Product: IcedTea-Web icedtea-web locks up browser and future applets after first visit a page with missing code applet class. Bug found to be reproducible using all recent icedtea-web releases and hg repositorys: IcedTea-Web Plugin (using IcedTea-Web 1.1.7pre+rb7d63cc06ec4) IcedTea-Web Plugin (using IcedTea-Web 1.2 (1.2-2ubuntu1.2)) IcedTea-Web Plugin (using IcedTea-Web 1.3.1pre+r956ca57557a0) IcedTea-Web Plugin (using IcedTea-Web 1.4pre+r4d8eccca14ed) When testing using Firefox 15 on a Ubuntu 12.04 i386 system then all user input locks up. When testing using Chromium 18.0.1025.168 (Utvecklarversion 134367 Linux) Ubuntu 12.04 i386 system then all java applets show a gray window after first triggering this bug, browser remains responsive. Testcase 1: # step 1: visit a page with a missing plugin class to trigger the bug. # the browser is still responsive, but will only display a gray window http://www.oracle.com/technetwork/java/example1-137729.html # step 2: now try visit a known to work page (or try reload the step 1 page) and # experience that the whole browser GUI have become unresponsive and do not listen to any user input. http://www.java.com/en/download/testjava.jsp Testcase 2: #HTML code to trigger the bug #save it to a file bug.html #load it in the browser and then try reload the same page #Console output java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.4) (6b24-1.11.4-1ubuntu0.12.04.1) OpenJDK Server VM (build 20.0-b12, mixed mode) netx: Initialization Error: Could not initialize applet. (Clock) netx: Initialization Error: Could not initialize applet. (Clock) net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:735) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:676) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:886) Caused by: java.lang.ClassNotFoundException: Clock at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1427) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:725) ... 2 more java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154) at sun.applet.AppletPanel.run(AppletPanel.java:380) at java.lang.Thread.run(Thread.java:679) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:430) at java.lang.Thread.run(Thread.java:679) -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/01a7d80a/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 04:33:49 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 11:33:49 +0000 Subject: [Bug 1157] icedtea-web locks up browser and future applets after first visit a page with missing code applet class. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1157 --- Comment #1 from Xerxes R?nby --- I take back that this bug was reproducible using chromium (it was only slow initializing http://www.java.com/en/download/testjava.jsp ) chromium = ok midori = ok firefox 15 = fail -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/5364ac25/attachment.html From jvanek at icedtea.classpath.org Thu Sep 6 05:08:49 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Thu, 06 Sep 2012 12:08:49 +0000 Subject: /hg/icedtea-web: Fixing several typos from previous push. Message-ID: changeset 83032226f86a in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=83032226f86a author: Jiri Vanek date: Thu Sep 06 14:09:09 2012 +0200 Fixing several typos from previous push. diffstat: ChangeLog | 10 ++++++++++ tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java | 8 ++++---- tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 4 ++-- tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diffs (85 lines): diff -r 4d8eccca14ed -r 83032226f86a ChangeLog --- a/ChangeLog Wed Sep 05 16:02:18 2012 +0200 +++ b/ChangeLog Thu Sep 06 14:09:09 2012 +0200 @@ -1,3 +1,13 @@ +2012-09-06 Jiri Vanek + + Fixing several typos from previous push + * tests/test-extensions/net/sourceforge/jnlp/ServerLauncher.java: + (getUrlUponThisInstance) Javadoc, replaced Ctreate with Create. + * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: (run) + Fixed indentation. + * tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java: + Refactored createCodeBAse to createCodeBase. + 2012-09-05 Jiri Vanek Fixing several errors which were causing incorrect behaviour causing diff -r 4d8eccca14ed -r 83032226f86a tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java --- a/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java Wed Sep 05 16:02:18 2012 +0200 +++ b/tests/reproducers/simple/ParametrizedJarUrl/testcases/ParametrizedJarUrlTests.java Thu Sep 06 14:09:09 2012 +0200 @@ -65,7 +65,7 @@ ServerLauncher server2 = ServerAccess.getIndependentInstance(); String originalResourceName = "ParametrizedJarUrlSigned.html"; String newResourceName = "ParametrizedJarUrlSigned_COPY2.html"; - createCodeBAse(originalResourceName, newResourceName, server2.getUrl("")); + createCodeBase(originalResourceName, newResourceName, server2.getUrl("")); //set codebase to second server ProcessResult pr = server.executeBrowser(newResourceName); server2.stop(); @@ -78,12 +78,12 @@ public void parametrizedAppletTestSignedBrowserTest_hardcodedCodeBase() throws Exception { String originalResourceName = "ParametrizedJarUrlSigned.html"; String newResourceName = "ParametrizedJarUrlSigned_COPY1.html"; - createCodeBAse(originalResourceName, newResourceName, server.getUrl("")); + createCodeBase(originalResourceName, newResourceName, server.getUrl("")); ProcessResult pr = server.executeBrowser(newResourceName); evaluateSignedApplet(pr); } - private void createCodeBAse(String originalResourceName, String newResourceName, URL codebase) throws MalformedURLException, IOException { + private void createCodeBase(String originalResourceName, String newResourceName, URL codebase) throws MalformedURLException, IOException { String originalContent = ServerAccess.getContentOfStream(new FileInputStream(new File(server.getDir(), originalResourceName))); String nwContent = originalContent.replaceAll("codebase=\".\"", "codebase=\"" + codebase + "\""); ServerAccess.saveFile(nwContent, new File(server.getDir(), newResourceName)); @@ -149,7 +149,7 @@ Assert.assertTrue("AppletTestSigned stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1)); String s2 = "value2"; Assert.assertTrue("AppletTestSigned stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2)); -// to strict! +// too strict! // String s4 = "AppletTestSigned was stopped"; // Assert.assertFalse("AppletTestSigned stdout shouldn't contains " + s4 + " but did", pr.stdout.contains(s4)); // String s5 = "AppletTestSigned will be destroyed"; diff -r 4d8eccca14ed -r 83032226f86a tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Wed Sep 05 16:02:18 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Thu Sep 06 14:09:09 2012 +0200 @@ -585,14 +585,14 @@ } /** - * Ctreate resource on http, on 'localhost' on port on which this cached instance is running + * Create resource on http, on 'localhost' on port on which this cached instance is running * @param resource * @return * @throws MalformedURLException */ public URL getUrlUponThisInstance(String resource) throws MalformedURLException { getInstance(); - return getUrlUponInstance(server,resource); + return getUrlUponInstance(server, resource); } /** diff -r 4d8eccca14ed -r 83032226f86a tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java --- a/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java Wed Sep 05 16:02:18 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java Thu Sep 06 14:09:09 2012 +0200 @@ -99,7 +99,7 @@ } ServerAccess.logNoReprint("Getting: " + p); p = URLDecoder.decode(p, "UTF-8"); - p=p.replaceAll("\\?.*", ""); + p = p.replaceAll("\\?.*", ""); p = (".".concat((p.endsWith("/")) ? p.concat("index.html") : p)).replace('/', File.separatorChar); ServerAccess.logNoReprint("Serving: " + p); File pp = new File(dir, p); From jvanek at redhat.com Thu Sep 6 05:12:15 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 06 Sep 2012 14:12:15 +0200 Subject: /hg/release/icedtea-web-1.3: Fixing several errors which were ca... In-Reply-To: <266953394.1405272.1346878194053.JavaMail.root@redhat.com> References: <266953394.1405272.1346878194053.JavaMail.root@redhat.com> Message-ID: <5048931F.1030100@redhat.com> On 09/05/2012 10:49 PM, Andrew Hughes wrote: > ----- Original Message ----- >> changeset b26d52214ed6 in /hg/release/icedtea-web-1.3 >> details: ... >> } >> - o.writeBytes("HTTP/1.0 200 OK\nConten" + >> > > Pavel's e-mail only approved this for HEAD: > Yap - he wrote it. We have been speaking about it and if it is necessary, and I considered it as forgot to write 1.3 here, as we agreed on it when speaking about this change set. > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020187.html > > This commit also seems to be missing some of the changes in that review. Damn, you are right. Fixed! I had to be disturbed during doing it. > > Thanks, > Thanx for double check! J. From jvanek at redhat.com Thu Sep 6 06:26:45 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 06 Sep 2012 15:26:45 +0200 Subject: [fyi][icedtea-web] strict test Message-ID: <5048A495.8010900@redhat.com> Just simple test about passing of -strict parameter. I Have written it to my to do long ago, donot remember even why... so finally done... 2012-09-06 Jiri Vanek Added strict test * tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java: Removed deprecated ServerAccess.ProcessResult (testSimpletest1lunchOk) extracted asserting code (checkLaunched) family of methods to evaluate output of application (createStrictFile) method to prepare file which will pass strict checking (testSimpletest1lunchOkStrictJnlp) new test, ensuring that even strict file can be read without strict option (testSimpletest1lunchNotOkJnlpStrict) new test ensuring that strictly read no-strict file will fail (testSimpletest1lunchOkStrictJnlpStrict) new test ensuring that strictly read strict file will pass -------------- next part -------------- A non-text attachment was scrubbed... Name: strictTest.diff Type: text/x-patch Size: 4253 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/ef2c9912/strictTest.diff From adomurad at redhat.com Thu Sep 6 06:38:01 2012 From: adomurad at redhat.com (adomurad) Date: Thu, 06 Sep 2012 09:38:01 -0400 Subject: IcedTea-Web 1.3 released! In-Reply-To: <20120905220954.GB4504@redhat.com> References: <20120905220954.GB4504@redhat.com> Message-ID: <1346938681.6847.20.camel@adomurad-desktop> On Wed, 2012-09-05 at 18:09 -0400, Deepak Bhole wrote: > Hi Everyone, > > IcedTea-Web 1.3 is now released and available for download! > > This release is the first of what we hope will be regular releases based on > time rather than features. It includes many bug fixes and new features. Some of > the highlights include: > > New features: > - Web Start launch errors are now printed to give proper indication as to the > cause > - Significant performance improvement when loading applets that refer to > missing classes > - Support for latest versions of Chromium > - Security warning dialog improvements to better clarify security request > - Support build with GTK2 and GTK3 > - Cookie write support (i.e set cookies in browser via Java/Applet) > > Bug fixes: > Common: > - Applet window icon improved > > Plug-in: > - PR975: Ignore classpaths specified in jar manifests when using jnlp_href > - PR1011: Treat folders as such when specified in archive tags > - PR855: AppletStub getDocumentBase() now returns full URL > - PR722: Unsigned META-INF entries are ignored > - PR861: Jars can now load from non codebase hosts > > Web Start: > - PR898: Large signed JNLP files now supported > - PR811: URLs with spaces now handled correctly > > Full notes with bug ids are available in the NEWS file: > http://icedtea.classpath.org/hg/release/icedtea-web-1.3/file/a63733958565/NEWS > > Available for download here: > http://icedtea.classpath.org/download/source/icedtea-web-1.3.tar.gz > > Build instructions are here: > http://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web > > SHA256 sum: > d46ec10700732cea103da2aae64ff01e717cb1281b83e1797ce48cc53280b49f icedtea-web-1.3.tar.gz > > Thanks to everyone who helped with this release: > Danesh Dadachanji > Adam Domurad > Peter Hatina > Lars Herschke > Andrew Hughes > Omair Majid > Thomas Meyer > Saad Mohammad > Martin Olsson > Jiri Vanek (Adding Danesh to cc.) Congratulations to everyone involved, this is a major improvement to icedtea-web! - Adam From ptisnovs at icedtea.classpath.org Thu Sep 6 06:36:52 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 06 Sep 2012 13:36:52 +0000 Subject: /hg/rhino-tests: Fixed compiler warning caused by missed generic... Message-ID: changeset a5384678025c in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=a5384678025c author: Pavel Tisnovsky date: Thu Sep 06 15:39:22 2012 +0200 Fixed compiler warning caused by missed generics info. diffstat: ChangeLog | 12 ++++++++++++ src/org/RhinoTests/AbstractScriptEngineClassTest.java | 12 ++++++------ src/org/RhinoTests/CompiledScriptClassTest.java | 4 ++-- src/org/RhinoTests/ScriptContextClassTest.java | 1 + src/org/RhinoTests/ScriptEngineClassTest.java | 1 + src/org/RhinoTests/ScriptEngineManagerClassTest.java | 2 +- src/org/RhinoTests/ScriptExceptionClassTest.java | 14 +++++++------- src/org/RhinoTests/SimpleBindingsClassTest.java | 2 +- src/org/RhinoTests/SimpleScriptContextClassTest.java | 1 + 9 files changed, 32 insertions(+), 17 deletions(-) diffs (237 lines): diff -r 94e0142da92d -r a5384678025c ChangeLog --- a/ChangeLog Mon Sep 03 13:05:48 2012 +0200 +++ b/ChangeLog Thu Sep 06 15:39:22 2012 +0200 @@ -1,3 +1,15 @@ +2012-09-06 Pavel Tisnovsky + + * src/org/RhinoTests/AbstractScriptEngineClassTest.java: + * src/org/RhinoTests/CompiledScriptClassTest.java: + * src/org/RhinoTests/ScriptContextClassTest.java: + * src/org/RhinoTests/ScriptEngineClassTest.java: + * src/org/RhinoTests/ScriptEngineManagerClassTest.java: + * src/org/RhinoTests/ScriptExceptionClassTest.java: + * src/org/RhinoTests/SimpleBindingsClassTest.java: + * src/org/RhinoTests/SimpleScriptContextClassTest.java: + Fixed compiler warning caused by missed generics info. + 2012-09-03 Pavel Tisnovsky * src/org/RhinoTests/ScriptExceptionClassTest.java: diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/AbstractScriptEngineClassTest.java --- a/src/org/RhinoTests/AbstractScriptEngineClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/AbstractScriptEngineClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -65,7 +65,7 @@ /** * Object that represents the type of AbstractScriptEngine. */ - Class abstractScriptEngineClass = null; + Class abstractScriptEngineClass = null; @Override protected void setUp(String[] args) { @@ -139,7 +139,7 @@ * Test for method javax.script.AbstractScriptEngine.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.abstractScriptEngineClass.getInterfaces()); + List> interfaces = Arrays.asList(this.abstractScriptEngineClass.getInterfaces()); assertTrue(interfaces.contains(ScriptEngine.class), "list of implemented interfaces does not contain ScriptEngine"); } @@ -207,7 +207,7 @@ * Test for method javax.script.AbstractScriptEngine.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.abstractScriptEngineClass.getSuperclass(); + Class superClass = this.abstractScriptEngineClass.getSuperclass(); String superClassName = superClass.getName(); assertEquals(superClassName, "java.lang.Object", "Method AbstractScriptEngine.getClass().getSuperclass() returns wrong value " + superClassName); @@ -217,7 +217,7 @@ * Test for method javax.script.AbstractScriptEngine.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.abstractScriptEngineClass.getConstructors(); + Constructor[] constructors = this.abstractScriptEngineClass.getConstructors(); assertEquals(constructors.length, 2, "only 2 constructors should be set"); String constructorName; String constructorString; @@ -239,7 +239,7 @@ * Test for method javax.script.AbstractScriptEngine.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.abstractScriptEngineClass.getDeclaredConstructors(); + Constructor[] constructors = this.abstractScriptEngineClass.getDeclaredConstructors(); assertEquals(constructors.length, 2, "only 2 constructors should be set"); String constructorName; String constructorString; @@ -386,6 +386,7 @@ /** * Test for instanceof operator applied to a class javax.script.AbstractScriptEngine */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript); @@ -395,7 +396,6 @@ // check operator instanceof against all superclasses assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); - assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); } /** diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/CompiledScriptClassTest.java --- a/src/org/RhinoTests/CompiledScriptClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/CompiledScriptClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -79,7 +79,7 @@ /** * Object that represents the type of CompiledScript. */ - Class compiledScriptClass = null; + Class compiledScriptClass = null; @Override protected void setUp(String[] args) { @@ -403,6 +403,7 @@ /** * Test for instanceof operator applied to a class javax.script.CompiledScript */ + @SuppressWarnings("cast") protected void testInstanceOf() throws ScriptException { // tested object Object o = getCompiledScript("6*7"); @@ -412,7 +413,6 @@ // check operator instanceof against all superclasses assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); - assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); } /** diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/ScriptContextClassTest.java --- a/src/org/RhinoTests/ScriptContextClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/ScriptContextClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -347,6 +347,7 @@ /** * Test for instanceof operator applied to a class javax.script.ScriptContext */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new SimpleScriptContext(); diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/ScriptEngineClassTest.java --- a/src/org/RhinoTests/ScriptEngineClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/ScriptEngineClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -357,6 +357,7 @@ /** * Test for instanceof operator applied to a class javax.script.ScriptEngine */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript); diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/ScriptEngineManagerClassTest.java --- a/src/org/RhinoTests/ScriptEngineManagerClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/ScriptEngineManagerClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -387,6 +387,7 @@ /** * Test for instanceof operator applied to a class javax.script.ScriptEngineManager */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new ScriptEngineManager(); @@ -396,7 +397,6 @@ // check operator instanceof against all superclasses assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); - assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); } /** diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/ScriptExceptionClassTest.java --- a/src/org/RhinoTests/ScriptExceptionClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -67,7 +67,7 @@ /** * Object that represents the type of ScriptException. */ - Class scriptExceptionClass = null; + Class scriptExceptionClass = null; @Override protected void setUp(String[] args) { @@ -141,7 +141,7 @@ * Test for method javax.script.ScriptException.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.scriptExceptionClass.getInterfaces()); + List> interfaces = Arrays.asList(this.scriptExceptionClass.getInterfaces()); assertTrue(interfaces.isEmpty(), "list of implemented interfaces should be empty"); } @@ -226,13 +226,13 @@ testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int)", "javax.script.ScriptException"); testedConstructors.put("public javax.script.ScriptException(java.lang.String,java.lang.String,int,int)", "javax.script.ScriptException"); - Constructor[] constructors = this.scriptExceptionClass.getDeclaredConstructors(); + Constructor[] constructors = this.scriptExceptionClass.getDeclaredConstructors(); assertEquals(constructors.length, 4, "only 4 constructors should be set"); // check if all constructors exists - for (Constructor constructor : constructors) { - String constructorName = constructors[0].getName(); - String constructorString = constructors[0].toString(); + for (Constructor constructor : constructors) { + String constructorName = constructor.getName(); + String constructorString = constructor.toString(); assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); } @@ -406,6 +406,7 @@ /** * Test for instanceof operator applied to a class javax.script.ScriptException */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new ScriptException("script exception"); @@ -417,7 +418,6 @@ assertTrue(o instanceof Exception, "instanceof Exception is wrongly evaluated to false"); assertTrue(o instanceof Throwable, "instanceof Throwable is wrongly evaluated to false"); assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); - assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); } /** diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/SimpleBindingsClassTest.java --- a/src/org/RhinoTests/SimpleBindingsClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/SimpleBindingsClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -381,6 +381,7 @@ /** * Test for instanceof operator applied to a class javax.script.SimpleBindings */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new SimpleBindings(); @@ -390,7 +391,6 @@ // check operator instanceof against all superclasses assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); - assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); } /** diff -r 94e0142da92d -r a5384678025c src/org/RhinoTests/SimpleScriptContextClassTest.java --- a/src/org/RhinoTests/SimpleScriptContextClassTest.java Mon Sep 03 13:05:48 2012 +0200 +++ b/src/org/RhinoTests/SimpleScriptContextClassTest.java Thu Sep 06 15:39:22 2012 +0200 @@ -383,6 +383,7 @@ /** * Test for instanceof operator applied to a class javax.script.SimpleScriptContext */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = new SimpleScriptContext(); From adomurad at redhat.com Thu Sep 6 06:35:30 2012 From: adomurad at redhat.com (adomurad) Date: Thu, 06 Sep 2012 09:35:30 -0400 Subject: [fyi][icedtea-web] strict test In-Reply-To: <5048A495.8010900@redhat.com> References: <5048A495.8010900@redhat.com> Message-ID: <1346938530.6847.17.camel@adomurad-desktop> On Thu, 2012-09-06 at 15:26 +0200, Jiri Vanek wrote: > Just simple test about passing of -strict parameter. I Have written it to my to do long ago, donot > remember even why... so finally done... > > > 2012-09-06 Jiri Vanek > > Added strict test > * tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java: > Removed deprecated ServerAccess.ProcessResult > (testSimpletest1lunchOk) extracted asserting code > (checkLaunched) family of methods to evaluate output of application > (createStrictFile) method to prepare file which will pass strict checking > (testSimpletest1lunchOkStrictJnlp) new test, ensuring that even strict > file can be read without strict option > (testSimpletest1lunchNotOkJnlpStrict) new test ensuring that strictly > read no-strict file will fail > (testSimpletest1lunchOkStrictJnlpStrict) new test ensuring that strictly > read strict file will pass Hey just skimming, comments inline. > diff -r 83032226f86a > tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java > --- > a/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java Thu Sep 06 14:09:09 2012 +0200 > +++ > b/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java Thu Sep 06 15:18:48 2012 +0200 > @@ -35,7 +35,14 @@ > exception statement from your version. > */ > > - > +import java.io.File; > +import java.io.FileInputStream; > +import java.io.IOException; > +import java.net.MalformedURLException; > +import java.net.URL; > +import java.util.Arrays; > +import java.util.List; > +import net.sourceforge.jnlp.ProcessResult; > import net.sourceforge.jnlp.ServerAccess; > import org.junit.Assert; > > @@ -44,18 +51,63 @@ > public class SimpleTest1Test { > > private static ServerAccess server = new ServerAccess(); > + private static final List strict = Arrays.asList(new > String[]{"-strict", ServerAccess.VERBOSE_OPTION}); > > - > + private void checkLaunched(ProcessResult pr) { > + checkLaunched(pr, false); > + } > + > + private void checkLaunched(ProcessResult pr, boolean negate) { > + String s = "Good simple javaws exapmle"; > + if (negate) { > + Assert.assertFalse("testSimpletest1lunchOk stdout should > NOT contains " + s + " bud did", pr.stdout.contains(s)); > + } else { > + Assert.assertTrue("testSimpletest1lunchOk stdout should > contains " + s + " bud didn't", pr.stdout.contains(s)); > + } > + String ss = "xception"; > + if (negate) { Surely one of these should be !negate ?? > + Assert.assertTrue("testSimpletest1lunchOk stderr should > contains " + ss + " but didn't", pr.stderr.contains(ss)); > + } else { > + Assert.assertFalse("testSimpletest1lunchOk stderr should > not contains " + ss + " but did", pr.stderr.contains(ss)); > + } > + Assert.assertFalse(pr.wasTerminated); > + Assert.assertEquals((Integer) 0, pr.returnValue); > + } > > @Test > public void testSimpletest1lunchOk() throws Exception { > - ServerAccess.ProcessResult > pr=server.executeJavawsHeadless(null,"/simpletest1.jnlp"); > - String s="Good simple javaws exapmle"; > - Assert.assertTrue("testSimpletest1lunchOk stdout should > contains "+s+" bud didn't",pr.stdout.contains(s)); > - String ss="xception"; > - Assert.assertFalse("testSimpletest1lunchOk stderr should not > contains "+ss+" but did",pr.stderr.contains(ss)); > - Assert.assertFalse(pr.wasTerminated); > - Assert.assertEquals((Integer)0, pr.returnValue); > + ProcessResult pr = server.executeJavawsHeadless(null, > "/simpletest1.jnlp"); > + checkLaunched(pr); > } > > - } > + @Test > + public void testSimpletest1lunchNotOkJnlpStrict() throws > Exception { > + ProcessResult pr = server.executeJavawsHeadless(strict, > "/simpletest1.jnlp"); > + checkLaunched(pr, true); > + } > + > + @Test > + public void testSimpletest1lunchOkStrictJnlp() throws Exception { > + String originalResourceName = "simpletest1.jnlp"; > + String newResourceName = "simpletest1_strict.jnlp"; > + createStrictFile(originalResourceName, newResourceName, > server.getUrl("")); > + ProcessResult pr = server.executeJavawsHeadless(null, "/" + > newResourceName); > + checkLaunched(pr); > + } > + > + @Test > + public void testSimpletest1lunchOkStrictJnlpStrict() throws > Exception { > + String originalResourceName = "simpletest1.jnlp"; > + String newResourceName = "simpletest1_strict.jnlp"; > + createStrictFile(originalResourceName, newResourceName, > server.getUrl("")); > + ProcessResult pr = server.executeJavawsHeadless(strict, "/" + > newResourceName); > + checkLaunched(pr); > + } > + > + private void createStrictFile(String originalResourceName, String > newResourceName, URL codebase) throws MalformedURLException, > IOException { > + String originalContent = ServerAccess.getContentOfStream(new > FileInputStream(new File(server.getDir(), originalResourceName))); > + String nwContent1 = originalContent.replaceAll("href= > \"simpletest1.jnlp\"", "href=\"simpletest1_strict.jnlp\""); I'm not sure how I feel about this rewriting scheme. I suppose its less error prone here than putting it manually, and less work than a custom reproducer. One thing I would suggest though is, you rely on 'originalResourceName' to be passed to you, but then the method assumes the href is "simpletest1.jnlp". Surely you want to use originalResourceName and newResourceName variables here ? > + String nwContent = nwContent1.replaceAll("codebase=\".\"", > "codebase=\"" + codebase + "\""); > + ServerAccess.saveFile(nwContent, new File(server.getDir(), > newResourceName)); > + } > +} Will look into again once these are fixed. Thanks, Adam. From doko at ubuntu.com Thu Sep 6 06:53:30 2012 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 06 Sep 2012 15:53:30 +0200 Subject: [icedtea-web] [patch] use LDFLAGS, and allow overwriting some cpp macros Message-ID: <5048AADA.4070806@ubuntu.com> I'd like to see this on trunk and on the branches. - the link step should honour LDFLAGS, when passed LDFLAGS is passed to configure. - moving around VERSION_DEFS is a no-op for most cases, but allows overwriting some of the cpp defines. I'm using this to build the plugin for 6 and 7 with just one jdk installed. Matthias -------------- next part -------------- diff -r 956ca57557a0 ChangeLog --- a/ChangeLog Wed Sep 05 17:54:22 2012 -0400 +++ b/ChangeLog Thu Sep 06 15:48:22 2012 +0200 @@ -1,3 +1,9 @@ +2012-09-06 Matthias Klose + + * Makefile.am ($(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): Use LDFLAGS. + $(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc: Move VERSION_DEFS behind + macro definitions. + 2012-09-05 Jiri Vanek Fixing several errors which were causing incorrect behaviour causing diff -r 956ca57557a0 Makefile.am --- a/Makefile.am Wed Sep 05 17:54:22 2012 -0400 +++ b/Makefile.am Thu Sep 06 15:48:22 2012 +0200 @@ -259,7 +259,7 @@ mkdir -p $(PLUGIN_DIR) && \ cd $(PLUGIN_DIR) && \ $(CXX) $(CXXFLAGS) \ - $(DEFS) $(VERSION_DEFS) \ + $(DEFS) \ -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \ -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \ -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ @@ -267,6 +267,7 @@ -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \ -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \ -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \ + $(VERSION_DEFS) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(MOZILLA_CFLAGS) \ @@ -274,7 +275,7 @@ $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS)) cd $(PLUGIN_DIR) && \ - $(CXX) $(CXXFLAGS) \ + $(CXX) $(LDFLAGS) $(CXXFLAGS) \ $(PLUGIN_OBJECTS) \ $(GLIB_LIBS) \ $(GTK_LIBS) \ From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 07:13:11 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 14:13:11 +0000 Subject: [Bug 1158] New: OpenJDK 64-Bit Server VM warning: CodeCache is full seems bug Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1158 Priority: P3 Bug ID: 1158 Assignee: unassigned at icedtea.classpath.org Summary: OpenJDK 64-Bit Server VM warning: CodeCache is full seems bug Severity: normal Classification: Unclassified OS: Windows Reporter: tstmsc at ya.ru Hardware: x86 Status: NEW Version: unspecified Component: VisualVM Product: VisualVM Harness Hi, it looks like a bug in cb or in jdk or smth else, can you take a look plz. Compiler eats a lots of memmory or smth else i mean all what i give him is not enough for him, but when all boundaries comes over - it starts to give errors =\ Seems bug [QUOTE]OpenJDK 64-Bit Server VM warning: CodeCache is full. Compiler has been disabled.OpenJDK 64-Bit Server VM warning: Try increasing the code cache size using -XX:ReservedCodeCacheSize=Code Cache [0x00007f4602000000, 0x00007f4602610000, 0x00007f4608000000) total_blobs=2057 nmethods=1625 adapters=349 free_code_cache=92202Kb largest_free_block=94377344## A fatal error has been detected by the Java Runtime Environment:## SIGSEGV (0xb) at pc=0x00007f4611497be8, pid=633, tid=139938189145856## JRE version: 7.0_07-b30# Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops)# Problematic frame:x V [libjvm.so+0x4c0be8] AsyncGetCallTrace+0x66d28## Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again## An error report file with more information is saved as:x /root/servers/black/hs_err_pid633.log[/QUOTE] http://pastebin.com/ZmuVEtYz - log file another error with -XX:ReservedCodeCacheSize=512M [QUOTE]17:53:49 [INFO] [OFC] Version 1.6.1 enabled!OpenJDK 64-Bit Server VM warning: Attempt to allocate stack guard pages failed.[/QUOTE] and another error with -XX:ReservedCodeCacheSize=10G [QUOTE]## A fatal error has been detected by the Java Runtime Environment:## Internal Error (c1_LIRAssembler_x86.cpp:493), pid=639, tid=140677041424128# guarantee(code_offset() - offset <= deopt_handler_size) failed: overflow## JRE version: 7.0_07-b30# Java VM: OpenJDK 64-Bit Server VM (23.2-b09 mixed mode linux-amd64 compressed oops)# Core dump written. Default location: /root/servers/black/core or core.639## An error report file with more information is saved as:x /root/servers/black/hs_err_pid639.log## If you would like to submit a bug report, please include# instructions on how to reproduce the bug and visit:x http://icedtea.classpath.org/bugzilla#Restarting[/QUOTE] Have HugePages(23gb) HugePages_Total: 11776 HugePages_Free: 11776 java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (ArchLinux build 7.u7_2.3.2-1-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode) befor start use ulimit -c unlimited -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/a17b5679/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 07:13:36 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 14:13:36 +0000 Subject: [Bug 1158] OpenJDK 64-Bit Server VM warning: CodeCache is full seems bug In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1158 tstmsc at ya.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|x86 |64-bit OS|Windows |Linux -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/30ebb4eb/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 07:13:54 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 14:13:54 +0000 Subject: [Bug 1158] OpenJDK 64-Bit Server VM warning: CodeCache is full seems bug In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1158 tstmsc at ya.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |blocker -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/a263ca8f/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 09:03:12 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 16:03:12 +0000 Subject: [Bug 1158] OpenJDK 64-Bit Server VM warning: CodeCache is full seems bug In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1158 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ahughes at redhat.com Component|VisualVM |IcedTea Assignee|unassigned at icedtea.classpat |ahughes at redhat.com |h.org | Product|VisualVM Harness |IcedTea Severity|blocker |normal -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/e5ba7b10/attachment.html From jvanek at redhat.com Thu Sep 6 10:33:58 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 06 Sep 2012 19:33:58 +0200 Subject: [fyi][icedtea-web] strict test In-Reply-To: <1346938530.6847.17.camel@adomurad-desktop> References: <5048A495.8010900@redhat.com> <1346938530.6847.17.camel@adomurad-desktop> Message-ID: <5048DE86.80604@redhat.com> On 09/06/2012 03:35 PM, adomurad wrote: > On Thu, 2012-09-06 at 15:26 +0200, Jiri Vanek wrote: >> Just simple test about passing of -strict parameter. I Have written it to my to do long ago, donot >> remember even why... so finally done... >> >> /// > > Hey just skimming, comments inline. Thanx for review! > > ... >> + } >> + String ss = "xception"; >> + if (negate) { > Surely one of these should be !negate ?? Surely not! Do I see something wrong? (possible) What do you don't like? >> + Assert.assertTrue("testSimpletest1lunchOk stderr should ... >> + } >> + >> + private void createStrictFile(String originalResourceName, String >> newResourceName, URL codebase) throws MalformedURLException, >> IOException { >> + String originalContent = ServerAccess.getContentOfStream(new >> FileInputStream(new File(server.getDir(), originalResourceName))); >> + String nwContent1 = originalContent.replaceAll("href= >> \"simpletest1.jnlp\"", "href=\"simpletest1_strict.jnlp\""); > I'm not sure how I feel about this rewriting scheme. I suppose its less > error prone here than putting it manually, and less work than a custom > reproducer. The reason for this is the codebase. I need full url here, that means knowledge of port. And port is known only in runtime :( So i will need this substitution even where there will be some simple1_strict.jnlp.in, there will still be needed substitution. > > One thing I would suggest though is, you rely on 'originalResourceName' > to be passed to you, but then the method assumes the href is > "simpletest1.jnlp". Surely you want to use originalResourceName and I have done this intentionally, but actually - why not. Minor fixed patch atatched. J. > newResourceName variables here ? >> + String nwContent = nwContent1.replaceAll("codebase=\".\"", >> "codebase=\"" + codebase + "\""); >> + ServerAccess.saveFile(nwContent, new File(server.getDir(), >> newResourceName)); >> + } >> +} > > Will look into again once these are fixed. > Thanks, Adam. > -------------- next part -------------- A non-text attachment was scrubbed... Name: strictTest2.diff Type: text/x-patch Size: 4257 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/712a6543/strictTest2.diff From adomurad at redhat.com Thu Sep 6 11:03:40 2012 From: adomurad at redhat.com (adomurad) Date: Thu, 06 Sep 2012 14:03:40 -0400 Subject: [fyi][icedtea-web] strict test In-Reply-To: <5048DE86.80604@redhat.com> References: <5048A495.8010900@redhat.com> <1346938530.6847.17.camel@adomurad-desktop> <5048DE86.80604@redhat.com> Message-ID: <1346954620.17468.2.camel@adomurad-desktop> On Thu, 2012-09-06 at 19:33 +0200, Jiri Vanek wrote: > On 09/06/2012 03:35 PM, adomurad wrote: > > On Thu, 2012-09-06 at 15:26 +0200, Jiri Vanek wrote: > >> Just simple test about passing of -strict parameter. I Have written it to my to do long ago, donot > >> remember even why... so finally done... > >> > >> > /// > > > > Hey just skimming, comments inline. > > Thanx for review! > > > > > ... > >> + } > >> + String ss = "xception"; > >> + if (negate) { > > Surely one of these should be !negate ?? > > Surely not! Do I see something wrong? (possible) > What do you don't like? Sorry, I utterly misread the code! It read it as two if (negate) {} blocks and missed the else. > > >> + Assert.assertTrue("testSimpletest1lunchOk stderr should > ... > >> + } > >> + > >> + private void createStrictFile(String originalResourceName, String > >> newResourceName, URL codebase) throws MalformedURLException, > >> IOException { > >> + String originalContent = ServerAccess.getContentOfStream(new > >> FileInputStream(new File(server.getDir(), originalResourceName))); > >> + String nwContent1 = originalContent.replaceAll("href= > >> \"simpletest1.jnlp\"", "href=\"simpletest1_strict.jnlp\""); > > I'm not sure how I feel about this rewriting scheme. I suppose its less > > error prone here than putting it manually, and less work than a custom > > reproducer. > > The reason for this is the codebase. I need full url here, that means knowledge of port. And port is known only in runtime :( > So i will need this substitution even where there will be some simple1_strict.jnlp.in, there will still be needed substitution. Ah, rightly so. > > > > One thing I would suggest though is, you rely on 'originalResourceName' > > to be passed to you, but then the method assumes the href is > > "simpletest1.jnlp". Surely you want to use originalResourceName and > > I have done this intentionally, but actually - why not. The other option would be to just not take any parameters :) thanks > > Minor fixed patch atatched. > > J. > > newResourceName variables here ? > >> + String nwContent = nwContent1.replaceAll("codebase=\".\"", > >> "codebase=\"" + codebase + "\""); > >> + ServerAccess.saveFile(nwContent, new File(server.getDir(), > >> newResourceName)); > >> + } > >> +} > > > > Will look into again once these are fixed. > > Thanks, Adam. > > > OK for HEAD. From bugzilla-daemon at icedtea.classpath.org Thu Sep 6 12:08:53 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 06 Sep 2012 19:08:53 +0000 Subject: [Bug 1049] Extension jnlp's signed jar with the content of only META-INF/* is considered unsigned In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1049 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120906/66c7e939/attachment.html From ddadacha at gmail.com Thu Sep 6 13:07:43 2012 From: ddadacha at gmail.com (Danesh Dadachanji) Date: Thu, 6 Sep 2012 16:07:43 -0400 Subject: [RFC][icedtea-web] Fix for single instance service with applets using jnlp_href In-Reply-To: <5047314C.3090106@redhat.com> References: <4F2849F3.2030003@redhat.com> <4F5DD2F8.8000904@redhat.com> <4F5E2C2F.7090603@redhat.com> <4F912D3C.9080804@redhat.com> <4FB54921.1010106@redhat.com> <50369334.6000207@redhat.com> <50462FC1.9040806@redhat.com> <1346791681.6847.9.camel@adomurad-desktop> <5047314C.3090106@redhat.com> Message-ID: On Wed, Sep 5, 2012 at 7:02 AM, Jiri Vanek wrote: > On 09/04/2012 10:48 PM, adomurad wrote: >> >> Comments inline. >> > > Thanx. Pushed to head and 1.3 > > Thanks so much for finishing this off Jiri! >>> So here is his patch with finished and test: >>> > ... > >>> + if (JNLPRuntime.isDebug()) { >>> + System.out.println("Single instance applet is already >>> running."); >>> + } >>> + throw launchError(new LaunchException(file, ieex, >>> R("LSFatal"), R("LCLaunching"), R("LCouldNotLaunch"), >>> R("LSingleInstanceExists"))); >> >> A new exception type for these calls (as you said) would probably be good. > > > Not done - there is already InstanceRunning exception, and Danesh have > wrapped it (see ieex above) > So I'm considering it as more correct. > > FWIW, I copied existing code from the webstart calls to this. IIRC, the Launcher class needs a LaunchError to be caught but uses the ieex as the reason afterwards. That's where the "single instance exists" mention in the exception message comes from. Cheers, Danesh >>> } catch (LaunchException lex) { >>> throw launchError(lex); > > ... > >>> + } >>> + } >>> + >>> + //killer is started when params are recieved, or when application is >>> running to long >> >> recieved -> received :) (nit, non-blocker) >>> >>> + private void startKiller(int a) { >>> + synchronized (self) { >>> + if (killer == null) { > > ... > >>> + } >>> + System.out.println("Paramaters received by >>> SingleInstanceChecker:" + paramsString); >> >> paramaters -> parameters in a few places (nit, non-blocker) > > > Both fixed. Thanx >>> >>> >>> + startKiller(1); >>> + } > > ... > >>> + >>> + } >> >> I don't know how I feel about this main 'test'. I suppose theres no better >> place for it. > > > Ok. Kept and moved to the Javadoc of main method (as You wished?) Removed > from bottom where you didnt like it. > >>> + /** >>> + *Passed /SingleInstanceTest.jnlp x /SingleInstanceTest.jnlp >>> + *Passed /SingleInstanceTest.jnlp x /SingleInstanceTestWS.jnlp >>> + *FAILED /SingleInstanceTest.jnlp x >>> /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTest.jnlp x >>> /SingleInstanceTest_clasical.html - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *Passed /SingleInstanceTestWS.jnlp x /SingleInstanceTest.jnlp >>> + *Passed /SingleInstanceTestWS.jnlp x /SingleInstanceTestWS.jnlp >>> + *java.lang.NoSuchMethodException: SingleInstanceTest.access$000() >>> + *FAILED /SingleInstanceTestWS.jnlp x >>> /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTestWS.jnlp x >>> /SingleInstanceTest_clasical.html - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTest_jnlpHref.html x >>> /SingleInstanceTest.jnlp - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTest_jnlpHref.html x >>> /SingleInstanceTestWS.jnlp - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *Passed /SingleInstanceTest_jnlpHref.html x >>> /SingleInstanceTest_jnlpHref.html >>> + *FAILED /SingleInstanceTest_jnlpHref.html x >>> /SingleInstanceTest_clasical.html - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTest_clasical.html x >>> /SingleInstanceTest.jnlp - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTest_clasical.html x >>> /SingleInstanceTestWS.jnlp - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *FAILED /SingleInstanceTest_clasical.html x >>> /SingleInstanceTest_jnlpHref.html - java.lang.AssertionError: >>> SingleInstanceTest.main's first PR stdout should contain Paramaters received >>> by SingleInstanceChecker but didn't >>> + *Passed /SingleInstanceTest_clasical.html x >>> /SingleInstanceTest_clasical.html >>> + */ >>> +} >> >> Please put a comment on the top of this block or remove it ... its >> rather confusing to see when skimming the test. >> >> Fine to push assuming tests pass - the only thing that I really want >> changed before pushing is a comment before the block of Pass/FAIL's, or >> its removal. Exception could be good to add too but its up to you. > > > Yap they are passing everywhere except epiphany in f16 (whic is ignoring > --new-tab) >> >> > From danesh.d90 at gmail.com Thu Sep 6 13:03:20 2012 From: danesh.d90 at gmail.com (Danesh Dadachanji) Date: Thu, 6 Sep 2012 16:03:20 -0400 Subject: IcedTea-Web 1.3 released! In-Reply-To: <1346938681.6847.20.camel@adomurad-desktop> References: <20120905220954.GB4504@redhat.com> <1346938681.6847.20.camel@adomurad-desktop> Message-ID: On Thu, Sep 6, 2012 at 9:38 AM, adomurad wrote: > On Wed, 2012-09-05 at 18:09 -0400, Deepak Bhole wrote: >> Hi Everyone, >> >> IcedTea-Web 1.3 is now released and available for download! >> >> This release is the first of what we hope will be regular releases based on >> time rather than features. It includes many bug fixes and new features. Some of >> the highlights include: >> >> New features: >> - Web Start launch errors are now printed to give proper indication as to the >> cause >> - Significant performance improvement when loading applets that refer to >> missing classes >> - Support for latest versions of Chromium >> - Security warning dialog improvements to better clarify security request >> - Support build with GTK2 and GTK3 >> - Cookie write support (i.e set cookies in browser via Java/Applet) >> >> Bug fixes: >> Common: >> - Applet window icon improved >> >> Plug-in: >> - PR975: Ignore classpaths specified in jar manifests when using jnlp_href >> - PR1011: Treat folders as such when specified in archive tags >> - PR855: AppletStub getDocumentBase() now returns full URL >> - PR722: Unsigned META-INF entries are ignored >> - PR861: Jars can now load from non codebase hosts >> >> Web Start: >> - PR898: Large signed JNLP files now supported >> - PR811: URLs with spaces now handled correctly >> >> Full notes with bug ids are available in the NEWS file: >> http://icedtea.classpath.org/hg/release/icedtea-web-1.3/file/a63733958565/NEWS >> >> Available for download here: >> http://icedtea.classpath.org/download/source/icedtea-web-1.3.tar.gz >> >> Build instructions are here: >> http://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web >> >> SHA256 sum: >> d46ec10700732cea103da2aae64ff01e717cb1281b83e1797ce48cc53280b49f icedtea-web-1.3.tar.gz >> >> Thanks to everyone who helped with this release: >> Danesh Dadachanji >> Adam Domurad >> Peter Hatina >> Lars Herschke >> Andrew Hughes >> Omair Majid >> Thomas Meyer >> Saad Mohammad >> Martin Olsson >> Jiri Vanek > > (Adding Danesh to cc.) > No need, I'm already on distro. =) Cheers, Danesh From dbhole at redhat.com Thu Sep 6 14:29:05 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 6 Sep 2012 17:29:05 -0400 Subject: [icedtea-web] [patch] use LDFLAGS, and allow overwriting some cpp macros In-Reply-To: <5048AADA.4070806@ubuntu.com> References: <5048AADA.4070806@ubuntu.com> Message-ID: <20120906212904.GB22595@redhat.com> * Matthias Klose [2012-09-06 10:19]: > I'd like to see this on trunk and on the branches. > > - the link step should honour LDFLAGS, when passed > LDFLAGS is passed to configure. > > - moving around VERSION_DEFS is a no-op for most > cases, but allows overwriting some of the cpp defines. > I'm using this to build the plugin for 6 and 7 with > just one jdk installed. > What sort of defs do you need to override that require VERSION_DEFS to be moved? If one of the following definitions if being set forcibly when it should be variable, I'd rather that we fix that instead of just moving VERSION_DEFS. Cheers, Deepak > Matthias > > diff -r 956ca57557a0 ChangeLog > --- a/ChangeLog Wed Sep 05 17:54:22 2012 -0400 > +++ b/ChangeLog Thu Sep 06 15:48:22 2012 +0200 > @@ -1,3 +1,9 @@ > +2012-09-06 Matthias Klose > + > + * Makefile.am ($(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): Use LDFLAGS. > + $(PLUGIN_DIR)/%.o: $(PLUGIN_SRCDIR)/%.cc: Move VERSION_DEFS behind > + macro definitions. > + > 2012-09-05 Jiri Vanek > > Fixing several errors which were causing incorrect behaviour causing > diff -r 956ca57557a0 Makefile.am > --- a/Makefile.am Wed Sep 05 17:54:22 2012 -0400 > +++ b/Makefile.am Thu Sep 06 15:48:22 2012 +0200 > @@ -259,7 +259,7 @@ > mkdir -p $(PLUGIN_DIR) && \ > cd $(PLUGIN_DIR) && \ > $(CXX) $(CXXFLAGS) \ > - $(DEFS) $(VERSION_DEFS) \ > + $(DEFS) \ > -DJDK_UPDATE_VERSION="\"$(JDK_UPDATE_VERSION)\"" \ > -DPLUGIN_NAME="\"IcedTea-Web Plugin\"" \ > -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ > @@ -267,6 +267,7 @@ > -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \ > -DICEDTEA_WEB_JRE="\"$(SYSTEM_JRE_DIR)\"" \ > -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \ > + $(VERSION_DEFS) \ > $(GLIB_CFLAGS) \ > $(GTK_CFLAGS) \ > $(MOZILLA_CFLAGS) \ > @@ -274,7 +275,7 @@ > > $(PLUGIN_DIR)/$(BUILT_PLUGIN_LIBRARY): $(addprefix $(PLUGIN_DIR)/,$(PLUGIN_OBJECTS)) > cd $(PLUGIN_DIR) && \ > - $(CXX) $(CXXFLAGS) \ > + $(CXX) $(LDFLAGS) $(CXXFLAGS) \ > $(PLUGIN_OBJECTS) \ > $(GLIB_LIBS) \ > $(GTK_LIBS) \ From ptisnovs at icedtea.classpath.org Fri Sep 7 01:17:11 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 07 Sep 2012 08:17:11 +0000 Subject: /hg/gfx-test: Added new annotations for gfx. tests: BitBltOperat... Message-ID: changeset bea796a9cf11 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=bea796a9cf11 author: Pavel Tisnovsky date: Fri Sep 07 10:19:46 2012 +0200 Added new annotations for gfx. tests: BitBltOperation, RasterOperation, OtherOperation. diffstat: ChangeLog | 16 + Makefile | 6 + src/org/gfxtest/framework/annotations/BitBltOperation.java | 60 +++++ src/org/gfxtest/framework/annotations/BitBltOperations.java | 76 +++++++ src/org/gfxtest/framework/annotations/OtherOperation.java | 60 +++++ src/org/gfxtest/framework/annotations/OtherOperations.java | 66 ++++++ src/org/gfxtest/framework/annotations/RasterOperation.java | 60 +++++ src/org/gfxtest/framework/annotations/RasterOperations.java | 123 ++++++++++++ src/org/gfxtest/testsuites/BitBltBasicTests.java | 2 +- src/org/gfxtest/testsuites/BitBltMirrorImage.java | 2 +- src/org/gfxtest/testsuites/BitBltRotateImage.java | 2 +- src/org/gfxtest/testsuites/BitBltScaleImage.java | 2 +- 12 files changed, 471 insertions(+), 4 deletions(-) diffs (truncated from 556 to 500 lines): diff -r 15eba2d75bf7 -r bea796a9cf11 ChangeLog --- a/ChangeLog Thu Sep 06 09:33:59 2012 +0200 +++ b/ChangeLog Fri Sep 07 10:19:46 2012 +0200 @@ -1,3 +1,19 @@ +2012-09-07 Pavel Tisnovsky + + * src/org/gfxtest/framework/annotations/BitBltOperation.java: + * src/org/gfxtest/framework/annotations/BitBltOperations.java: + * src/org/gfxtest/framework/annotations/OtherOperation.java: + * src/org/gfxtest/framework/annotations/OtherOperations.java: + * src/org/gfxtest/framework/annotations/RasterOperation.java: + * src/org/gfxtest/framework/annotations/RasterOperations.java: + Added new annotations for gfx. tests. + * src/org/gfxtest/testsuites/BitBltBasicTests.java: + * src/org/gfxtest/testsuites/BitBltMirrorImage.java: + * src/org/gfxtest/testsuites/BitBltRotateImage.java: + * src/org/gfxtest/testsuites/BitBltScaleImage.java: + Fixed annotations for these tests. + * Makefile: Added new classes to compile. + 2012-09-06 Pavel Tisnovsky * src/org/gfxtest/framework/annotations/GraphicsPrimitives.java: diff -r 15eba2d75bf7 -r bea796a9cf11 Makefile --- a/Makefile Thu Sep 06 09:33:59 2012 +0200 +++ b/Makefile Fri Sep 07 10:19:46 2012 +0200 @@ -80,6 +80,12 @@ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/PathVariants.class \ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/ShapeVariant.class \ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/ShapeVariants.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/BitBltOperation.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/BitBltOperations.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/OtherOperation.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/OtherOperations.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/RasterOperation.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/annotations/RasterOperations.class \ $(CLASSES)/$(FRAMEWORK_DIR)/annotations/Zoom.class \ $(CLASSES)/$(FRAMEWORK_DIR)/ColorPalette.class \ $(CLASSES)/$(FRAMEWORK_DIR)/GrayscalePalette.class \ diff -r 15eba2d75bf7 -r bea796a9cf11 src/org/gfxtest/framework/annotations/BitBltOperation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/BitBltOperation.java Fri Sep 07 10:19:46 2012 +0200 @@ -0,0 +1,60 @@ +/* + Java gfx-test framework + + Copyright (C) 2010, 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + + + +/** + * Declaration of interface used to specify BitBlt operation for selected test + * suite. + * + * @see BitBltOperations + * + * @author Pavel Tisnovsky + */ + at Retention(RetentionPolicy.RUNTIME) +public @interface BitBltOperation +{ + BitBltOperations values(); +} diff -r 15eba2d75bf7 -r bea796a9cf11 src/org/gfxtest/framework/annotations/BitBltOperations.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/BitBltOperations.java Fri Sep 07 10:19:46 2012 +0200 @@ -0,0 +1,76 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + + + +/** + * BitBlt operations applied as part of some rendering tests. + * + * @author Pavel Tisnovsky + */ +public enum BitBltOperations +{ + /** + * Normal BitBlt. + */ + BITBLT, + + /** + * Crop operation. + */ + CROP, + + /** + * Mirror. + */ + MIRROR, + + /** + * Rotation. + */ + ROTATE, + + /** + * Scaling. + */ + SCALE +} diff -r 15eba2d75bf7 -r bea796a9cf11 src/org/gfxtest/framework/annotations/OtherOperation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/OtherOperation.java Fri Sep 07 10:19:46 2012 +0200 @@ -0,0 +1,60 @@ +/* + Java gfx-test framework + + Copyright (C) 2010, 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + + + +/** + * Declaration of interface used to specify other operation for selected test + * suite. + * + * @see OtherOperations + * + * @author Pavel Tisnovsky + */ + at Retention(RetentionPolicy.RUNTIME) +public @interface OtherOperation +{ + OtherOperations values(); +} diff -r 15eba2d75bf7 -r bea796a9cf11 src/org/gfxtest/framework/annotations/OtherOperations.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/OtherOperations.java Fri Sep 07 10:19:46 2012 +0200 @@ -0,0 +1,66 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + + + +/** + * Other operations applied as part of some rendering tests. + * + * @author Pavel Tisnovsky + */ +public enum OtherOperations +{ + /** + * None operations are applied. + */ + NONE, + + /** + * Alpha composition. + */ + ALPHA_COMPOSITE, + + /** + * Clip operation. + */ + CLIP_REGION, +} diff -r 15eba2d75bf7 -r bea796a9cf11 src/org/gfxtest/framework/annotations/RasterOperation.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/RasterOperation.java Fri Sep 07 10:19:46 2012 +0200 @@ -0,0 +1,60 @@ +/* + Java gfx-test framework + + Copyright (C) 2010, 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; + + + +/** + * Declaration of interface used to specify raster operation for selected test + * suite. + * + * @see RasterOperations + * + * @author Pavel Tisnovsky + */ + at Retention(RetentionPolicy.RUNTIME) +public @interface RasterOperation +{ + RasterOperations values(); +} diff -r 15eba2d75bf7 -r bea796a9cf11 src/org/gfxtest/framework/annotations/RasterOperations.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/annotations/RasterOperations.java Fri Sep 07 10:19:46 2012 +0200 @@ -0,0 +1,123 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.framework.annotations; + + + +/** + * Raster operations applied as part of some rendering tests. + * + * @author Pavel Tisnovsky + */ +public enum RasterOperations +{ + /** + * Both the color and the alpha of the destination are cleared (Porter-Duff + * Clear rule). + */ + CLEAR, + + /** + * The destination is left untouched (Porter-Duff Destination rule). + * */ + DST, + + /** + * The part of the destination lying inside of the source is composited over + * the source and replaces the destination (Porter-Duff Destination Atop + * Source rule). + */ + DST_ATOP, + + /** + * The part of the destination lying inside of the source replaces the + * destination (Porter-Duff Destination In Source rule). + */ + DST_IN, + + /** + * The part of the destination lying outside of the source replaces the + * destination (Porter-Duff Destination Held Out By Source rule). + */ + DST_OUT, + + /** + * The destination is composited over the source and the result replaces the + * destination (Porter-Duff Destination Over Source rule). + */ + DST_OVER, + + /** + * The source is copied to the destination (Porter-Duff Source rule). + */ + SRC, + + /** + * The part of the source lying inside of the destination is composited onto + * the destination (Porter-Duff Source Atop Destination rule). + */ + SRC_ATOP, + + /** + * The part of the source lying inside of the destination replaces the + * destination (Porter-Duff Source In Destination rule). + */ + SRC_IN, + + /** + * The part of the source lying outside of the destination replaces the + * destination (Porter-Duff Source Held Out By Destination rule). + */ + SRC_OUT, + + /** + * The source is composited over the destination (Porter-Duff Source Over + * Destination rule). + */ + SRC_OVER, From ptisnovs at icedtea.classpath.org Fri Sep 7 01:31:14 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 07 Sep 2012 08:31:14 +0000 Subject: /hg/rhino-tests: Various enhancements and corrections: make inne... Message-ID: changeset e3f5a19ce034 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=e3f5a19ce034 author: Pavel Tisnovsky date: Fri Sep 07 10:33:47 2012 +0200 Various enhancements and corrections: make inner classes static, encoding of external files containing script are now explicitly specified, platform-specific line separator is used in System.out.printf() method. diffstat: ChangeLog | 10 ++++++++++ src/org/RhinoTests/Constants.java | 7 ++++--- src/org/RhinoTests/JavaScriptsTest.java | 21 ++++++++++++++------- src/org/RhinoTests/ScriptEngineFactoryTest.java | 6 +++--- src/org/RhinoTests/ScriptExceptionTest.java | 23 ++++++++++++++--------- 5 files changed, 45 insertions(+), 22 deletions(-) diffs (249 lines): diff -r a5384678025c -r e3f5a19ce034 ChangeLog --- a/ChangeLog Thu Sep 06 15:39:22 2012 +0200 +++ b/ChangeLog Fri Sep 07 10:33:47 2012 +0200 @@ -1,3 +1,13 @@ +2012-09-07 Pavel Tisnovsky + + * src/org/RhinoTests/Constants.java: + Enhancement: inner classes are static. + * src/org/RhinoTests/JavaScriptsTest.java: + * src/org/RhinoTests/ScriptExceptionTest.java: + Corrected: specified encoding of external files containing script. + * src/org/RhinoTests/ScriptEngineFactoryTest.java: + Corrected: use platform-specific line separator. + 2012-09-06 Pavel Tisnovsky * src/org/RhinoTests/AbstractScriptEngineClassTest.java: diff -r a5384678025c -r e3f5a19ce034 src/org/RhinoTests/Constants.java --- a/src/org/RhinoTests/Constants.java Thu Sep 06 15:39:22 2012 +0200 +++ b/src/org/RhinoTests/Constants.java Fri Sep 07 10:33:47 2012 +0200 @@ -46,12 +46,13 @@ * @author Pavel Tisnovsky */ public class Constants { + /** * Constants for known engine names or aliases for JavaScript engine. * * @author Pavel Tisnovsky */ - public class EngineNames { + public static class EngineNames { protected static final String ENGINE_NAME_JavaScript = "JavaScript"; protected static final String ENGINE_NAME_javascript = "javascript"; protected static final String ENGINE_NAME_ECMAScript = "ECMAScript"; @@ -65,7 +66,7 @@ * * @author Pavel Tisnovsky */ - public class MimeTypes { + public static class MimeTypes { protected static final String MIME_TYPE_TEXT_JAVASCRIPT = "text/javascript"; protected static final String MIME_TYPE_TEXT_ECMASCRIPT = "text/ecmascript"; protected static final String MIME_TYPE_APPLICATION_JAVASCRIPT = "application/javascript"; @@ -77,7 +78,7 @@ * * @author Pavel Tisnovsky */ - public class FileExtensions { + public static class FileExtensions { protected static final String EXTENSION_js = "js"; } diff -r a5384678025c -r e3f5a19ce034 src/org/RhinoTests/JavaScriptsTest.java --- a/src/org/RhinoTests/JavaScriptsTest.java Thu Sep 06 15:39:22 2012 +0200 +++ b/src/org/RhinoTests/JavaScriptsTest.java Fri Sep 07 10:33:47 2012 +0200 @@ -43,6 +43,7 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.io.StringReader; +import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -59,6 +60,11 @@ * @author Pavel Tisnovsky */ public class JavaScriptsTest extends BaseRhinoTest { + /** + * Encoding used in JavaScript files. + */ + private static final String SCRIPT_DEFAULT_ENCODING = "UTF-8"; + ScriptEngineManager engineManager; ScriptEngine scriptEngine; @@ -338,10 +344,11 @@ * * @throws ScriptException * this exception is thrown when this test case failed. + * @throws UnsupportedEncodingException */ - protected void testRunSimpleScriptStoredInFile() throws ScriptException { + protected void testRunSimpleScriptStoredInFile() throws ScriptException, UnsupportedEncodingException { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_hello_world.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } /** @@ -353,7 +360,7 @@ */ protected void testRunEmptyScript1StoredInFile() throws Exception { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_empty_script_1.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } /** @@ -366,7 +373,7 @@ protected void testRunScriptContainingUnknownFunctionFromFile() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_unknown_function.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -384,7 +391,7 @@ protected void testRunScriptContainingError1FromFile() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -402,7 +409,7 @@ protected void testRunScriptContainingError2FromFile() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_1.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -419,7 +426,7 @@ protected void testRunSimpleScriptFromStoredInNonexistent() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/file_not_exists.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (NullPointerException e) { return; // ok, it's correct if this exception is thrown diff -r a5384678025c -r e3f5a19ce034 src/org/RhinoTests/ScriptEngineFactoryTest.java --- a/src/org/RhinoTests/ScriptEngineFactoryTest.java Thu Sep 06 15:39:22 2012 +0200 +++ b/src/org/RhinoTests/ScriptEngineFactoryTest.java Fri Sep 07 10:33:47 2012 +0200 @@ -98,11 +98,11 @@ String languageName = factory.getLanguageName(); String languageVersion = factory.getLanguageVersion(); - System.out.printf("\tScript Engine: %s (%s)\n", engineName, engineVersion); + System.out.printf("\tScript Engine: %s (%s)%n", engineName, engineVersion); for (String name : factory.getNames()) { - System.out.printf("\tEngine Alias: %s\n", name); + System.out.printf("\tEngine Alias: %s%n", name); } - System.out.printf("\tLanguage: %s (%s)\n", languageName, languageVersion); + System.out.printf("\tLanguage: %s (%s)%n", languageName, languageVersion); } } diff -r a5384678025c -r e3f5a19ce034 src/org/RhinoTests/ScriptExceptionTest.java --- a/src/org/RhinoTests/ScriptExceptionTest.java Thu Sep 06 15:39:22 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionTest.java Fri Sep 07 10:33:47 2012 +0200 @@ -55,6 +55,11 @@ * @author Pavel Tisnovsky */ public class ScriptExceptionTest extends BaseRhinoTest { + /** + * Encoding used in JavaScript files. + */ + private static final String SCRIPT_DEFAULT_ENCODING = "UTF-8"; + ScriptEngineManager engineManager; ScriptEngine scriptEngine; Invocable invocableEngine; @@ -244,7 +249,7 @@ protected void testBasicScriptExceptionTestErrorInExternalScript1() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_unknown_function.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -263,7 +268,7 @@ protected void testBasicScriptExceptionTestErrorInExternalScript2() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -282,7 +287,7 @@ protected void testBasicScriptExceptionTestErrorInExternalScript3() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_1.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -301,7 +306,7 @@ protected void testBasicScriptExceptionTestErrorInExternalScript4() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { return; // ok, it's correct if this exception is thrown @@ -362,7 +367,7 @@ protected void testScriptExceptionTestLineNumber3() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_unknown_function.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { assertEquals(1, e.getLineNumber(), "wrong line number returned " + e.getLineNumber()); @@ -382,7 +387,7 @@ protected void testScriptExceptionTestLineNumber4() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_parameter.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { assertEquals(1, e.getLineNumber(), "wrong line number returned " + e.getLineNumber()); @@ -402,7 +407,7 @@ protected void testScriptExceptionTestLineNumber5() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_1.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { assertEquals(1, e.getLineNumber(), "wrong line number returned " + e.getLineNumber()); @@ -422,7 +427,7 @@ protected void testScriptExceptionTestLineNumber6() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_2.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { assertEquals(3, e.getLineNumber(), "wrong line number returned " + e.getLineNumber()); @@ -442,7 +447,7 @@ protected void testScriptExceptionTestLineNumber7() throws Exception { try { InputStream inputStream = this.getClass().getResourceAsStream("scripts/test_invalid_command_3.js"); - this.scriptEngine.eval(new InputStreamReader(inputStream)); + this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { assertEquals(3, e.getLineNumber(), "wrong line number returned " + e.getLineNumber()); From jvanek at icedtea.classpath.org Fri Sep 7 04:47:53 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 07 Sep 2012 11:47:53 +0000 Subject: /hg/icedtea-web: Added strict test Message-ID: changeset 0db02eca94bf in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=0db02eca94bf author: Jiri Vanek date: Fri Sep 07 13:52:23 2012 +0200 Added strict test diffstat: ChangeLog | 15 ++ tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java | 72 ++++++++- 2 files changed, 77 insertions(+), 10 deletions(-) diffs (114 lines): diff -r 83032226f86a -r 0db02eca94bf ChangeLog --- a/ChangeLog Thu Sep 06 14:09:09 2012 +0200 +++ b/ChangeLog Fri Sep 07 13:52:23 2012 +0200 @@ -1,3 +1,18 @@ +2012-09-07 Jiri Vanek + + Added strict test + * tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java: + Removed deprecated ServerAccess.ProcessResult + (testSimpletest1lunchOk) extracted asserting code + (checkLaunched) family of methods to evaluate output of application + (createStrictFile) method to prepare file which will pass strict checking + (testSimpletest1lunchOkStrictJnlp) new test, ensuring that even strict + file can be read without strict option + (testSimpletest1lunchNotOkJnlpStrict) new test ensuring that strictly + read no-strict file will fail + (testSimpletest1lunchOkStrictJnlpStrict) new test ensuring that strictly + read strict file will pass + 2012-09-06 Jiri Vanek Fixing several typos from previous push diff -r 83032226f86a -r 0db02eca94bf tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java --- a/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java Thu Sep 06 14:09:09 2012 +0200 +++ b/tests/reproducers/simple/simpletest1/testcases/SimpleTest1Test.java Fri Sep 07 13:52:23 2012 +0200 @@ -35,7 +35,14 @@ exception statement from your version. */ - +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Arrays; +import java.util.List; +import net.sourceforge.jnlp.ProcessResult; import net.sourceforge.jnlp.ServerAccess; import org.junit.Assert; @@ -44,18 +51,63 @@ public class SimpleTest1Test { private static ServerAccess server = new ServerAccess(); + private static final List strict = Arrays.asList(new String[]{"-strict", ServerAccess.VERBOSE_OPTION}); - + private void checkLaunched(ProcessResult pr) { + checkLaunched(pr, false); + } + + private void checkLaunched(ProcessResult pr, boolean negate) { + String s = "Good simple javaws exapmle"; + if (negate) { + Assert.assertFalse("testSimpletest1lunchOk stdout should NOT contains " + s + " bud did", pr.stdout.contains(s)); + } else { + Assert.assertTrue("testSimpletest1lunchOk stdout should contains " + s + " bud didn't", pr.stdout.contains(s)); + } + String ss = "xception"; + if (negate) { + Assert.assertTrue("testSimpletest1lunchOk stderr should contains " + ss + " but didn't", pr.stderr.contains(ss)); + } else { + Assert.assertFalse("testSimpletest1lunchOk stderr should not contains " + ss + " but did", pr.stderr.contains(ss)); + } + Assert.assertFalse(pr.wasTerminated); + Assert.assertEquals((Integer) 0, pr.returnValue); + } @Test public void testSimpletest1lunchOk() throws Exception { - ServerAccess.ProcessResult pr=server.executeJavawsHeadless(null,"/simpletest1.jnlp"); - String s="Good simple javaws exapmle"; - Assert.assertTrue("testSimpletest1lunchOk stdout should contains "+s+" bud didn't",pr.stdout.contains(s)); - String ss="xception"; - Assert.assertFalse("testSimpletest1lunchOk stderr should not contains "+ss+" but did",pr.stderr.contains(ss)); - Assert.assertFalse(pr.wasTerminated); - Assert.assertEquals((Integer)0, pr.returnValue); + ProcessResult pr = server.executeJavawsHeadless(null, "/simpletest1.jnlp"); + checkLaunched(pr); } - } + @Test + public void testSimpletest1lunchNotOkJnlpStrict() throws Exception { + ProcessResult pr = server.executeJavawsHeadless(strict, "/simpletest1.jnlp"); + checkLaunched(pr, true); + } + + @Test + public void testSimpletest1lunchOkStrictJnlp() throws Exception { + String originalResourceName = "simpletest1.jnlp"; + String newResourceName = "simpletest1_strict.jnlp"; + createStrictFile(originalResourceName, newResourceName, server.getUrl("")); + ProcessResult pr = server.executeJavawsHeadless(null, "/" + newResourceName); + checkLaunched(pr); + } + + @Test + public void testSimpletest1lunchOkStrictJnlpStrict() throws Exception { + String originalResourceName = "simpletest1.jnlp"; + String newResourceName = "simpletest1_strict.jnlp"; + createStrictFile(originalResourceName, newResourceName, server.getUrl("")); + ProcessResult pr = server.executeJavawsHeadless(strict, "/" + newResourceName); + checkLaunched(pr); + } + + private void createStrictFile(String originalResourceName, String newResourceName, URL codebase) throws MalformedURLException, IOException { + String originalContent = ServerAccess.getContentOfStream(new FileInputStream(new File(server.getDir(), originalResourceName))); + String nwContent1 = originalContent.replaceAll("href=\""+originalResourceName+"\"", "href=\""+newResourceName+"\""); + String nwContent = nwContent1.replaceAll("codebase=\".\"", "codebase=\"" + codebase + "\""); + ServerAccess.saveFile(nwContent, new File(server.getDir(), newResourceName)); + } +} From bugzilla-daemon at icedtea.classpath.org Fri Sep 7 11:08:32 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 07 Sep 2012 18:08:32 +0000 Subject: [Bug 1160] New: OpenJDK Bug with huge count of memmory and huge pages Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 Priority: P3 Bug ID: 1160 CC: unassigned at icedtea.classpath.org Assignee: xerxes at zafena.se Summary: OpenJDK Bug with huge count of memmory and huge pages Severity: blocker Classification: Unclassified OS: Linux Reporter: tstmsc at ya.ru Hardware: x86_64 Status: NEW Version: 7-hg Component: JamVM Product: IcedTea Created attachment 754 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=754&action=edit log file Errors in screen: 2012-09-07 21:57:07 [SEVERE] Exception in thread "TimerQueue" 2012-09-07 21:57:07 [SEVERE] java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/headless/libmawt.so: libcups.so.2: cannot open shared object file: No such file or directory caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.java2d.Disposer at javax.imageio.stream.MemoryCacheImageInputStream.(MemoryCacheImageInputStream.java:76) at com.sun.imageio.spi.InputStreamImageInputStreamSpi.createInputStreamInstance(InputStreamImageInputStreamSpi.java:71) Start paramentrs: -server -Xmx22G -Xincgc -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -XX:+AggressiveOpts Im using HugePages(23gb for them, 22gb for server) java version: "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (ArchLinux build 7.u7_2.3.2-1-x86_64) OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode) Log file is in the attachment. I have tryed to use -xmx10G and less the same errors, and i had to remove -xms due to with this parametr is just DON"T want to start. Plz fix this bug or help me find any solution, i really lose my time and money! Plz!!! My skype is: vlad.lanc and id like to speak with developer there because i want improve speed of this bug fixing, thx! -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120907/5a2b9761/attachment.html From adomurad at redhat.com Fri Sep 7 13:19:48 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 07 Sep 2012 16:19:48 -0400 Subject: [RFC][icedtea-web]: Added signed jnlp tests for applications using multiple jars In-Reply-To: <5047ADDC.9020702@redhat.com> References: <4FF4B022.2000608@redhat.com> <1342557461.15784.16.camel@linux-laptop> <500EF833.9040509@redhat.com> <1344888329.19536.29.camel@voip-10-15-18-79.yyz.redhat.com> <5047ADDC.9020702@redhat.com> Message-ID: <1347049188.17468.12.camel@adomurad-desktop> On Wed, 2012-09-05 at 15:54 -0400, Saad Mohammad wrote: > On 08/13/2012 04:05 PM, Adam Domurad wrote: > > I'm afraid you'll have to elaborate on this because I'm not aware of > > when jnlp files are classified as signed. > > Hi Adam, > > Sorry for the late reply and all the confusion. I updated the patch with major > changes that includes additional comments and better file names. I think this > patch will be much easier to understand. Sorry again for the confusion. Thanks! Yes, it is. Sorry it to me so long to understand. [.. snip ..] > + public static void main(String[] args) throws Exception { > + System.out.println("Starting application with signed > application jnlp"); > + > + //No parameters > + Class noparam[] = {}; > + > + //Run SignedJnlpTemplate > + Class c1 = Class.forName("SignedJnlpTemplate"); > + Method m1 = c1.getDeclaredMethod("run", noparam); > + m1.invoke((Object) c1.newInstance()); Why are you creating a new instance here, but not below (in m2.invoke(c2)) ? Also, casting to (Object) should never be necessary. > + //Run SimpleApplication > + Class c2 = Class.forName("SimpleApplication"); > + Method m2 = c2.getDeclaredMethod("run", noparam); > + m2.invoke((Object) c2); > + > + System.out.println("Ending application with signed > application jnlp"); > + } > +} > [.. snip ..] > > @Test > public void mainJarMatchingSignedJnlpTemplate() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(l, "/MainJarWithMatchingSignedJnlpTemplate.jnlp"); > String s = "Ending application with signed application_template jnlp"; > Assert.assertTrue("Could not locate SignedJnlpTemplate class within MultiJar-SignedJnlpTemplate.jar", pr.stdout.contains(s)); > } While not strictly necessary, it would be nice to add a corresponding assertFalse for the case where it completes successfully. (same for failing test below) > > @Test > public void mainJarMatchingSignedJnlpApplication() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(l, "/MainJarWithMatchingSignedJnlpApplication.jnlp"); > String s = "Ending application with signed application jnlp"; > Assert.assertTrue("Could not locate SignedJnlpApplication class within MultiJar-SignedJnlpApplication.jar", pr.stdout.contains(s)); > } It would also be nice here to add a corresponding assertFalse for the case where it errors out. > > @Test > public void mainJarWithUnmatchingSignedJnlpApplication() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(l, "/MainJarWithUnmatchingSignedJnlpApplication.jnlp"); > Assert.assertTrue("Stdout should contains " + signedJnlpException + " but did not", pr.stderr.contains(signedJnlpException)); > } > > @Test > public void mainJarWithUnmatchingSignedJnlpTemplate() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(l, "/MainJarWithUnmatchingSignedJnlpTemplate.jnlp"); > Assert.assertTrue("Stdout should contains " + signedJnlpException + " but did not", pr.stderr.contains(signedJnlpException)); > } > > @Test > public void mainJarWithoutSignedJnlp() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(l, "/MainJarWithoutSignedJnlp.jnlp"); > String s = "Ending application without a Signed Jnlp"; > Assert.assertTrue("Stdout should contains " + s + " but did not", pr.stdout.contains(s)); > } Good tests (once I finally understood them, sorry this was a lack of knowledge on my part). Once you add a few more checks (and remove casts/ .newInstance() call in your main classes if you feel like it/is correct) you can push to HEAD. Thanks - Adam From bugzilla-daemon at icedtea.classpath.org Fri Sep 7 13:34:12 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 07 Sep 2012 20:34:12 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 Xerxes R?nby changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Component|JamVM |IcedTea Resolution|--- |INVALID Assignee|xerxes at zafena.se |gnu.andrew at redhat.com Severity|blocker |normal --- Comment #1 from Xerxes R?nby --- The only thing that you can read out from the log file is that all if your memory heap is full, most likely caused by a) a memory leak in the minecraft server software. try monitor the jvm over time using VisualVM or Termostat, you may spot memory leaks if the garbage collector runs are unable to return the heap to a constant level. http://java.dzone.com/news/how-fix-memory-leaks-java b) to little available ram to host these giant datastructures. have you tested all suggestions found in the log? # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 217088 bytes for offset table expansion # Possible reasons: # The system is out of physical RAM or swap space # In 32 bit mode, the process size limit was hit # Possible solutions: # Reduce memory load on the system # Increase physical memory or swap space # Check if swap backing store is full # Use 64 bit Java on a 64 bit OS # Decrease Java heap size (-Xmx/-Xms) # Decrease number of Java threads # Decrease Java thread stack sizes (-Xss) # Set larger code cache with -XX:ReservedCodeCacheSize= # This output file may be truncated or incomplete. # # Out of Memory Error (blockOffsetTable.cpp:79), pid=675, tid=140598200018688 c) You may want to try running your application with different garbage collectors, some may be faster to clear up the heap of old objects. If you still think that it is a bug in IcedTea then you need to attach a reproducer that can reproduce the issue on one of the IcedTea developers machine. Preferably a standalone testcase. For paid support try first contact the bukkit server team directly, they can then better analyse your application + datastructure and look for memory leaks in the bukkit server code. You may also try contact any freelancer or company who can help you analyze your issue. All in all there is nothing in your report that indicate a bug in the IcedTea or OpenJDK JVM itself. Therefore i will close this bug as INVALID unless you can provide a testcase that clearly demonstrate that this out of memory is a bug in icedtea. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120907/0baea9b2/attachment.html From smohammad at icedtea.classpath.org Fri Sep 7 14:07:22 2012 From: smohammad at icedtea.classpath.org (smohammad at icedtea.classpath.org) Date: Fri, 07 Sep 2012 21:07:22 +0000 Subject: /hg/icedtea-web: Add signed jnlp tests for applications with mul... Message-ID: changeset 439f0b1cee5c in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=439f0b1cee5c author: Saad Mohammad date: Fri Sep 07 17:06:08 2012 -0400 Add signed jnlp tests for applications with multiple jars diffstat: ChangeLog | 32 +++ tests/reproducers/signed/MultiJar-NoSignedJnlp/resources/MainJarWithoutSignedJnlp.jnlp | 69 ++++++ tests/reproducers/signed/MultiJar-NoSignedJnlp/srcs/SimpleApplication.java | 64 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithMatchingSignedJnlpApplication.jnlp | 71 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithUnmatchingSignedJnlpApplication.jnlp | 71 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp | 64 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/SignedJnlpApplication.java | 64 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpApplication/testcases/MultiJarSignedJnlpTest.java | 102 ++++++++++ tests/reproducers/signed/MultiJar-SignedJnlpTemplate/resources/MainJarWithMatchingSignedJnlpTemplate.jnlp | 71 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpTemplate/resources/MainJarWithUnmatchingSignedJnlpTemplate.jnlp | 71 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp | 64 ++++++ tests/reproducers/signed/MultiJar-SignedJnlpTemplate/srcs/SignedJnlpTemplate.java | 64 ++++++ 12 files changed, 807 insertions(+), 0 deletions(-) diffs (truncated from 858 to 500 lines): diff -r 0db02eca94bf -r 439f0b1cee5c ChangeLog --- a/ChangeLog Fri Sep 07 13:52:23 2012 +0200 +++ b/ChangeLog Fri Sep 07 17:06:08 2012 -0400 @@ -1,3 +1,35 @@ +2012-09-07 Saad Mohammad + + Added signed jnlp tests for applications with multiple jar resources. + * tests/reproducers/signed/MultiJar-NoSignedJnlp/resources/MainJarWithoutSignedJnlp.jnlp: + Launching jnlp file that's main jar does not have a signed jnlp file, but + other jar resources do. + * tests/reproducers/signed/MultiJar-NoSignedJnlp/srcs/SimpleApplication.java: + A class that uses reflection to access resources from different jars. + * tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithMatchingSignedJnlpApplication.jnlp: + Launching jnlp file that's main jar matches the signed jnlp application + file. + * tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithUnmatchingSignedJnlpApplication.jnlp: + Launching jnlp file that's main jar does not match the signed jnlp + application file. + * tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp: + Signed JNLP application file for MultiJar-SignedJnlpApplication. + * tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/SignedJnlpApplication.java: + A class that uses reflection to access resources from different jars. + * tests/reproducers/signed/MultiJar-SignedJnlpApplication/testcases/MultiJarSignedJnlpTest.java: + Testcase that tests the launch and validation of signed jnlp files for + application that have multiple jar resources. + * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/resources/MainJarWithMatchingSignedJnlpTemplate.jnlp: + Launching jnlp file that's main jar matches the signed jnlp application + template file. + * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/resources/MainJarWithUnmatchingSignedJnlpTemplate.jnlp: + Launching jnlp file that's main jar does not match the signed jnlp + application template file. + * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp: + Signed JNLP application template file for MultiJar-SignedJnlpTemplate.jar + * tests/reproducers/signed/MultiJar-SignedJnlpTemplate/srcs/SignedJnlpTemplate.java: + A class that uses reflection to access resources from different jars. + 2012-09-07 Jiri Vanek Added strict test diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-NoSignedJnlp/resources/MainJarWithoutSignedJnlp.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-NoSignedJnlp/resources/MainJarWithoutSignedJnlp.jnlp Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,69 @@ + + + + + Main Jar does have a signed jnlp + IcedTea + + Main Jar does have a signed jnlp + + + + + + + + + + + + + + + + + + + + diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-NoSignedJnlp/srcs/SimpleApplication.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-NoSignedJnlp/srcs/SimpleApplication.java Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,64 @@ +/* SimpleApplication.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +import java.lang.reflect.*; + +public class SimpleApplication { + + public static void run() { + System.out.println("**Running SimpleApplication"); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + public static void main(String[] args) throws Exception { + System.out.println("Starting application without a Signed Jnlp"); + + //No parameters + Class noparam[] = {}; + + //Run SignedJnlpApplication + Class c1 = Class.forName("SignedJnlpApplication"); + Method m1 = c1.getDeclaredMethod("run", noparam); + m1.invoke(c1); + + //Run SignedJnlpTemplate + Class c2 = Class.forName("SignedJnlpTemplate"); + Method m2 = c2.getDeclaredMethod("run", noparam); + m2.invoke(c2); + + System.out.println("Ending application without a Signed Jnlp"); + } +} diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithMatchingSignedJnlpApplication.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithMatchingSignedJnlpApplication.jnlp Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,71 @@ + + + + + Matching Signed JNLP + IcedTea + + Matching Signed JNLP + + + + + + + + + + + + + + + + + + + + diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithUnmatchingSignedJnlpApplication.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-SignedJnlpApplication/resources/MainJarWithUnmatchingSignedJnlpApplication.jnlp Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,71 @@ + + + + + XXXXXXX - THIS FILE DOES NOT MATCH THE SIGNED JNLP FILE - XXXXXXX + IcedTea + + XXXXXXX - THIS FILE DOES NOT MATCH THE SIGNED JNLP FILE - XXXXXXX + + + + + + + + + + + + + + + + + + + + diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/JNLP-INF/APPLICATION.jnlp Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,64 @@ + + + + + Matching Signed JNLP + IcedTea + + Matching Signed JNLP + + + + + + + + + + + + + + + + + + + + diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/SignedJnlpApplication.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-SignedJnlpApplication/srcs/SignedJnlpApplication.java Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,64 @@ +/* SignedJnlpApplication.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +import java.lang.reflect.*; + +public class SignedJnlpApplication { + + public static void run() { + System.out.println("**Running SignedJnlpApplication"); + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + public static void main(String[] args) throws Exception { + System.out.println("Starting application with signed application jnlp"); + + //No parameters + Class noparam[] = {}; + + //Run SignedJnlpTemplate + Class c1 = Class.forName("SignedJnlpTemplate"); + Method m1 = c1.getDeclaredMethod("run", noparam); + m1.invoke(c1); + + //Run SimpleApplication + Class c2 = Class.forName("SimpleApplication"); + Method m2 = c2.getDeclaredMethod("run", noparam); + m2.invoke(c2); + + System.out.println("Ending application with signed application jnlp"); + } +} diff -r 0db02eca94bf -r 439f0b1cee5c tests/reproducers/signed/MultiJar-SignedJnlpApplication/testcases/MultiJarSignedJnlpTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/MultiJar-SignedJnlpApplication/testcases/MultiJarSignedJnlpTest.java Fri Sep 07 17:06:08 2012 -0400 @@ -0,0 +1,102 @@ +/* MultiJarSignedJnlpTest.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that From smohammad at redhat.com Fri Sep 7 14:08:42 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Fri, 07 Sep 2012 17:08:42 -0400 Subject: [RFC][icedtea-web]: Added signed jnlp tests for applications using multiple jars In-Reply-To: <1347049188.17468.12.camel@adomurad-desktop> References: <4FF4B022.2000608@redhat.com> <1342557461.15784.16.camel@linux-laptop> <500EF833.9040509@redhat.com> <1344888329.19536.29.camel@voip-10-15-18-79.yyz.redhat.com> <5047ADDC.9020702@redhat.com> <1347049188.17468.12.camel@adomurad-desktop> Message-ID: <504A625A.3000201@redhat.com> On 09/07/2012 04:19 PM, Adam Domurad wrote: > Once you add a few more checks (and remove casts/ .newInstance() call in > your main classes if you feel like it/is correct) you can push to HEAD. Thanks for the review! Pushed: http://icedtea.classpath.org/hg/icedtea-web/rev/439f0b1cee5c -- Cheers, Saad Mohammad From bugzilla-daemon at icedtea.classpath.org Fri Sep 7 14:16:00 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 07 Sep 2012 21:16:00 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dbhole at redhat.com --- Comment #2 from Deepak Bhole --- Unless I am mistaken, I think the log also shows that it is using 4k pages: Memory: 4k page, physical 24687168k(171024k free), swap 0k(0k free) You have a whole bunch of hugepages not being used: HugePages_Total: 11776 HugePages_Free: 11336 HugePages_Rsvd: 95 HugePages_Surp: 0 Hugepagesize: 2048 kB Have you tried -XX:+UseLargePages ? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120907/18ab2300/attachment.html From dbhole at redhat.com Fri Sep 7 14:33:32 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Fri, 7 Sep 2012 17:33:32 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 Message-ID: <20120907213331.GE7118@redhat.com> Hi, This patch fixes PR1161: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 As specified there, the issue is that Java 7 changed what parent class a trust manager needs to implement in order to correctly intercept issues such as CN mismatch. As a result, icedtea-web currently cannot load sites whose certificate has a CN mismatch (proprietary tools work fine in such cases). Attached patch adds support for Java 7 while maintaining compatibility with Java 6 (loading one trust manager for 6 and a different one for 7+). I would like to see this backported to 1.3 as well given its importance, but we can let it bake in HEAD for a couple of weeks. OK for HEAD? ChangeLog: 2012-09-07 Deepak Bhole PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 * Makefile.am: If building with JDK 6, don't build VariableX509TrustManagerJDK7. * NEWS: Updated. * acinclude.m4: In addition to setting VERSION_DEFS, also set HAVE_JAVA7 if building with JDK7. * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Use new getSSLSocketTrustManager() method to get the trust manager. (getSSLSocketTrustManager): New method. Depending on runtime JRE version, returns the appropriate trust manager. * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Removed unused tm variable. * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java: No longer extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager. (checkClientTrusted): Renamed to checkTrustClient and removed overloaded implementations. (checkServerTrusted): Renamed to checkTrustServer. Also, modified to accept socket and engine (may be null). Assume that CN is mismatched by default, rather than matched. If explicitly trusted, bypass other checks, including CN mismatch. (checkAllManagers): Modified to accept socket and engine. Modified to work for both JDK6 and JDK7. (getAcceptedIssuers): Make protected (called by others in package). * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: New class -- X509TrustManager for JDK6. * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java: New class -- X509TrustManager for JDK7. Thanks, Deepak -------------- next part -------------- diff -r 0db02eca94bf Makefile.am --- a/Makefile.am Fri Sep 07 13:52:23 2012 +0200 +++ b/Makefile.am Fri Sep 07 17:28:56 2012 -0400 @@ -348,6 +348,9 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif +if !HAVE_JAVA7 + sed -i '/VariableX509TrustManagerJDK7/ d' $@ +endif stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) diff -r 0db02eca94bf NEWS --- a/NEWS Fri Sep 07 13:52:23 2012 +0200 +++ b/NEWS Fri Sep 07 17:28:56 2012 -0400 @@ -17,6 +17,7 @@ * Common - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered - PR955: regression: SweetHome3D fails to run + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.3 (2012-XX-XX): * NetX diff -r 0db02eca94bf acinclude.m4 --- a/acinclude.m4 Fri Sep 07 13:52:23 2012 +0200 +++ b/acinclude.m4 Fri Sep 07 17:28:56 2012 -0400 @@ -714,10 +714,13 @@ fi AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) - JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` - case "${JAVA_VERSION}" in - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; - esac + JAVA_VERSION=`$JAVA -version 2>&1 | sed -n -e '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` + if ! test -z "$HAVE_JAVA7" ; then + VERSION_DEFS='-DHAVE_JAVA7' + fi + + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) AC_SUBST(VERSION_DEFS) ]) diff -r 0db02eca94bf netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 13:52:23 2012 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 17:28:56 2012 -0400 @@ -16,38 +16,59 @@ package net.sourceforge.jnlp.runtime; -import java.io.*; +import java.awt.EventQueue; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.net.Authenticator; import java.net.ProxySelector; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; -import java.awt.*; -import java.text.*; -import java.util.*; +import java.security.AllPermission; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.List; -import java.security.*; -import javax.jnlp.*; +import java.util.ResourceBundle; + +import javax.jnlp.ServiceManager; import javax.naming.ConfigurationException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.swing.UIManager; import javax.swing.text.html.parser.ParserDelegator; -import sun.net.www.protocol.jar.URLJarFile; - -import net.sourceforge.jnlp.*; +import net.sourceforge.jnlp.DefaultLaunchHandler; +import net.sourceforge.jnlp.GuiLaunchHandler; +import net.sourceforge.jnlp.LaunchHandler; +import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.browser.BrowserAwareProxySelector; -import net.sourceforge.jnlp.cache.*; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.DefaultDownloadIndicator; +import net.sourceforge.jnlp.cache.DownloadIndicator; +import net.sourceforge.jnlp.cache.UpdatePolicy; import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.security.JNLPAuthenticator; import net.sourceforge.jnlp.security.KeyStores; import net.sourceforge.jnlp.security.SecurityDialogMessageHandler; import net.sourceforge.jnlp.security.VariableX509TrustManager; -import net.sourceforge.jnlp.services.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.services.XServiceManagerStub; +import net.sourceforge.jnlp.util.FileUtils; +import net.sourceforge.jnlp.util.TeeOutputStream; +import sun.net.www.protocol.jar.URLJarFile; /** * Configure and access the runtime environment. This class @@ -223,7 +244,7 @@ KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, KeyStores.getPassword()); - TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() }; + TrustManager[] trust = new TrustManager[] { getSSLSocketTrustManager() }; context.init(kmf.getKeyManagers(), trust, null); sslSocketFactory = context.getSocketFactory(); @@ -248,6 +269,42 @@ } /** + * Returns a TrustManager ideal for the running VM. + * + * @return TrustManager the trust manager to use for verifying https certificates + */ + private static TrustManager getSSLSocketTrustManager() throws + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { + + try { + + Class trustManagerClass; + Constructor tmCtor = null; + + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + } + + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); + tmCtor = tmCtors[0]; + + for (Constructor ctor : tmCtors) { + if (tmCtor.getGenericParameterTypes().length == 0) { + tmCtor = ctor; + break; + } + } + + return (TrustManager) tmCtor.newInstance(); + } catch (RuntimeException e) { + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); + throw e; + } + } + + /** * This must NOT be called form the application ThreadGroup. An application * can inject events into its {@link EventQueue} and bypass the security * dialogs. diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Sep 07 13:52:23 2012 +0200 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Sep 07 17:28:56 2012 -0400 @@ -59,7 +59,6 @@ public class HttpsCertVerifier implements CertVerifier { - private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; private String hostName; @@ -67,11 +66,9 @@ private boolean hostMatched; private ArrayList details = new ArrayList(); - public HttpsCertVerifier(VariableX509TrustManager tm, - X509Certificate[] chain, String authType, + public HttpsCertVerifier(X509Certificate[] chain, String authType, boolean isTrusted, boolean hostMatched, String hostName) { - this.tm = tm; this.chain = chain; this.authType = authType; this.hostName = hostName; diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 13:52:23 2012 +0200 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:28:56 2012 -0400 @@ -37,6 +37,9 @@ package net.sourceforge.jnlp.security; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; import java.security.AccessController; import java.security.KeyStore; import java.security.PrivilegedAction; @@ -47,25 +50,24 @@ import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import sun.security.util.HostnameChecker; import sun.security.validator.ValidatorException; -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; - /** * This class implements an X509 Trust Manager. The certificates it trusts are * "variable", in the sense that it can dynamically, and temporarily support * different certificates that are not in the keystore. */ -final public class VariableX509TrustManager extends X509ExtendedTrustManager { +final public class VariableX509TrustManager { /** TrustManagers containing trusted CAs */ private X509TrustManager[] caTrustManagers = null; @@ -164,8 +166,8 @@ /** * Check if client is trusted (no support for custom here, only system/user) */ - public void checkClientTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) + public void checkTrustClient(X509Certificate[] chain, String authType, + String hostName) throws CertificateException { boolean trusted = false; @@ -186,38 +188,24 @@ throw savedException; } - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) - throws CertificateException { - checkServerTrusted(chain, authType, hostName, false); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkServerTrusted(chain, authType, null, null); - } - /** - * Check if the server is trusted + * Check if the server is trusted. * * @param chain The cert chain * @param authType The auth type algorithm - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission + * @param hostName The expected hostName that the server should have + * @param socket The SSLSocket in use (may be null) + * @param ending The SSLEngine in use (may be null) */ - public synchronized void checkServerTrusted(X509Certificate[] chain, + public synchronized void checkTrustServer(X509Certificate[] chain, String authType, String hostName, - boolean checkOnly) throws CertificateException { + SSLSocket socket, SSLEngine engine) throws CertificateException { CertificateException ce = null; boolean trusted = true; - boolean CNMatched = true; + boolean CNMatched = false; try { - checkAllManagers(chain, authType); + checkAllManagers(chain, authType, socket, engine); } catch (CertificateException e) { trusted = false; ce = e; @@ -226,59 +214,92 @@ // If the certificate is not explicitly trusted, we // need to prompt the user if (!isExplicitlyTrusted(chain, authType)) { - - if (hostName == null) { - CNMatched = false; - } else { + if (hostName != null) { try { HostnameChecker checker = HostnameChecker .getInstance(HostnameChecker.TYPE_TLS); - checker.match(hostName, chain[0]); // only need to match @ 0 for - // CN + checker.match(hostName, chain[0]); // only need to match @ 0 for CN + CNMatched = true; } catch (CertificateException e) { - CNMatched = false; ce = e; } } + } else { + // Else it is explicitly trusted. Return here. + return; } if (!trusted || !CNMatched) { - if (checkOnly) { - throw ce; - } else { - if (!isTemporarilyUntrusted(chain[0])) { - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); + if (!isTemporarilyUntrusted(chain[0])) { + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); - if (b) { - temporarilyTrust(chain[0]); - } else { - temporarilyUntrust(chain[0]); - } + if (b) { + temporarilyTrust(chain[0]); + return; + } else { + temporarilyUntrust(chain[0]); } + } - checkAllManagers(chain, authType); - } + throw ce; } } /** - * Check system, user and custom trust manager + * Check system, user and custom trust manager. + * + * This method is intended to work with both, JRE6 and JRE7. If socket + * and engine are null, it assumes that the call is for JRE6 (i.e. not + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If + * either of those are not null, it will assume that the caTrustManagers + * are javax.net.ssl.X509ExtendedTrustManager instances and will + * invoke their check methods. + * + * @param chain The certificate chain + * @param authType The authentication type + * @param socket the SSLSocket being used for the connection + * @param engine the SSLEngine being used for the connection */ - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { + // first try CA TrustManagers boolean trusted = false; ValidatorException savedException = null; for (int i = 0; i < caTrustManagers.length; i++) { try { - caTrustManagers[i].checkServerTrusted(chain, authType); + if (socket == null && engine == null) { + caTrustManagers[i].checkServerTrusted(chain, authType); + } else { + + try { + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); + if (engine == null) { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); + } else { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); + } + } catch (NoSuchMethodException nsme) { + throw new ValidatorException(nsme.getMessage()); + } catch (InvocationTargetException ite) { + throw new ValidatorException(ite.getMessage()); + } catch (IllegalAccessException iae) { + throw new ValidatorException(iae.getMessage()); + } catch (ClassNotFoundException cnfe) { + throw new ValidatorException(cnfe.getMessage()); + } + } + trusted = true; break; } catch (ValidatorException caex) { savedException = caex; } } + if (trusted) { return; } @@ -332,7 +353,7 @@ return explicitlyTrusted; } - public X509Certificate[] getAcceptedIssuers() { + protected X509Certificate[] getAcceptedIssuers() { List issuers = new ArrayList(); for (int i = 0; i < caTrustManagers.length; i++) { @@ -394,7 +415,7 @@ public Boolean run() { return SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, null, - new HttpsCertVerifier(trustManager, chain, authType, + new HttpsCertVerifier(chain, authType, isTrusted, hostMatched, hostName)); } diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Fri Sep 07 17:28:56 2012 -0400 @@ -0,0 +1,38 @@ +package net.sourceforge.jnlp.security; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { + + VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + checkClientTrusted(chain, authType, null, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, hostname); // We don't need algorithm, we will always use this for TLS only + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + // We don't need to pass algorithm, we will always use this for TLS only + vX509TM.checkTrustServer(chain, authType, hostname, null /* socket */, null /* engine */); + } + +} diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java Fri Sep 07 17:28:56 2012 -0400 @@ -0,0 +1,122 @@ +package net.sourceforge.jnlp.security; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK7 extends X509ExtendedTrustManager { + + VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, null /* hostname*/); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustClient(chain, authType, socket, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustServer(chain, authType, socket, null); + + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustClient(chain, authType, null, engine); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustServer(chain, authType, null, engine); + } + + /** + * Check if the server is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, if provided + * @param engine the SSLEngine, if provided + */ + private void checkTrustServer(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + if (socket != null) { + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); + } else if (engine != null) { + hostName = engine.getHandshakeSession().getPeerHost(); + } + + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); + } + + /** + * Check if the server is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, if provided + * @param engine the SSLEngine, if provided + */ + private void checkTrustClient(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + try { + if (socket != null) { + Method mgetHandshakeSession = SSLSocket.class.getDeclaredMethod("getHandshakeSession"); + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(socket); + + if (session == null) { + throw new CertificateException("No handshake session"); + } + + hostName = session.getPeerHost(); + + } else if (engine != null) { + Method mgetHandshakeSession = SSLEngine.class.getDeclaredMethod("getHandshakeSession"); + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(engine); + + if (session == null) { + throw new CertificateException("No handshake session"); + } + + hostName = session.getPeerHost(); + } + } catch (NoSuchMethodException nsme) { + // Do nothing. hostName will be null + } catch (InvocationTargetException ite) { + //Do nothing. hostName will be null + } catch (IllegalAccessException iae) { + //Do nothing. hostName will be null + } + + vX509TM.checkTrustClient(chain, authType, hostName); + } +} From bugzilla-daemon at icedtea.classpath.org Sat Sep 8 00:22:40 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Sep 2012 07:22:40 +0000 Subject: [Bug 1112] Main class from signed jar's INDEX.LIST fails to load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1112 --- Comment #4 from ralf at ark.in-berlin.de --- I'm the maintainer of the applet source. Is there a way for me to work around this issue until you have a solution? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120908/1a0f1cbd/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Sep 8 02:54:16 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Sep 2012 09:54:16 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #3 from tstmsc at ya.ru --- (In reply to comment #2) > Unless I am mistaken, I think the log also shows that it is using 4k pages: > > Memory: 4k page, physical 24687168k(171024k free), swap 0k(0k free) > > You have a whole bunch of hugepages not being used: > > HugePages_Total: 11776 > HugePages_Free: 11336 > HugePages_Rsvd: 95 > HugePages_Surp: 0 > Hugepagesize: 2048 kB > > Have you tried -XX:+UseLargePages ? [root at server ~]# cat /proc/meminfo | grep HugePages AnonHugePages: 0 kB HugePages_Total: 11776 HugePages_Free: 11776 HugePages_Rsvd: 0 HugePages_Surp: 0 Why it can be so? How to fix? Yes, but i have bad past with this paramentr -XX:+UseLargePages. -XX:+UseLargePages really make server unstable java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/headless/libmawt.so: libcups.so.2: cannot open shared object file: No such file or directory While starting up server, i have this error ~3 times And server runs now even with errors, but when i try to load something to the buffer server die with the same log And i asked one man from bukkit, message from him: "I can't speak to archlinux, but I do know that sometimes there is a 'headless' package for the JDK that includes the native libraries needed to run the JDK headless (versus the ones that depend up the X libraries and the like). Its possible that the base openjdk package java code refers to the JNI/native code for the headless libraries, but doesn't itself include them....just a guess, but it'd fit." -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120908/07021283/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Sep 8 04:34:11 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Sep 2012 11:34:11 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #4 from tstmsc at ya.ru --- Created attachment 755 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=755&action=edit error while loading 15:26:12 [INFO] loaded /root/servers/black/plugins/WorldEdit/schematics/newtown.schematic (this file is 1369300 bytes) 15:26:17 [INFO] issued server command: //paste (server started to load info from buffer and after some filters goes to the disk (command->ram->server->disk) # There is insufficient memory for the Java Runtime Environment to continue. # Native memory allocation (malloc) failed to allocate 8933376 bytes for card table expansion # An error report file with more information is saved as: # /root/servers/black/hs_err_pid2179.log -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120908/10e4d93f/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Sep 8 04:34:56 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Sep 2012 11:34:56 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 tstmsc at ya.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |blocker -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120908/22930f0b/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Sep 8 04:36:33 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Sep 2012 11:36:33 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 tstmsc at ya.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120908/90b56775/attachment.html From bugzilla-daemon at icedtea.classpath.org Sat Sep 8 04:44:13 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 08 Sep 2012 11:44:13 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #5 from tstmsc at ya.ru --- java.lang.UnsatisfiedLinkError: /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/headless/libmawt.so: libcups.so.2: cannot open shared object file: No such file or directory But using ftp this file exist, console see it too [root at server headless]# ls -al total 36 drwxr-xr-x 2 root root 4096 Sep 1 19:49 . drwxr-xr-x 6 root root 4096 Sep 8 15:38 .. -rwxr-xr-x 1 root root 27912 Sep 1 19:49 libmawt.so -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120908/22cce613/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Sep 9 06:02:14 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 09 Sep 2012 13:02:14 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #6 from tstmsc at ya.ru --- So what? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120909/78a89b02/attachment.html From bugzilla-daemon at icedtea.classpath.org Sun Sep 9 16:23:34 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 09 Sep 2012 23:23:34 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #7 from Deepak Bhole --- How does your system become unstable with -XX:+UseLargePages? If it is a while after the VM starting up, it is probably because the OOM killer kicking in as there is no swap space for the kernel/other processes to spill into after Java takes up Xmx. Reduce the Xmx value to the JVM to fix it. The libmawt/libcups issue does not appear to be fatal considering your VM starts up with -XX:+UseLargePages -- however to fix that, install whatever provides libcups.so.2 (libcups on Arch). -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120909/923b8276/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 01:18:06 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 08:18:06 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #8 from tstmsc at ya.ru --- (In reply to comment #7) > How does your system become unstable with -XX:+UseLargePages? If it is a > while after the VM starting up, it is probably because the OOM killer > kicking in as there is no swap space for the kernel/other processes to spill > into after Java takes up Xmx. Reduce the Xmx value to the JVM to fix it. > > The libmawt/libcups issue does not appear to be fatal considering your VM > starts up with -XX:+UseLargePages -- however to fix that, install whatever > provides libcups.so.2 (libcups on Arch). Just with -XX:+UseLargePages when server work long time server can die. "Reduce the Xmx value to the JVM to fix it." Are you sure that i shouldn't reduce hugepages value? And what the point of i can't use -xms? Any value of -xms and server will show again the same error. But openjdk package should install it, doesn't it? And what about issue with loading smth to buffer and back to server? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/f77610b9/attachment.html From ptisnovs at icedtea.classpath.org Mon Sep 10 01:24:30 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 10 Sep 2012 08:24:30 +0000 Subject: /hg/gfx-test: * src/org/gfxtest/framework/GfxTest.java: Message-ID: changeset da233eec72ee in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=da233eec72ee author: Pavel Tisnovsky date: Mon Sep 10 09:34:44 2012 +0200 * src/org/gfxtest/framework/GfxTest.java: Make sure that file containing rendering result is closed. * src/org/gfxtest/framework/ImageFactory.java: Added check for proper image dimensions. * src/org/gfxtest/framework/PrintJobWatcher.java: Use notifyAll() instead of notify(). * src/org/gfxtest/framework/PrintingTest.java: Added check that test got an instance of Graphics2D class. * src/org/gfxtest/harness/MainWindow.java: Removed unecessary test. diffstat: ChangeLog | 13 ++++ src/org/gfxtest/framework/GfxTest.java | 11 +++ src/org/gfxtest/framework/ImageFactory.java | 72 ++++++++++++++++++++++++++ src/org/gfxtest/framework/PrintJobWatcher.java | 2 +- src/org/gfxtest/framework/PrintingTest.java | 7 ++ src/org/gfxtest/harness/MainWindow.java | 4 - 6 files changed, 104 insertions(+), 5 deletions(-) diffs (249 lines): diff -r bea796a9cf11 -r da233eec72ee ChangeLog --- a/ChangeLog Fri Sep 07 10:19:46 2012 +0200 +++ b/ChangeLog Mon Sep 10 09:34:44 2012 +0200 @@ -1,3 +1,16 @@ +2012-09-10 Pavel Tisnovsky + + * src/org/gfxtest/framework/GfxTest.java: + Make sure that file containing rendering result is closed. + * src/org/gfxtest/framework/ImageFactory.java: + Added check for proper image dimensions. + * src/org/gfxtest/framework/PrintJobWatcher.java: + Use notifyAll() instead of notify(). + * src/org/gfxtest/framework/PrintingTest.java: + Added check that test got an instance of Graphics2D class. + * src/org/gfxtest/harness/MainWindow.java: + Removed unecessary test. + 2012-09-07 Pavel Tisnovsky * src/org/gfxtest/framework/annotations/BitBltOperation.java: diff -r bea796a9cf11 -r da233eec72ee src/org/gfxtest/framework/GfxTest.java --- a/src/org/gfxtest/framework/GfxTest.java Fri Sep 07 10:19:46 2012 +0200 +++ b/src/org/gfxtest/framework/GfxTest.java Mon Sep 10 09:34:44 2012 +0200 @@ -574,12 +574,23 @@ } finally { + // really ugly implementation :( try { // must be sure that output stream is really closed // because we are going to use output file with // converter fileOutputStream.flush(); + } + catch (IOException e) + { + e.printStackTrace(); + } + try + { + // we must be sure that output stream is really closed + // because we are going to use output file with + // converter fileOutputStream.close(); } catch (IOException e) diff -r bea796a9cf11 -r da233eec72ee src/org/gfxtest/framework/ImageFactory.java --- a/src/org/gfxtest/framework/ImageFactory.java Fri Sep 07 10:19:46 2012 +0200 +++ b/src/org/gfxtest/framework/ImageFactory.java Mon Sep 10 09:34:44 2012 +0200 @@ -130,6 +130,12 @@ */ public static BufferedImage createCheckerImage(int gridSize, int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // used by test for a tile colors int doubledGridSize = gridSize << 1; @@ -176,6 +182,12 @@ */ public static BufferedImage createDiagonalCheckerImage(int gridSize, int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // used for computing checker texture int width2 = width << 1; @@ -222,6 +234,12 @@ */ public static BufferedImage createGridImage(int gridSize, int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // used by test for a tile colors int doubledGridSize = gridSize << 1; @@ -266,6 +284,12 @@ */ public static BufferedImage createDiagonalGridImage(int gridSize, int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // used by test for a tile colors int doubledGridSize = gridSize << 1; @@ -307,6 +331,12 @@ */ public static BufferedImage createHorizontalStripesImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -342,6 +372,12 @@ */ public static BufferedImage createVerticalStripesImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -378,6 +414,12 @@ */ public static BufferedImage createDiagonalStripesImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -413,6 +455,12 @@ */ public static BufferedImage createHorizontalColorStripesImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -446,6 +494,12 @@ */ public static BufferedImage createVerticalColorStripesImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -480,6 +534,12 @@ */ public static BufferedImage createDiagonalColorStripesImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -514,6 +574,12 @@ */ public static BufferedImage createBWDotsPatternImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); @@ -549,6 +615,12 @@ */ public static BufferedImage createColorDotsPatternImage(int width, int height, int imageType) { + // check for proper image dimensions + if (width <= 0 || height <= 0) + { + return null; + } + // create new image BufferedImage image = new BufferedImage(width, height, imageType); diff -r bea796a9cf11 -r da233eec72ee src/org/gfxtest/framework/PrintJobWatcher.java --- a/src/org/gfxtest/framework/PrintJobWatcher.java Fri Sep 07 10:19:46 2012 +0200 +++ b/src/org/gfxtest/framework/PrintJobWatcher.java Mon Sep 10 09:34:44 2012 +0200 @@ -120,7 +120,7 @@ // set a flag PrintJobWatcher.this.printJobDone = true; // and notify PrintJobWatcher - PrintJobWatcher.this.notify(); + PrintJobWatcher.this.notifyAll(); } } }); diff -r bea796a9cf11 -r da233eec72ee src/org/gfxtest/framework/PrintingTest.java --- a/src/org/gfxtest/framework/PrintingTest.java Fri Sep 07 10:19:46 2012 +0200 +++ b/src/org/gfxtest/framework/PrintingTest.java Mon Sep 10 09:34:44 2012 +0200 @@ -161,6 +161,13 @@ return NO_SUCH_PAGE; } + // this should not usually happen, but make sure we + // got a proper instance of Graphics2D + if (!(graphics instanceof Graphics2D)) + { + return 0; + } + Graphics2D gc = (Graphics2D)graphics; translateCoordinateSystem(pageFormat, gc); diff -r bea796a9cf11 -r da233eec72ee src/org/gfxtest/harness/MainWindow.java --- a/src/org/gfxtest/harness/MainWindow.java Fri Sep 07 10:19:46 2012 +0200 +++ b/src/org/gfxtest/harness/MainWindow.java Mon Sep 10 09:34:44 2012 +0200 @@ -969,10 +969,6 @@ this.dialogs.showNoTestSelectedMessage(); } String outputDirectory = Configuration.getTestClassesDirectory(); - if (outputDirectory == null) - { - this.dialogs.showErrorMessage("Output directory is not set"); - } File fileToDelete = new File(outputDirectory, this.selectedTestSuite + ".class"); if (!fileToDelete.exists()) { From ptisnovs at icedtea.classpath.org Mon Sep 10 01:29:24 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 10 Sep 2012 08:29:24 +0000 Subject: /hg/rhino-tests: * src/org/RhinoTests/CompiledScriptTest.java: Message-ID: changeset d649db1c7d07 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=d649db1c7d07 author: Pavel Tisnovsky date: Mon Sep 10 10:31:55 2012 +0200 * src/org/RhinoTests/CompiledScriptTest.java: Added check, that ScriptEngine is not null. * src/org/RhinoTests/InvocableTest.java: * src/org/RhinoTests/JavaScriptsTest.java: * src/org/RhinoTests/ScriptExceptionTest.java: Print a message when (an expected) exception is thrown. * src/org/RhinoTests/BindingsTest.java: * src/org/RhinoTests/CompilableTest.java: Changed @author. diffstat: ChangeLog | 12 ++++++++++++ src/org/RhinoTests/BindingsTest.java | 2 +- src/org/RhinoTests/CompilableTest.java | 2 +- src/org/RhinoTests/CompiledScriptTest.java | 6 ++++-- src/org/RhinoTests/InvocableTest.java | 1 + src/org/RhinoTests/JavaScriptsTest.java | 12 +++++++++++- src/org/RhinoTests/ScriptExceptionTest.java | 13 +++++++++++++ 7 files changed, 43 insertions(+), 5 deletions(-) diffs (262 lines): diff -r e3f5a19ce034 -r d649db1c7d07 ChangeLog --- a/ChangeLog Fri Sep 07 10:33:47 2012 +0200 +++ b/ChangeLog Mon Sep 10 10:31:55 2012 +0200 @@ -1,3 +1,15 @@ +2012-09-10 Pavel Tisnovsky + + * src/org/RhinoTests/CompiledScriptTest.java: + Added check, that ScriptEngine is not null. + * src/org/RhinoTests/InvocableTest.java: + * src/org/RhinoTests/JavaScriptsTest.java: + * src/org/RhinoTests/ScriptExceptionTest.java: + Print a message when (an expected) exception is thrown. + * src/org/RhinoTests/BindingsTest.java: + * src/org/RhinoTests/CompilableTest.java: + Changed @author. + 2012-09-07 Pavel Tisnovsky * src/org/RhinoTests/Constants.java: diff -r e3f5a19ce034 -r d649db1c7d07 src/org/RhinoTests/BindingsTest.java --- a/src/org/RhinoTests/BindingsTest.java Fri Sep 07 10:33:47 2012 +0200 +++ b/src/org/RhinoTests/BindingsTest.java Mon Sep 10 10:31:55 2012 +0200 @@ -42,7 +42,7 @@ /** * TODO: not implemented - * @author ptisnovs + * @author Pavel Tisnovsky * */ public class BindingsTest { diff -r e3f5a19ce034 -r d649db1c7d07 src/org/RhinoTests/CompilableTest.java --- a/src/org/RhinoTests/CompilableTest.java Fri Sep 07 10:33:47 2012 +0200 +++ b/src/org/RhinoTests/CompilableTest.java Mon Sep 10 10:31:55 2012 +0200 @@ -42,7 +42,7 @@ /** * TODO: not implemented - * @author ptisnovs + * @author Pavel Tisnovsky * */ public class CompilableTest { diff -r e3f5a19ce034 -r d649db1c7d07 src/org/RhinoTests/CompiledScriptTest.java --- a/src/org/RhinoTests/CompiledScriptTest.java Fri Sep 07 10:33:47 2012 +0200 +++ b/src/org/RhinoTests/CompiledScriptTest.java Mon Sep 10 10:31:55 2012 +0200 @@ -124,8 +124,10 @@ protected void testCompileScriptStoredInString() throws ScriptException { Compilable compilingEngine = (Compilable)this.scriptEngine; assertNotNull(compilingEngine, "cannot get compiling engine"); - CompiledScript script = compilingEngine.compile(""); - assertNotNull(script, "cannot compile script"); + if (compilingEngine != null) { + CompiledScript script = compilingEngine.compile(""); + assertNotNull(script, "cannot compile script"); + } } /** diff -r e3f5a19ce034 -r d649db1c7d07 src/org/RhinoTests/InvocableTest.java --- a/src/org/RhinoTests/InvocableTest.java Fri Sep 07 10:33:47 2012 +0200 +++ b/src/org/RhinoTests/InvocableTest.java Mon Sep 10 10:31:55 2012 +0200 @@ -104,6 +104,7 @@ this.invocableEngine.invokeFunction("bar"); } catch (NoSuchMethodException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; } throw new Exception("NoSuchMethodException not thrown as expected!"); diff -r e3f5a19ce034 -r d649db1c7d07 src/org/RhinoTests/JavaScriptsTest.java --- a/src/org/RhinoTests/JavaScriptsTest.java Fri Sep 07 10:33:47 2012 +0200 +++ b/src/org/RhinoTests/JavaScriptsTest.java Mon Sep 10 10:31:55 2012 +0200 @@ -102,7 +102,8 @@ this.scriptEngine.eval("_unknown_function_('\tHello world!')"); } catch (ScriptException e) { - return; + System.out.println("\tException thrown as expected " + e.getMessage()); + return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); } @@ -119,6 +120,7 @@ this.scriptEngine.eval("println(bflmpsvz)"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -135,6 +137,7 @@ try { this.scriptEngine.eval("xyzzy"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -201,6 +204,7 @@ this.scriptEngine.eval((String) null); } catch (NullPointerException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("NPE not thrown as expected"); @@ -300,6 +304,7 @@ this.scriptEngine.eval(stringReader); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; } throw new Exception("ScriptException not thrown as expected"); @@ -317,6 +322,7 @@ this.scriptEngine.eval(stringReader); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -333,6 +339,7 @@ StringReader stringReader = new StringReader("xyzzy"); this.scriptEngine.eval(stringReader); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -376,6 +383,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -394,6 +402,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("Exception thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -412,6 +421,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); diff -r e3f5a19ce034 -r d649db1c7d07 src/org/RhinoTests/ScriptExceptionTest.java --- a/src/org/RhinoTests/ScriptExceptionTest.java Fri Sep 07 10:33:47 2012 +0200 +++ b/src/org/RhinoTests/ScriptExceptionTest.java Mon Sep 10 10:31:55 2012 +0200 @@ -90,6 +90,7 @@ this.scriptEngine.eval("..."); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -108,6 +109,7 @@ this.scriptEngine.eval("_unknown_function_('\tHello world!')"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -126,6 +128,7 @@ this.scriptEngine.eval("println(a'\tHello world!')"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -144,6 +147,7 @@ this.scriptEngine.eval("println('\tHello world!',)"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -162,6 +166,7 @@ this.scriptEngine.eval("println(,)"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -180,6 +185,7 @@ this.scriptEngine.eval("println(1-*2);"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -198,6 +204,7 @@ this.scriptEngine.eval("println(1**2);"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -216,6 +223,7 @@ this.scriptEngine.eval("println(>>2);"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -233,6 +241,7 @@ this.scriptEngine.eval("let x=y;"); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -252,6 +261,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -271,6 +281,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -290,6 +301,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); @@ -309,6 +321,7 @@ this.scriptEngine.eval(new InputStreamReader(inputStream, SCRIPT_DEFAULT_ENCODING)); } catch (ScriptException e) { + System.out.println("\tException thrown as expected " + e.getMessage()); return; // ok, it's correct if this exception is thrown } throw new Exception("ScriptException not thrown as expected"); From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 07:45:37 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 14:45:37 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #9 from Deepak Bhole --- (In reply to comment #8) > > Just with -XX:+UseLargePages when server work long time server can die. > > "Reduce the Xmx value to the JVM to fix it." Are you sure that i shouldn't > reduce hugepages value? And what the point of i can't use -xms? Any value of > -xms and server will show again the same error. > If you reduce HugePages, you will also have to reduce Xmx as Xmx cannot be higher than what is available. Once you reduce Xmx, you should reduce the HugePage count by a bit regardless as not all applications can use HugePages by default. As for Xms, it doesn't start with Xms because without -XX:+UseLargePages it cannot set the initial heap size to what is requested and fails right away. > > But openjdk package should install it, doesn't it? > It should. Might be a packaging bug. If it is already installed, you can add the path where libcups.so.2 is to LD_LIBRARY_PATH. > And what about issue with loading smth to buffer and back to server? Not sure what that error is, but if it is related to insufficient memory, -XX:+UseLargePages will fix it. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/7dc5b31c/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 07:46:38 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 14:46:38 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |INVALID --- Comment #10 from Deepak Bhole --- This issue should remain closed. It is not a problem with the JVM, it is a user-side configuration issue. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/b7ab46c0/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 08:39:33 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 15:39:33 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 tstmsc at ya.ru changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID |--- --- Comment #11 from tstmsc at ya.ru --- (In reply to comment #10) > This issue should remain closed. It is not a problem with the JVM, it is a > user-side configuration issue. i have tryed to use huge pages parametr, it didnt help -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/1535dc78/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 08:40:46 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 15:40:46 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #12 from Deepak Bhole --- (In reply to comment #11) > (In reply to comment #10) > > This issue should remain closed. It is not a problem with the JVM, it is a > > user-side configuration issue. > > i have tryed to use huge pages parametr, it didnt help Can you post the hs_err log? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/9bfcb57a/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 09:02:00 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 16:02:00 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #13 from Deepak Bhole --- Just noticed that you posted a log with UseLargePages on Saturday. Okay, can you try to reduce the hugepage count and see if it still happens again though? I would reduce huge page count by at least 1500 (3 GB) if not more and reduce Xmx accordingly. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/0105ca89/attachment.html From andrew at icedtea.classpath.org Mon Sep 10 09:49:35 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 10 Sep 2012 16:49:35 +0000 Subject: /hg/icedtea6-hg: 31 new changesets Message-ID: changeset 7f4c7b5567f3 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=7f4c7b5567f3 author: Omair Majid date: Wed Jun 27 16:19:49 2012 -0400 Fix JRE arch dir for x86 in tapset test script 2012-06-26 Omair Majid * test/tapset/jstaptest.pl (get_arch_dir): Fix dir for x86. changeset f8a29d2a4ca4 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=f8a29d2a4ca4 author: Omair Majid date: Thu Jun 28 13:27:42 2012 -0400 PR1050: Stream objects not garbage collected 2012-06-28 Omair Majid * NEWS: Update with fix. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java: Add new member variable contextPointer. * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new): Save j_context as contextPointer. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1unref): Delete the global ref and dellocate the java context. (cork_callback): Don't check userdata. It is NULL. (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork): Dont allocate and pass a java_context to pa_stream_cork. It is not needed. * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java (testOpenCloseLotsOfTimes): New method. changeset 054fb28a4e6f in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=054fb28a4e6f author: Omair Majid date: Thu Jun 28 20:04:54 2012 -0400 Synchronize access to shared variable The variable writeInterrupted is accessed everywhere while holding a lock on 'this' object, except in one location. Fix that. 2012-06-28 Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (write): Synchronize access to writeInterrupted flag. changeset e77ff9c25f68 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=e77ff9c25f68 author: Omair Majid date: Thu Jun 28 20:14:46 2012 -0400 R902: PulseAudioClip getMicrosecondsLength() returns length in milliseconds, not microseconds Define a (correct) constant for converting from seconds to microsecond and use it everywhere. 2012-06-28 Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java (getMicrosecondLength, getMicrosecondPosition) (setMicrosecondPosition): Use correct factor to convert seconds to microseconds. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (getMicrosecondPosition): Likewise. * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java: Define SECONDS_TO_MICROSECONDS. changeset ef9ac7b86cd8 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=ef9ac7b86cd8 author: Andrew John Hughes date: Wed Aug 08 20:36:12 2012 +0100 6414899: Support cloning on P11Digest so the TestDigest ucrypto test passes on NSS. 2012-08-08 Andrew John Hughes * Makefile.am: Add new patch. * patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch: Backport of OpenJDK patch to make com.oracle.security.ucrypto.TestDigest test work on NSS. changeset 934d192c3757 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=934d192c3757 author: Andrew John Hughes date: Thu Aug 09 20:54:36 2012 +0100 Apply NSS changes to java.security after build. 2012-08-09 Andrew John Hughes Apply NSS changes to java.security after build. * Makefile.am: (ICEDTEA_PATCHES): Don't add NSS config patches. (NSS_PATCHES): Add here instead. (add-nss): Apply NSS_PATCHES. (clean-add-nss): Revert java.security. (add-nss-debug): Apply NSS_PATCHES to debug build. (clean-add-nss-debug): Revert java.security for debug build. (add-nss-ecj): Apply NSS_PATCHES to bootstrap build. (clean-add-nss-ecj): Revert java.security for bootstrap build. changeset b20e2e867dd8 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b20e2e867dd8 author: Stefan Ring date: Thu Aug 09 14:01:53 2012 +0200 copy entire CACAO directory, including .hg CACAO can make use of the repository in determining its Mercurial revision since . changeset 0ad57a8403af in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=0ad57a8403af author: Andrew John Hughes date: Thu Aug 09 21:08:15 2012 +0100 Merge changeset ea7e1305805c in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=ea7e1305805c author: Stefan Ring date: Fri Aug 10 10:38:57 2012 +0200 Fix CACAO URL changeset 3698dcbffc3f in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=3698dcbffc3f author: Yasumasa Suenaga date: Sun Aug 05 22:16:29 2012 +0200 Support CompressedOops for jstack.stp. * tapset/jstack.stp.in (NarrowOopStruct): New global. (hotspot.vm_init_end): Initialize NarrowOopStruct. (hotspot.vm_shutdown): Delete NarrowOopStruct for pid. (jstack_call): Use NarrowOopStruct to calculate methodOopKlass. changeset 3f817235ba8d in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=3f817235ba8d author: Mark Wielaard date: Sun Aug 05 22:32:14 2012 +0200 Add UseCompressedOops tests to jstaptest.pl. * Makefile.am (check-tapset-probes): New target. (check-tapset-jstack): Likewise. (check-tapset): Depend on check-tapset-probes check-tapset-jstack. * test/tapset/jstaptest.pl (process_args): Add -p [$run_test_probes] and -j [$run_test_jstack]. (test_jstack): Takes argument to pass to java process. Pass -XX:+UseCompressedOops and/or -Xmx5G. changeset 3c980c916ff7 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=3c980c916ff7 author: Mark Wielaard date: Mon Aug 06 17:12:29 2012 +0200 test/tapset/jstaptest.pl: Expect non-zero value for NewObjectA.return. changeset 5cdc730ba01e in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=5cdc730ba01e author: Mark Wielaard date: Fri Aug 10 16:39:56 2012 +0200 merge changeset b8d3d110abfe in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b8d3d110abfe author: Xerxes Ranby date: Mon Aug 13 16:26:21 2012 +0200 JamVM: Updated to 2012-07-25 revision. 2012-08-13 Xerxes Ranby JamVM - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) - PPC: Don't use lwsync if it isn't supported - X86: Generate machine-dependent stubs for i386 - When suspending, ignore detached threads that have died, this prevents a user caused deadlock when an external thread has been attached to the VM via JNI and it has exited without detaching - Add missing REF_TO_OBJs for references passed from JNI, this enable JamVM to run Qt-Jambi * NEWS: Updated. * Makefile.am (JAMVM_VERSION): Updated JamVM to 2012-07-25 revision. (JAMVM_SHA256SUM): Updated. changeset d1c1c1e9fa40 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=d1c1c1e9fa40 author: Andrew John Hughes date: Wed Aug 15 11:43:19 2012 +0100 Guard reversion of java.security so the mv command is not run by non-NSS builds. 2012-08-14 Andrew John Hughes * Makefile.am: (clean-add-nss): Only move java.security.old if it exists. (clean-add-nss-debug): Likewise. (clean-add-nss-ecj): Likewise. changeset a5758742058d in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=a5758742058d author: Andrew John Hughes date: Wed Aug 15 12:17:03 2012 +0100 PR1113: Add tapset tests to distribution. 2012-08-14 Andrew John Hughes PR1113: Include tapset tests in distribution. * Makefile.am: (TAPSET_TEST_SRCS): Like tapset test sources. (EXTRA_DIST): Add TAPSET_TEST_SRCS. * NEWS: Updated. changeset 8182b4c86fed in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=8182b4c86fed author: Andrew John Hughes date: Wed Aug 15 23:07:12 2012 +0100 PR1117: IcedTea6 prebuilds far too many classes on bootstrap 2012-08-15 Andrew John Hughes PR1117: IcedTea6 prebuilds far too many classes on bootstrap * patches/ecj/hotspot.patch: Removed; replaced by hotspot-jdk-dependency We don't need to add rt.jar on the classpath as well as the bootclasspath. * Makefile.am: (ICEDTEA_BOOTSTRAP_DIRS): Removed. (ICEDTEA_BOOTSTRAP_CLASSES): Extend with new cases found through building without ICEDTEA_BOOTSTRAP_DIRS. (ICEDTEA_ECJ_PATCHES): Add new patches, remove hotspot.patch. (rt-source-files.txt): Remove use of ICEDTEA_BOOTSTRAP_CLASSES. * NEWS: Updated. * patches/ecj/7010849-make_sa-jdi_build_with_1.5.patch: Backport from OpenJDK7. Allows the serviceability agent to be compiled with 1.5. Added to bootstrap only to reduce potential issues with the API change. * patches/ecj/corba-dependencies.patch: Point the CORBA build at the JDK sources as it requires sun.tools.java. * patches/ecj/hotspot-jdk-dependency.patch: Point the HotSpot build at the JDK sources as it requires com.sun.jdi for the serviceability agent. Building com.sun.jdi requires 1.5+ source code and thus 7010849 is necessary. * patches/ecj/icedtea.patch: Extend CORBA Defs-java changes so that it uses the just-built langtools instead of the boot jdk's tools.jar. * patches/ecj/jaxws-jdk-dependency.patch: Point the JAXWS build at the JDK sources as it depends on com.sun.net.httpserver. * patches/ecj/jaxws-langtools-dependency.patch: Point the JAXWS build at the full langtools distribution, rather than just javac/javah/javadoc as it requires com.sun.mirror. changeset b41a73ca64e6 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b41a73ca64e6 author: Andrew John Hughes date: Thu Aug 16 01:51:50 2012 +0100 PR1119: Old installs still suffer from GCC PR41686 2012-08-16 Andrew John Hughes PR1121: Old installs still suffer from GCC PR41686 * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Add javax.security.auth.kerberos.KerberosTicket * NEWS: Updated. changeset c7c1cdb3bb3d in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=c7c1cdb3bb3d author: Pavel Tisnovsky date: Fri Aug 17 11:55:53 2012 +0200 Make the patch file patches/ecj/hotspot.patch compatible with patch tool 2.5.4 changeset 3f73297b2b13 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=3f73297b2b13 author: Mark Wielaard date: Thu Aug 16 22:02:19 2012 +0200 add-nss.stamp: Only try patching the security files if they actually exist. changeset ce869b71eca1 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=ce869b71eca1 author: Mark Wielaard date: Thu Aug 16 22:13:13 2012 +0200 Setup drops directory by symlinking when building zerovm. We are not actually using the drops inside the zerovm build environment, but they are checked. Which would lead to extra downloading. * Makefile.am (add-zero.stamp): Setup drops directory by symlinking. (add-zero-debug.stamp): Likewise. changeset 34390e3aa8c5 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=34390e3aa8c5 author: Mark Wielaard date: Fri Aug 17 16:32:32 2012 +0200 merge changeset f44000374b09 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=f44000374b09 author: Mark Wielaard date: Wed Aug 15 16:16:33 2012 +0200 Split up systemtap.patch in separate sdt-*patches and add testcase. Individual patches, plus testcase as proposed and discussed on hotspot-dev: http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-May/005739.html http://mail.openjdk.java.net/pipermail/hotspot-dev/2012-July/006196.html * Makefile.am (ICEDTEA_PATCHES): Remove systemtap.patch, add individual sdt-*.patches. * patches/systemtap.patch: Removed. * patches/sdt-arguments.patch: Added. * patches/sdt-dtrace-hpp.patch: Added. * patches/sdt-jni.patch: Added. * patches/sdt-make.patch: Added. * overlays/openjdk/hotspot/test/serviceability/SDTProbesGNULinuxTest.sh: New testcase. changeset fb1137cef484 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=fb1137cef484 author: Xerxes Ranby date: Mon Aug 20 18:10:54 2012 +0200 JamVM: Sync with IcedTea7; Updated JamVM to 2012-08-15 revision. 2012-08-20 Xerxes Ranby Robert Lougher JamVM: Sync with IcedTea7 * Makefile.am (JAMVM_VERSION): Updated JamVM to 2012-08-15 revision. (JAMVM_SHA256SUM): Updated. (stamps/jamvm.stamp): Use --with-java-runtime-library=openjdk6 changeset 1479af449489 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=1479af449489 author: Andrew John Hughes date: Fri Aug 31 15:06:23 2012 +0100 Add security fixes from 2012/08/30. 2012-08-31 Andrew John Hughes * Makefile.am: (SECURITY_PATCHES): Add 7162476, 7163201 & 7182135. (ICEDTEA_PATCHES): Add 7185678. * patches/merge_fix.patch: Patch to fix merge issues between new security fixes and previous backports. * patches/gcc-suffix.patch, * patches/libraries.patch, * patches/version-hotspot.patch: Regenerate to remove fuzz. * patches/nomotif-6706121.patch, * patches/openjdk/6633275-shaped_translucent_windows.patch, * patches/openjdk/6693253-security_warning.patch, * patches/openjdk/6797195-hw_lw_mixing.patch: Regenerated post-security patches. * patches/openjdk/7185678-xmenuitem_peer_npe.patch, * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: New patches from 6u35/7u7 security release. * patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch: Regression fix for 7162476. changeset 0e0ec12a88e3 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=0e0ec12a88e3 author: Andrew John Hughes date: Fri Aug 31 15:21:42 2012 +0100 Add missing file. changeset 5c199bcdebc8 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=5c199bcdebc8 author: Andrew John Hughes date: Fri Aug 31 15:26:08 2012 +0100 Add more meaningful names for hugepages patches, based on upstream summary. 2012-08-31 Andrew John Hughes * Makefile.am: (ICEDTEA_PATCHES): Rename patches. * patches/openjdk/7034464-hugepage.patch: Renamed to... * patches/openjdk/7034464-transparent_huge_pages.patch: this. * patches/openjdk/7037939-hugepage.patch: Renamed to... * patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch this. changeset db084058f69b in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=db084058f69b author: Andrew John Hughes date: Mon Sep 03 14:30:48 2012 +0100 Add 1.10.9 & 1.11.4 to NEWS. 2012-09-03 Andrew John Hughes * NEWS: Add 1.10.9 & 1.11.4. changeset 004393c6afb9 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=004393c6afb9 author: Andrew John Hughes date: Mon Sep 10 17:48:15 2012 +0100 Merge changeset 7fe15479d719 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=7fe15479d719 author: Mark Wielaard date: Mon Sep 03 20:06:53 2012 +0200 Makefile.am (ICEDTEA_PATCHES): Add missing backslash. There was backslash missing after 7034464-transparent_huge_pages.patch which caused all patches after that one to be note included in the list. changeset 7f9b1d08b2c5 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=7f9b1d08b2c5 author: Andrew John Hughes date: Mon Sep 10 17:48:48 2012 +0100 Merge diffstat: ChangeLog | 307 + Makefile.am | 279 +- NEWS | 36 + README | 2 +- overlays/openjdk/hotspot/test/serviceability/SDTProbesGNULinuxTest.sh | 68 + patches/ecj/7010849-make_sa-jdi_build_with_1.5.patch | 394 + patches/ecj/corba-dependencies.patch | 17 + patches/ecj/hotspot-jdk-dependency.patch | 25 + patches/ecj/hotspot.patch | 14 - patches/ecj/icedtea.patch | 7 +- patches/ecj/jaxws-jdk-dependency.patch | 47 + patches/ecj/jaxws-langtools-dependency.patch | 48 + patches/ecj/override.patch | 93 +- patches/gcc-suffix.patch | 116 +- patches/libraries.patch | 2589 +++--- patches/merge_fix.patch | 26 + patches/nomotif-6706121.patch | 659 +- patches/nss-config.patch | 4 +- patches/nss-not-enabled-config.patch | 4 +- patches/openjdk/6610244-modal-fatal-error-windows.patch | 125 - patches/openjdk/6633275-shaped_translucent_windows.patch | 201 +- patches/openjdk/6693253-security_warning.patch | 331 +- patches/openjdk/6797195-hw_lw_mixing.patch | 131 +- patches/openjdk/7034464-hugepage.patch | 458 - patches/openjdk/7034464-transparent_huge_pages.patch | 458 + patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch | 71 + patches/openjdk/7037939-hugepage.patch | 71 - patches/openjdk/7103224-glibc_name_collision.patch | 236 - patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch | 12 - patches/openjdk/7185678-xmenuitem_peer_npe.patch | 21 + patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch | 1511 ++++ patches/openjdk/remove-mimpure-option-to-gcc.patch | 162 - patches/sdt-arguments.patch | 24 + patches/sdt-dtrace-hpp.patch | 103 + patches/sdt-jni.patch | 37 + patches/sdt-make.patch | 51 + patches/security/20120612/7079902.patch | 508 - patches/security/20120612/7110720.patch | 129 - patches/security/20120612/7143606.patch | 644 - patches/security/20120612/7143614.patch | 165 - patches/security/20120612/7143617.patch | 72 - patches/security/20120612/7143851.patch | 74 - patches/security/20120612/7143872.patch | 400 - patches/security/20120612/7145239.patch | 68 - patches/security/20120612/7152811.patch | 107 - patches/security/20120612/7157609.patch | 56 - patches/security/20120612/7160677.patch | 19 - patches/security/20120612/7160757.patch | 26 - patches/security/20120830/7162476-xmldecoder_via_classfinder.patch | 2522 ++++++ patches/security/20120830/7163201-simplify_toolkit_internal_references.patch | 3713 ++++++++++ patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch | 519 + patches/support_linux_3.patch | 19 - patches/systemtap.patch | 162 - patches/version-hotspot.patch | 24 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 6 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java | 2 + pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 8 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java | 3 + pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c | 21 +- pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 13 + tapset/jstack.stp.in | 34 +- test/tapset/jstaptest.pl | 62 +- 62 files changed, 12187 insertions(+), 5927 deletions(-) diffs (truncated from 21406 to 500 lines): diff -r 9aff0fc60733 -r 7f9b1d08b2c5 ChangeLog --- a/ChangeLog Wed Jun 13 15:54:52 2012 +0100 +++ b/ChangeLog Mon Sep 10 17:48:48 2012 +0100 @@ -1,3 +1,286 @@ +2012-09-03 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after + patches/openjdk/7034464-transparent_huge_pages.patch. + +2012-09-03 Andrew John Hughes + + * NEWS: Add 1.10.9 & 1.11.4. + +2012-08-31 Andrew John Hughes + + * Makefile.am: + (JAXP_DROP_ZIP): Update to security fixed version. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop; upstream. + (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. + * patches/ecj/override.patch: Regenerate + against Oracle version of security patches. + + (ICEDTEA_PATCHES): Rename patches. + * patches/openjdk/7034464-hugepage.patch: + Renamed to... + * patches/openjdk/7034464-transparent_huge_pages.patch: + this. + * patches/openjdk/7037939-hugepage.patch: + Renamed to... + * patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch + this. + +2012-08-31 Andrew John Hughes + + * Makefile.am: + (SECURITY_PATCHES): Add 7162476, 7163201 & 7182135. + (ICEDTEA_PATCHES): Add 7185678. + * patches/merge_fix.patch: Patch to fix merge issues + between new security fixes and previous backports. + * patches/gcc-suffix.patch, + * patches/libraries.patch, + * patches/version-hotspot.patch: + Regenerate to remove fuzz. + * patches/nomotif-6706121.patch, + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6693253-security_warning.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Regenerated post-security patches. + * patches/openjdk/7185678-xmenuitem_peer_npe.patch, + * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, + * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: + New patches from 6u35/7u7 security release. + * patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch: + Regression fix for 7162476. + +2012-08-20 Xerxes R??nby + Robert Lougher + + JamVM: Sync with IcedTea7 + * Makefile.am + (JAMVM_VERSION): Updated JamVM to 2012-08-15 revision. + (JAMVM_SHA256SUM): Updated. + (stamps/jamvm.stamp): Use --with-java-runtime-library=openjdk6 + +2012-08-17 Pavel Tisnovsky + + * patches/ecj/hotspot.patch: + Make this patch file compatible with patch tool 2.5.4 + +2012-08-16 Mark Wielaard + + * Makefile.am (add-zero.stamp): Setup drops directory by symlinking. + (add-zero-debug.stamp): Likewise. + +2012-08-16 Mark Wielaard + + * Makefile.am (stamps/add-nss.stamp): Only try patching the + security files if they actually exist. + +2012-08-16 Andrew John Hughes + + PR1121: Old installs still suffer from GCC PR41686 + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): + Add javax.security.auth.kerberos.KerberosTicket + * NEWS: Updated. + +2012-08-15 Andrew John Hughes + + PR1117: IcedTea6 prebuilds far too many classes on bootstrap + * patches/ecj/hotspot.patch: + Removed; replaced by hotspot-jdk-dependency + We don't need to add rt.jar on the classpath + as well as the bootclasspath. + * Makefile.am: + (ICEDTEA_BOOTSTRAP_DIRS): Removed. + (ICEDTEA_BOOTSTRAP_CLASSES): Extend with new + cases found through building without + ICEDTEA_BOOTSTRAP_DIRS. + (ICEDTEA_ECJ_PATCHES): Add new patches, remove + hotspot.patch. + (rt-source-files.txt): Remove use of + ICEDTEA_BOOTSTRAP_CLASSES. + * NEWS: Updated. + * patches/ecj/7010849-make_sa-jdi_build_with_1.5.patch: + Backport from OpenJDK7. Allows the serviceability + agent to be compiled with 1.5. Added to bootstrap + only to reduce potential issues with the API change. + * patches/ecj/corba-dependencies.patch: + Point the CORBA build at the JDK sources as it + requires sun.tools.java. + * patches/ecj/hotspot-jdk-dependency.patch: + Point the HotSpot build at the JDK sources as it + requires com.sun.jdi for the serviceability agent. + Building com.sun.jdi requires 1.5+ source code and + thus 7010849 is necessary. + * patches/ecj/icedtea.patch: + Extend CORBA Defs-java changes so that it uses the + just-built langtools instead of the boot jdk's + tools.jar. + * patches/ecj/jaxws-jdk-dependency.patch: + Point the JAXWS build at the JDK sources as it + depends on com.sun.net.httpserver. + * patches/ecj/jaxws-langtools-dependency.patch: + Point the JAXWS build at the full langtools + distribution, rather than just javac/javah/javadoc + as it requires com.sun.mirror. + +2012-08-15 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Remove systemtap.patch, add + individual sdt-*.patches. + * patches/systemtap.patch: Removed. + * patches/sdt-arguments.patch: Added. + * patches/sdt-dtrace-hpp.patch: Added. + * patches/sdt-jni.patch: Added. + * patches/sdt-make.patch: Added. + * overlays/openjdk/hotspot/test/serviceability/SDTProbesGNULinuxTest.sh: + New testcase. + +2012-08-14 Andrew John Hughes + + PR1113: Include tapset tests in distribution. + * Makefile.am: + (TAPSET_TEST_SRCS): Like tapset test sources. + (EXTRA_DIST): Add TAPSET_TEST_SRCS. + * NEWS: Updated. + +2012-08-14 Andrew John Hughes + + * Makefile.am: + (clean-add-nss): Only move java.security.old + if it exists. + (clean-add-nss-debug): Likewise. + (clean-add-nss-ecj): Likewise. + +2012-08-13 Xerxes R??nby + + JamVM + - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) + - PPC: Don't use lwsync if it isn't supported + - X86: Generate machine-dependent stubs for i386 + - When suspending, ignore detached threads that have died, this prevents + a user caused deadlock when an external thread has been attached to the + VM via JNI and it has exited without detaching + - Add missing REF_TO_OBJs for references passed from JNI, + this enable JamVM to run Qt-Jambi + * NEWS: Updated. + * Makefile.am + (JAMVM_VERSION): Updated JamVM to 2012-07-25 revision. + (JAMVM_SHA256SUM): Updated. + +2012-08-10 Stefan Ring + + * README: Fix CACAO URL. + +2012-08-06 Mark Wielaard + + * test/tapset/jstaptest.pl (probestrings): Expect non-zero value + for hotspot.jni.NewObjectA.return. + +2012-08-03 Mark Wielaard + + * Makefile.am (check-tapset-probes): New target. + (check-tapset-jstack): Likewise. + (check-tapset): Depend on check-tapset-probes check-tapset-jstack. + * test/tapset/jstaptest.pl (process_args): Add -p [$run_test_probes] + and -j [$run_test_jstack]. + (test_jstack): Takes argument to pass to java process. + Pass -XX:+UseCompressedOops and/or -Xmx5G. + +2012-08-03 Yasumasa Suenaga + + * tapset/jstack.stp.in (NarrowOopStruct): New global. + (hotspot.vm_init_end): Initialize NarrowOopStruct. + (hotspot.vm_shutdown): Delete NarrowOopStruct for pid. + (jstack_call): Use NarrowOopStruct to calculate methodOopKlass. + +2012-08-09 Stefan Ring + + * Makefile.am: copy entire CACAO directory, including .hg + +2012-08-09 Andrew John Hughes + + Apply NSS changes to java.security after + build. + * Makefile.am: + (ICEDTEA_PATCHES): Don't add NSS config patches. + (NSS_PATCHES): Add here instead. + (add-nss): Apply NSS_PATCHES. + (clean-add-nss): Revert java.security. + (add-nss-debug): Apply NSS_PATCHES to debug build. + (clean-add-nss-debug): Revert java.security for debug build. + (add-nss-ecj): Apply NSS_PATCHES to bootstrap build. + (clean-add-nss-ecj): Revert java.security for bootstrap build. + +2012-08-08 Andrew John Hughes + + * Makefile.am: Add new patch. + * patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch: + Backport of OpenJDK patch to make + com.oracle.security.ucrypto.TestDigest test + work on NSS. + +2012-06-28 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (getMicrosecondLength, getMicrosecondPosition) + (setMicrosecondPosition): Use correct factor to convert seconds to + microseconds. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + (getMicrosecondPosition): Likewise. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java: + Define SECONDS_TO_MICROSECONDS. + +2012-06-28 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + (write): Synchronize access to writeInterrupted flag. + +2012-06-28 Omair Majid + + PR1050: Stream objects not garbage collected + * NEWS: Update with fix. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java: + Add new member variable contextPointer. + * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new): + Save j_context as contextPointer. + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1unref): + Delete the global ref and dellocate the java context. + (cork_callback): Don't check userdata. It is NULL. + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork): + Dont allocate and pass a java_context to pa_stream_cork. It is not needed. + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java + (testOpenCloseLotsOfTimes): New method. + +2012-06-26 Omair Majid + + * test/tapset/jstaptest.pl (get_arch_dir): Fix dir for x86. + +2012-06-13 Andrew John Hughes + + * patches/openjdk/remove-mimpure-option-to-gcc.patch: + Dropped; upstreamed. + * patches/security/20120612/7079902.patch, + * patches/security/20120612/7110720.patch, + * patches/security/20120612/7143606.patch, + * patches/security/20120612/7143614.patch, + * patches/security/20120612/7143617.patch, + * patches/security/20120612/7143851.patch, + * patches/security/20120612/7143872.patch, + * patches/security/20120612/7145239.patch, + * patches/security/20120612/7152811.patch, + * patches/security/20120612/7157609.patch, + * patches/security/20120612/7160677.patch, + * patches/security/20120612/7160757.patch: + Dropped; provided by Oracle upstream. + * Makefile.am: + (JAXP_DROP_ZIP): Update to security fixed version. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop; upstream. + (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. + * patches/ecj/override.patch: Regenerate + against Oracle version of security patches. + 2012-06-07 Andrew John Hughes * Makefile.am, @@ -21,6 +304,30 @@ * NEWS: Add 1.10.8 & 1.11.3 releases. +2012-06-11 Andrew John Hughes + + * patches/openjdk/7103224-glibc_name_collision.patch, + * patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch, + * patches/support_linux_3.patch: + Drop upstreamed patches. + * Makefile.am: + (ICEDTEA_PATCHES): Removed above patches. + * patches/openjdk/6633275-shaped_translucent_windows.patch: + Regenerated due to copyright header change by Oracle. + +2012-06-06 Andrew John Hughes + + * patches/openjdk/6610244-modal-fatal-error-windows.patch: + Removed. + * Makefile.am, + Remove upstreamed patch. + +2012-05-16 Andrew John Hughes + + * Makefile.am: + (OPENJDK_VERSION): Move to b26, ready + for next release. + 2012-05-16 Andrew John Hughes Move to released b25. diff -r 9aff0fc60733 -r 7f9b1d08b2c5 Makefile.am --- a/Makefile.am Wed Jun 13 15:54:52 2012 +0100 +++ b/Makefile.am Mon Sep 10 17:48:48 2012 +0100 @@ -2,7 +2,7 @@ OPENJDK_DATE = 01_may_2012 OPENJDK_SHA256SUM = 42db988b436593017e29d6543ac09168a901027817e41dc1be5c795b85d53b05 -OPENJDK_VERSION = b25 +OPENJDK_VERSION = b26 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/ CACAO_VERSION = cff92704c4e0 @@ -11,8 +11,8 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -JAMVM_VERSION = 4617da717ecb05654ea5bb9572338061106a414d -JAMVM_SHA256SUM = 47fce7bd556c1b1d29a93b8c45497e0d872b48b7f535066b303336f29d0f0d8d +JAMVM_VERSION = e70f2450890b82c37422616cc85e1a23385f03cd +JAMVM_SHA256SUM = 3ca7e297ef4daa56c3dd733e21bce795d57ab071243369aa9400c0384ada8a4c JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz @@ -24,8 +24,8 @@ JAF_DROP_ZIP = jdk6-jaf-b20.zip JAF_DROP_SHA256SUM = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012 JAXP_DROP_URL = http://icedtea.classpath.org/download/drops -JAXP_DROP_ZIP = jaxp144_03.zip -JAXP_DROP_SHA256SUM = c1a5348e17b330a7e4b18431e61a40efd2ba99a7da71102cf2c604478ef96012 +JAXP_DROP_ZIP = jaxp144_04.zip +JAXP_DROP_SHA256SUM = 490f696218c1fed9cb180680af883fe309b414fec232e9cec19645e12ad0b43c OPENJDK_HG_URL = http://hg.openjdk.java.net/jdk6/jdk6 HOTSPOT_SRC_ZIP = hotspot.tar.gz @@ -62,31 +62,19 @@ SOURCEPATH_DIRS = $(abs_top_srcdir)/generated:$(OPENJDK_SOURCEPATH_DIRS) # Sources used from OpenJDK. -ICEDTEA_BOOTSTRAP_DIRS = \ - $(SHARE)/com/sun/jdi \ - $(SHARE)/com/sun/net/httpserver \ - $(SHARE)/com/sun/tools/jdi \ - $(SHARE)/java/io \ - $(SHARE)/java/security/cert \ - $(SHARE)/java/util \ - $(SHARE)/java/rmi \ - $(SHARE)/sun/awt/ \ - $(SHARE)/sun/nio/cs \ - $(SHARE)/sun/rmi/rmic \ - $(SHARE)/sun/tools/java \ - $(SHARE)/javax/net/ssl \ - $(SHARE)/javax/script \ - $(SHARE)/javax/security/auth/kerberos \ - $(SHARE)/javax/security/sasl \ - $(LANGTOOLS)/com/sun/mirror \ - $(LANGTOOLS)/com/sun/tools/apt # PR42003 - javax.swing.plaf.basic.BasicDirectoryModel # PR43389 - javax.management.StandardMBean +# PR54274 - sun.security.other requires missing X509CRLSelector methods +# PR54275 - sun.security.sasl requires missing Sasl.CREDENTIALS field ICEDTEA_BOOTSTRAP_CLASSES = \ $(SHARE)/javax/swing/plaf/basic/BasicDirectoryModel.java \ $(SHARE)/javax/management/StandardMBean.java \ - $(SHARE)/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java + $(SHARE)/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java \ + $(SHARE)/java/security/cert/X509CRLSelector.java \ + $(SHARE)/java/security/cert/X509CertSelector.java \ + $(SHARE)/javax/security/sasl/Sasl.java \ + $(SHARE)/javax/security/auth/kerberos/KerberosTicket.java # Flags MEMORY_LIMIT = -J-Xmx1024m @@ -188,30 +176,32 @@ # Relative path to JTreg tool JTREG_DIR = src/jtreg JTREG_SRCS = $(top_srcdir)/$(JTREG_DIR) +TAPSET_TEST_SRCS = \ + $(top_srcdir)/test/tapset/ClassUnloadedProbeTester.java \ + $(top_srcdir)/test/tapset/JNIStapTest.c \ + $(top_srcdir)/test/tapset/JNITestClass.c \ + $(top_srcdir)/test/tapset/JNITestClass.h \ + $(top_srcdir)/test/tapset/JNITestClass.java \ + $(top_srcdir)/test/tapset/jstaptest.pl \ + $(top_srcdir)/test/tapset/RunWrapper.java \ + $(top_srcdir)/test/tapset/StapJNIClassLoader.java \ + $(top_srcdir)/test/tapset/StapURLClassLoader.java \ + $(top_srcdir)/test/tapset/SystemtapTester.java \ + $(top_srcdir)/test/tapset/TestingRunner.java # Patch list ICEDTEA_FSG_PATCHES = SECURITY_PATCHES = \ - patches/security/20120612/7079902.patch \ - patches/security/20120612/7110720.patch \ - patches/security/20120612/7143606.patch \ - patches/security/20120612/7143614.patch \ - patches/security/20120612/7143617.patch \ - patches/security/20120612/7143851.patch \ - patches/security/20120612/7143872.patch \ - patches/security/20120612/7145239.patch \ - patches/security/20120612/7152811.patch \ - patches/security/20120612/7157609.patch \ - patches/security/20120612/7160677.patch \ - patches/security/20120612/7160757.patch + patches/security/20120830/7162476-xmldecoder_via_classfinder.patch \ + patches/security/20120830/7163201-simplify_toolkit_internal_references.patch \ + patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ - patches/openjdk/6610244-modal-fatal-error-windows.patch \ patches/stdc-limit-macros.patch \ patches/openjdk/4993545-nativeinlightfixer.patch \ patches/openjdk/6637796-set_bounds.patch \ @@ -346,8 +336,8 @@ patches/openjdk/6986968-crash_on_xim_restart.patch \ patches/openjdk/7036754-stroker-nan.patch \ patches/openjdk/pgram-pipe-regression.patch \ - patches/openjdk/7034464-hugepage.patch \ - patches/openjdk/7037939-hugepage.patch \ + patches/openjdk/7034464-transparent_huge_pages.patch \ + patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch \ patches/openjdk/7043564-hugepage.patch \ patches/openjdk/mutter.patch \ patches/fonts-rhel-version.patch \ @@ -367,7 +357,6 @@ patches/openjdk/6699843-IllegalArgumentException_drawString.patch \ patches/openjdk/6918065-Crash_in_Java2D_blit_loop.patch \ patches/openjdk/6623219-Font_canDisplayUpTo_does_not_work.patch \ - patches/support_linux_3.patch \ patches/openjdk/6783910-java_awt_Color_brighter_darker_fix.patch \ patches/openjdk/6785424-SecurityException_locating_physical_fonts.patch \ patches/openjdk/7047069-Array_can_dynamically_change_size.patch \ @@ -402,15 +391,12 @@ patches/openjdk/6826104-npe_on_app_and_toolkit_modal_dialog_click.patch \ patches/openjdk/5082756-ImageIO_plugins_metadata_boolean_attributes.patch \ patches/openjdk/6296893-BMP_Writer_handles_TopDown_prop_incorrectly.patch \ - patches/openjdk/7103224-glibc_name_collision.patch \ patches/arm-debug.patch \ patches/arm-hsdis.patch \ patches/openjdk/7103610-_NET_WM_PID_and_WM_CLIENT_MACHINE_are_not_set.patch \ patches/openjdk/6706974-krb5_test_infrastructure.patch \ patches/openjdk/6764553-IdResolver_is_not_thread_safe.patch \ patches/openjdk/6761072-new_krb5_tests_fail_on_multiple_platforms.patch \ - patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch \ - patches/openjdk/remove-mimpure-option-to-gcc.patch \ patches/ScriptEngineManager-doc.patch \ patches/openjdk/6883983-JarVerifier_removed_dependency_sun_security_pkcs.patch \ patches/openjdk/4465490-Suspicious_double-check_locking_idiom.patch \ @@ -429,7 +415,10 @@ patches/openjdk/p11cipher-6867345-turkish_regional_options_cause_npe_in_algoid.patch \ patches/openjdk/p11cipher-6687725-throw_illegalblocksizeexception.patch \ patches/openjdk/p11cipher-6924489-ckr_operation_not_initialized.patch \ - patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch + patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch \ + patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch \ + patches/openjdk/7185678-xmenuitem_peer_npe.patch \ + patches/merge_fix.patch if WITH_RHINO ICEDTEA_PATCHES += \ @@ -461,15 +450,18 @@ endif if ENABLE_SYSTEMTAP -ICEDTEA_PATCHES += patches/systemtap.patch \ +ICEDTEA_PATCHES += patches/sdt-jni.patch \ + patches/sdt-dtrace-hpp.patch \ + patches/sdt-make.patch \ + patches/sdt-arguments.patch \ patches/systemtap-gcc-4.5.patch \ patches/systemtap-alloc-size-workaround.patch endif From ChrisPhi at LGonQn.Org Mon Sep 10 11:01:24 2012 From: ChrisPhi at LGonQn.Org (Chris Phillips @ T O) Date: Mon, 10 Sep 2012 14:01:24 -0400 Subject: UseG1GC unimplemented in generate_Reference_get_entry()? In-Reply-To: References: Message-ID: <504E2AF4.5030202@LGonQn.Org> Hi You should probably address this to the icedtea list or the Zero list as zero is effectively unsupported by the maintainers of the g1 code (they don't build or test with it...) In any event the code that you are using was re-enabled by me recently so when I get some time (still working on jsr 292 atm), I'll try to re-enable g1 with zero [no promises]. If you can do it then submit a patch... Cheers! Chris On 10/09/12 01:49 PM, the.6th.month at gmail.com wrote: > hi,all: > > I just compiled an icedtea-2.3.2 version on my laptop, the kernel > version is Linux-3.5.3. I manually built it for the purpose of > systemtap, and hence added --enable-systemtap compile option. > > Then I ran a simple test program with vm args: -Xms1024m -Xmx1024m > -Xmn256m -XX:PermSize=256m -XX:+UseG1GC, and I got a core dump. The > bt output from gdb is shown below: > Using host libthread_db library "/lib64/libthread_db.so.1". > Core was generated by `/usr/lib64/java/bin/java -Xms1024m -Xmx1024m > -Xmn256m -XX:PermSize=256m -XX:+Us'. > Program terminated with signal 6, Aborted. > #0 0x00007fcfb8950a25 in raise () from /lib64/libc.so.6 > (gdb) bt > #0 0x00007fcfb8950a25 in raise () from /lib64/libc.so.6 > #1 0x00007fcfb89521d8 in abort () from /lib64/libc.so.6 > #2 0x00007fcfb853eaa1 in os::abort (dump_core=true) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:1589 > #3 0x00007fcfb85f18cf in VMError::report_and_die (this=0x7fcfb970f7d0) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/utilities/vmError.cpp:1004 > #4 0x00007fcfb836c95f in report_vm_error (detail_msg=0x0, > error_msg=0x7fcfb860cd26 "Unimplemented()", > line=, file=) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/utilities/debug.cpp:220 > #5 report_vm_error (detail_msg=0x0, error_msg=0x7fcfb860cd26 > "Unimplemented()", line=, > file=) at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/utilities/debug.cpp:260 > #6 report_unimplemented (file=, line=) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/utilities/debug.cpp:261 > #7 0x00007fcfb836c15d in generate_Reference_get_entry > (this=0x7fcfb970fb00) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:1649 > #8 AbstractInterpreterGenerator::generate_method_entry > (this=0x7fcfb970fb00, kind=) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:1725 > #9 0x00007fcfb8368634 in CppInterpreterGenerator::generate_all > (this=0x7fcfb970fb00) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.cpp:128 > #10 0x00007fcfb8367be2 in CppInterpreter::initialize () > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/interpreter/cppInterpreter.cpp:45 > #11 0x00007fcfb84182e9 in interpreter_init () > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/interpreter/interpreter.cpp:113 > #12 0x00007fcfb83ea4d5 in init_globals () at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/runtime/init.cpp:102 > #13 0x00007fcfb85c2bdc in Threads::create_vm (args=, > canTryAgain=0x7fcfb970fd90) > at > /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/runtime/thread.cpp:3182 > #14 0x00007fcfb844a67f in JNI_CreateJavaVM (vm=0x7fcfb970fe30, > penv=0x7fcfb970fe40, args=) > at /tmp/icedtea-2.3.2/openjdk/hotspot/src/share/vm/prims/jni.cpp:5112 > #15 0x00007fcfb90f56dc in InitializeJVM (penv=0x7fcfb970fe40, > pvm=0x7fcfb970fe30, ifn=) > at ../../../src/share/bin/java.c:1115 > ---Type to continue, or q to quit--- > #16 JavaMain (_args=) at ../../../src/share/bin/java.c:360 > #17 0x00007fcfb9306eae in start_thread () from /lib64/libpthread.so.0 > #18 0x00007fcfb8a0ffed in clone () from /lib64/libc.so.6 > > And I dug > into /tmp/icedtea-2.3.2/openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:1649 > following the stacktrace, and discovered that: > address InterpreterGenerator::generate_Reference_get_entry(void) { > #ifndef SERIALGC > if (UseG1GC) { > // We need to generate have a routine that generates code to: > // * load the value in the referent field > // * passes that value to the pre-barrier. > // > // In the case of G1 this will record the value of the > // referent in an SATB buffer if marking is active. > // This will cause concurrent marking to mark the referent > // field as live. > Unimplemented(); > } > #endif // SERIALGC > > // If G1 is not enabled then attempt to go through the accessor > entry point > // Reference.get is an accessor > return generate_accessor_entry(); > } > > I am wondering how the generate_Reference_get_entry function is > triggered and why it runs into Unimplemented() when UseG1GC enabled. > Moreover, is the iced-tea 2.3.2 shipped with G1GC by default or I > should enable it with some sort of compilation option? > > Any help would be truly appreciated. > > All the best, > Leon > > > > _______________________________________________ > hotspot-gc-use mailing list > hotspot-gc-use at openjdk.java.net > http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/ead7a874/attachment.html From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 12:48:15 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 19:48:15 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |adomurad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/179094b4/attachment.html From smohammad at redhat.com Mon Sep 10 13:19:02 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Mon, 10 Sep 2012 16:19:02 -0400 Subject: [icedtea-web] Feedback requested - reworking JNLPClassLoader#foundMainJar In-Reply-To: <1346187467.19536.114.camel@voip-10-15-18-79.yyz.redhat.com> References: <1346187467.19536.114.camel@voip-10-15-18-79.yyz.redhat.com> Message-ID: <504E4B36.7020504@redhat.com> On 08/28/2012 04:57 PM, Adam Domurad wrote: > Motivation here is that I'm looking into adding additional code to make > sure main class's can be found via INDEX.LIST for PR1112 [1]. I had > noticed already that simply hard-wiring foundMainJar = true; caused the > reproducer I created to pass. > > What duties does foundMainJar accomplish other than causing a > LaunchException ? Are there any major flaws in this approach used in the > patch (using findLoadedClassAll)? > Hi Adam, The initial purpose of foundMainJar is to keep track of whether the loader has the main jar. If the main jar is found, it will check and validate a signed jnlp file, but if it is not found then it will throw a launch exception since the jar with the main class is required to continue launching the application. There were few bug [PR1041, and PR1042] that were found later causing applications not to load correctly because their main jar were in extension jnlps (extension loaders). The bug fix introduced few new methods and used foundMainJar to determine if the current loader or the extension loader(s) have the main jar. Anyways, going to your second question, I am not aware of any flaws with findLoadedClassAll() and and after looking over your code it seems to be doing the same thing with fewer lines of code! I ran the reproducers that have major impact on foundMainJar and they all seem to be passing, so I give it a thumbs up for HEAD! :) Thanks for doing this! > (This patch is a rough sketch, don't scrutinize it -too- much :) > > Thanks, > - Adam > > [1] http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1112 > -- Cheers, Saad Mohammad From bugzilla-daemon at icedtea.classpath.org Mon Sep 10 13:22:40 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 10 Sep 2012 20:22:40 +0000 Subject: [Bug 1157] icedtea-web locks up browser and future applets after first visit a page with missing code applet class. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1157 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |adomurad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120910/0b027ae3/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 11 04:04:56 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Sep 2012 11:04:56 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #14 from tstmsc at ya.ru --- Well, have tryed to use 3GB for hugepages, works -Xms and no log errors(only with libcups). So what the problem I can't use huge count of memmory? Archlinux support problem or openjdk or both? And i can't remove problem with libcups.so.2 =\ Have tryed to update libcups but new archlinux doesn't whant to download it(can't find in the repositories) -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120911/85a58756/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 11 05:36:59 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Sep 2012 12:36:59 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #15 from tstmsc at ya.ru --- 11GB works -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120911/726a906d/attachment.html From ptisnovs at icedtea.classpath.org Tue Sep 11 05:40:49 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 11 Sep 2012 12:40:49 +0000 Subject: /hg/gfx-test: Added new annotations to five "BitBlt" tests, fixe... Message-ID: changeset ba24a5ebfe08 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=ba24a5ebfe08 author: Pavel Tisnovsky date: Tue Sep 11 14:43:25 2012 +0200 Added new annotations to five "BitBlt" tests, fixed typo in three annotation sources. diffstat: ChangeLog | 15 ++++++++++++ src/org/gfxtest/framework/annotations/BitBltOperation.java | 2 +- src/org/gfxtest/framework/annotations/GraphicsPrimitive.java | 1 + src/org/gfxtest/framework/annotations/RasterOperation.java | 2 +- src/org/gfxtest/testsuites/BitBltBasicTests.java | 3 ++ src/org/gfxtest/testsuites/BitBltCropImage.java | 5 +++- src/org/gfxtest/testsuites/BitBltMirrorImage.java | 3 ++ src/org/gfxtest/testsuites/BitBltRotateImage.java | 3 ++ src/org/gfxtest/testsuites/BitBltScaleImage.java | 3 ++ src/org/gfxtest/testsuites/BitBltUsingBgColor.java | 5 +++- src/org/gfxtest/testsuites/PrintTestBitBlt.java | 3 ++ 11 files changed, 41 insertions(+), 4 deletions(-) diffs (197 lines): diff -r da233eec72ee -r ba24a5ebfe08 ChangeLog --- a/ChangeLog Mon Sep 10 09:34:44 2012 +0200 +++ b/ChangeLog Tue Sep 11 14:43:25 2012 +0200 @@ -1,3 +1,18 @@ +2012-09-11 Pavel Tisnovsky + + * src/org/gfxtest/framework/annotations/BitBltOperation.java: + * src/org/gfxtest/framework/annotations/GraphicsPrimitive.java: + * src/org/gfxtest/framework/annotations/RasterOperation.java: + Fixed typos. + * src/org/gfxtest/testsuites/BitBltBasicTests.java: + * src/org/gfxtest/testsuites/BitBltCropImage.java: + * src/org/gfxtest/testsuites/BitBltMirrorImage.java: + * src/org/gfxtest/testsuites/BitBltRotateImage.java: + * src/org/gfxtest/testsuites/BitBltScaleImage.java: + * src/org/gfxtest/testsuites/BitBltUsingBgColor.java: + * src/org/gfxtest/testsuites/PrintTestBitBlt.java: + Added new annotations to these tests. + 2012-09-10 Pavel Tisnovsky * src/org/gfxtest/framework/GfxTest.java: diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/framework/annotations/BitBltOperation.java --- a/src/org/gfxtest/framework/annotations/BitBltOperation.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/framework/annotations/BitBltOperation.java Tue Sep 11 14:43:25 2012 +0200 @@ -56,5 +56,5 @@ @Retention(RetentionPolicy.RUNTIME) public @interface BitBltOperation { - BitBltOperations values(); + BitBltOperations value(); } diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/framework/annotations/GraphicsPrimitive.java --- a/src/org/gfxtest/framework/annotations/GraphicsPrimitive.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/framework/annotations/GraphicsPrimitive.java Tue Sep 11 14:43:25 2012 +0200 @@ -48,6 +48,7 @@ /** * Declaration of interface used to specify graphics primitive for each test * suite. + * * @see GraphicsPrimitives * * @author Pavel Tisnovsky diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/framework/annotations/RasterOperation.java --- a/src/org/gfxtest/framework/annotations/RasterOperation.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/framework/annotations/RasterOperation.java Tue Sep 11 14:43:25 2012 +0200 @@ -56,5 +56,5 @@ @Retention(RetentionPolicy.RUNTIME) public @interface RasterOperation { - RasterOperations values(); + RasterOperations value(); } diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/BitBltBasicTests.java --- a/src/org/gfxtest/testsuites/BitBltBasicTests.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBasicTests.java Tue Sep 11 14:43:25 2012 +0200 @@ -48,6 +48,8 @@ import org.gfxtest.framework.CommonBitmapOperations; import org.gfxtest.framework.GfxTest; import org.gfxtest.framework.TestImage; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -70,6 +72,7 @@ @TestType(TestTypes.RENDER_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) @RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.BITBLT) @Transformation(Transformations.NONE) @Zoom(1) public class BitBltBasicTests extends GfxTest diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/BitBltCropImage.java --- a/src/org/gfxtest/testsuites/BitBltCropImage.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltCropImage.java Tue Sep 11 14:43:25 2012 +0200 @@ -41,6 +41,8 @@ package org.gfxtest.testsuites; import org.gfxtest.framework.GfxTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -62,7 +64,8 @@ */ @TestType(TestTypes.RENDER_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) - at RenderStyle(RenderStyles.NORMAL_AA) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.CROP) @Transformation(Transformations.NONE) @Zoom(1) public class BitBltCropImage extends GfxTest diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/BitBltMirrorImage.java --- a/src/org/gfxtest/testsuites/BitBltMirrorImage.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltMirrorImage.java Tue Sep 11 14:43:25 2012 +0200 @@ -49,6 +49,8 @@ import org.gfxtest.framework.GfxTest; import org.gfxtest.framework.TestImage; import org.gfxtest.framework.TestResult; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -71,6 +73,7 @@ @TestType(TestTypes.RENDER_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) @RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.MIRROR) @Transformation(Transformations.MIRROR) @Zoom(1) public class BitBltMirrorImage extends GfxTest diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/BitBltRotateImage.java --- a/src/org/gfxtest/testsuites/BitBltRotateImage.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltRotateImage.java Tue Sep 11 14:43:25 2012 +0200 @@ -41,6 +41,8 @@ package org.gfxtest.testsuites; import org.gfxtest.framework.GfxTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -63,6 +65,7 @@ @TestType(TestTypes.RENDER_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) @RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.ROTATE) @Transformation(Transformations.ROTATION) @Zoom(1) public class BitBltRotateImage extends GfxTest diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/BitBltScaleImage.java --- a/src/org/gfxtest/testsuites/BitBltScaleImage.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltScaleImage.java Tue Sep 11 14:43:25 2012 +0200 @@ -49,6 +49,8 @@ import org.gfxtest.framework.GfxTest; import org.gfxtest.framework.TestImage; import org.gfxtest.framework.TestResult; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -71,6 +73,7 @@ @TestType(TestTypes.RENDER_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) @RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.SCALE) @Transformation(Transformations.SCALE) @Zoom(1) public class BitBltScaleImage extends GfxTest diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/BitBltUsingBgColor.java --- a/src/org/gfxtest/testsuites/BitBltUsingBgColor.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltUsingBgColor.java Tue Sep 11 14:43:25 2012 +0200 @@ -41,6 +41,8 @@ package org.gfxtest.testsuites; import org.gfxtest.framework.GfxTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -63,7 +65,8 @@ */ @TestType(TestTypes.RENDER_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) - at RenderStyle(RenderStyles.NORMAL_AA) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.BITBLT) @Transformation(Transformations.NONE) @Zoom(1) public class BitBltUsingBgColor extends GfxTest diff -r da233eec72ee -r ba24a5ebfe08 src/org/gfxtest/testsuites/PrintTestBitBlt.java --- a/src/org/gfxtest/testsuites/PrintTestBitBlt.java Mon Sep 10 09:34:44 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBlt.java Tue Sep 11 14:43:25 2012 +0200 @@ -49,6 +49,8 @@ import org.gfxtest.framework.PrintTest; import org.gfxtest.framework.TestImage; import org.gfxtest.framework.TestResult; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; import org.gfxtest.framework.annotations.GraphicsPrimitives; import org.gfxtest.framework.annotations.RenderStyle; @@ -70,6 +72,7 @@ @TestType(TestTypes.PRINT_TEST) @GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) @RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.BITBLT) @Transformation(Transformations.NONE) @Zoom(1) public class PrintTestBitBlt extends PrintTest From bugzilla-daemon at icedtea.classpath.org Tue Sep 11 06:46:22 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Sep 2012 13:46:22 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 mario changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |www.mozilla.org CC| |iyoddle2 at yahoo.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120911/d4626803/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 11 07:16:29 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Sep 2012 14:16:29 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution|--- |FIXED --- Comment #16 from Deepak Bhole --- (In reply to comment #14) > Well, have tryed to use 3GB for hugepages, works -Xms and no log errors(only > with libcups). So what the problem I can't use huge count of memmory? > Archlinux support problem or openjdk or both? > > And i can't remove problem with libcups.so.2 =\ > > Have tryed to update libcups but new archlinux doesn't whant to download > it(can't find in the repositories) You added another comment saying 11GB works.. if 3 works as you mentioned above, I think you can keep it at that (or did it crash with 3?). As for libcups, you need to find where the .so file is located and append LD_LIBRARY_PATH with it. e.g.: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/path/to/dir/where/libcups.so.2/is java -Xmx..... -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120911/35b0b8fb/attachment.html From ptisnovs at icedtea.classpath.org Tue Sep 11 07:59:45 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 11 Sep 2012 14:59:45 +0000 Subject: /hg/rhino-tests: Added new test case src/org/RhinoTests/Invocabl... Message-ID: changeset 1909ce4c5896 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=1909ce4c5896 author: Pavel Tisnovsky date: Tue Sep 11 17:02:20 2012 +0200 Added new test case src/org/RhinoTests/InvocableClassTest.java with 20 tests. diffstat: ChangeLog | 7 + Makefile | 2 + src/org/RhinoTests/InvocableClassTest.java | 347 +++++++++++++++++++++++++++++ 3 files changed, 356 insertions(+), 0 deletions(-) diffs (384 lines): diff -r d649db1c7d07 -r 1909ce4c5896 ChangeLog --- a/ChangeLog Mon Sep 10 10:31:55 2012 +0200 +++ b/ChangeLog Tue Sep 11 17:02:20 2012 +0200 @@ -1,3 +1,10 @@ +2012-09-11 Pavel Tisnovsky + + * src/org/RhinoTests/InvocableClassTest.java: + Added new test case with 20 tests. + * Makefile: + Added new class to compile and new test to run. + 2012-09-10 Pavel Tisnovsky * src/org/RhinoTests/CompiledScriptTest.java: diff -r d649db1c7d07 -r 1909ce4c5896 Makefile --- a/Makefile Mon Sep 10 10:31:55 2012 +0200 +++ b/Makefile Tue Sep 11 17:02:20 2012 +0200 @@ -62,6 +62,7 @@ CompiledScriptTest \ CompiledScriptClassTest \ InvocableTest \ + InvocableClassTest \ ScriptContextTest \ ScriptContextClassTest \ ScriptExceptionTest \ @@ -90,6 +91,7 @@ $(BUILD_DIR)/$(TEST_PACKAGE)/CompiledScriptTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompiledScriptClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/InvocableTest.class \ + $(BUILD_DIR)/$(TEST_PACKAGE)/InvocableClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/JavaScriptsTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptContextTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptContextClassTest.class \ diff -r d649db1c7d07 -r 1909ce4c5896 src/org/RhinoTests/InvocableClassTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/InvocableClassTest.java Tue Sep 11 17:02:20 2012 +0200 @@ -0,0 +1,347 @@ +/* + Rhino test framework + + Copyright (C) 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.RhinoTests; + +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import javax.script.Invocable; +import javax.script.ScriptEngineManager; +import javax.script.ScriptEngine; + + + +/** + * Set of tests which check the API of Invocable interface using + * Java reflection API. + * + * @author Pavel Tisnovsky + */ +public class InvocableClassTest extends BaseRhinoTest { + + /** + * Object that represents the type of Invocable. + */ + Class invocableClass = null; + + @Override + protected void setUp(String[] args) { + // setup attribute used by tests + this.invocableClass = Invocable.class; + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Test for method javax.script.Invocable.getClass().isAssignableFrom() + */ + protected void testIsAssignableFrom() { + assertTrue(this.invocableClass.isAssignableFrom(Invocable.class), + "Method Invocable.getClass().isAssignableFrom() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isInstance() + */ + protected void testIsInstance() { + assertTrue(this.invocableClass.isInstance((Invocable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))), + "Method Invocable.getClass().isInstance() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isInterface() + */ + protected void testIsInterface() { + assertTrue(this.invocableClass.isInterface(), + "Method Invocable.getClass().isInterface() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isLocalClass() + */ + protected void testIsLocalClass() { + assertFalse(this.invocableClass.isLocalClass(), + "Method Invocable.getClass().isLocalClass() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isMemberClass() + */ + protected void testIsMemberClass() { + assertFalse(this.invocableClass.isMemberClass(), + "Method Invocable.getClass().isMemberClass() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isPrimitive() + */ + protected void testIsPrimitive() { + assertFalse(this.invocableClass.isPrimitive(), + "Method Invocable.getClass().isPrimitive() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().isSynthetic() + */ + protected void testIsSynthetic() { + assertFalse(this.invocableClass.isSynthetic(), + "Method Invocable.getClass().isSynthetic() returns wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().getInterfaces() + */ + protected void testGetInterfaces() { + List interfaces = Arrays.asList(this.invocableClass.getInterfaces()); + assertTrue(interfaces.isEmpty(), + "list of implemented interfaces should be empty"); + } + + /** + * Test for method javax.script.Invocable.getClass().getModifiers() + */ + protected void testGetModifiers() { + int modifiers = this.invocableClass.getModifiers(); + assertTrue(Modifier.isPublic(modifiers), + "Method Invocable.getClass().getModifiers() - isPublic modifier is set to a wrong value"); + assertFalse(Modifier.isPrivate(modifiers), + "Method Invocable.getClass().getModifiers() - isPrivate modifier is set to a wrong value"); + assertFalse(Modifier.isProtected(modifiers), + "Method Invocable.getClass().getModifiers() - isProtected modifier is set to a wrong value"); + assertTrue(Modifier.isAbstract(modifiers), + "Method Invocable.getClass().getModifiers() - isAbstract modifier is set to a wrong value"); + assertFalse(Modifier.isFinal(modifiers), + "Method Invocable.getClass().getModifiers() - isFinal modifier is set to a wrong value"); + assertTrue(Modifier.isInterface(modifiers), + "Method Invocable.getClass().getModifiers() - isInterface modifier is set to a wrong value"); + assertFalse(Modifier.isNative(modifiers), + "Method Invocable.getClass().getModifiers() - isNative modifier is set to a wrong value"); + assertFalse(Modifier.isStatic(modifiers), + "Method Invocable.getClass().getModifiers() - isStatic modifier is set to a wrong value"); + assertFalse(Modifier.isStrict(modifiers), + "Method Invocable.getClass().getModifiers() - isStrict modifier is set to a wrong value"); + assertFalse(Modifier.isSynchronized(modifiers), + "Method Invocable.getClass().getModifiers() - isSynchronized modifier is set to a wrong value"); + assertFalse(Modifier.isTransient(modifiers), + "Method Invocable.getClass().getModifiers() - isTransient modifier is set to a wrong value"); + assertFalse(Modifier.isVolatile(modifiers), + "Method Invocable.getClass().getModifiers() - isVolatile modifier is set to a wrong value"); + } + + /** + * Test for method javax.script.Invocable.getClass().getName() + */ + protected void testGetName() { + String name = this.invocableClass.getName(); + assertEquals(name, "javax.script.Invocable", + "Method Invocable.getClass().getName() returns wrong value " + name); + } + + /** + * Test for method javax.script.Invocable.getClass().getPackage() + */ + protected void testGetPackage() { + Package p = this.invocableClass.getPackage(); + String packageName = p.getName(); + assertEquals(packageName, "javax.script", + "Method Invocable.getClass().getPackage().getName() returns wrong value " + packageName); + } + + /** + * Test for method javax.script.Invocable.getClass().getSimpleName() + */ + protected void testGetSimpleName() { + String simpleName = this.invocableClass.getSimpleName(); + assertEquals(simpleName, "Invocable", + "Method Invocable.getClass().getSimpleName() returns wrong value " + simpleName); + } + + /** + * Test for method javax.script.Invocable.getClass().getSuperclass() + */ + protected void testGetSuperclass() { + Class superClass = this.invocableClass.getSuperclass(); + assertNull(superClass, + "Method Invocable.getClass().getSuperclass() does not return null"); + } + + /** + * Test for method javax.script.Invocable.getClass().getConstructors() + */ + protected void testGetConstructors() { + Constructor[] constructors = this.invocableClass.getConstructors(); + assertEquals(constructors.length, 0, "no constructors should be set"); + } + + /** + * Test for method javax.script.Invocable.getClass().getDeclaredConstructors() + */ + protected void testGetDeclaredConstructors() { + Constructor[] constructors = this.invocableClass.getDeclaredConstructors(); + assertEquals(constructors.length, 0, "no constructors should be set"); + } + + /** + * Test for method javax.script.Invocable.getClass().getFields() + */ + protected void testGetFields() { + // following fields should exists + final String[] fieldsThatShouldExists = { + }; + // get all fields + Field[] fields = this.invocableClass.getFields(); + // and transform the array into a list of field names + List fieldsAsString = new ArrayList(); + for (Field field : fields) { + fieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(fieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Invocable.getClass().getDeclaredFields() + */ + protected void testGetDeclaredFields() { + // following fields should be declared + final String[] fieldsThatShouldExists = { + }; + // get all declared fields + Field[] declaredFields = this.invocableClass.getDeclaredFields(); + // and transform the array into a list of field names + List declaredFieldsAsString = new ArrayList(); + for (Field field : declaredFields) { + declaredFieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(declaredFieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Invocable.getClass().getMethods() + */ + protected void testGetMethods() { + // following methods should be inherited + final String[] methodsThatShouldExists = { + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + }; + // get all inherited methods + Method[] methods = this.invocableClass.getMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : methods) { + methodsAsString.add(method.toString()); + } + // check if all required methods really exists + for (String methodThatShouldExists : methodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Invocable.getClass().getDeclaredMethods() + */ + protected void testGetDeclaredMethods() { + // following methods should be declared + final String[] declaredMethodsThatShouldExists = { + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.getInterface(java.lang.Object,java.lang.Class)", + "public abstract java.lang.Object javax.script.Invocable.invokeFunction(java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + "public abstract java.lang.Object javax.script.Invocable.invokeMethod(java.lang.Object,java.lang.String,java.lang.Object[]) throws javax.script.ScriptException,java.lang.NoSuchMethodException", + }; + // get all declared methods + Method[] declaredMethods = this.invocableClass.getDeclaredMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : declaredMethods) { + methodsAsString.add(method.toString()); + } + // check if all required methods really exists + for (String methodThatShouldExists : declaredMethodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "declared method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for instanceof operator applied to a class javax.script.Invocable + */ + protected void testInstanceOf() { + // tested object + Object o = (Invocable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript)); + + // basic check of instanceof operator + assertTrue(o instanceof Invocable, "instanceof Invocable is wrongly evaluated to false"); + + // check operator instanceof against all superclasses + assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); + } + + /** + * Entry point to this test case. + * + * @param args parameters passed from command line + */ + public static void main(String[] args) { + new InvocableClassTest().doTests(args); + } +} + From bugzilla-daemon at icedtea.classpath.org Tue Sep 11 09:56:11 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Sep 2012 16:56:11 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #17 from tstmsc at ya.ru --- libcups.so.2 no such file on the machine =\ -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120911/be59ec8d/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 11 10:01:38 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 11 Sep 2012 17:01:38 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #18 from Deepak Bhole --- Sorry, I don't know enough about Arch Linux to say what the issue is :/ You can try manually installing from here: http://www.archlinux.org/packages/extra/x86_64/libcups/ Otherwise you will have to bring it up on an ArchLinux forum. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120911/a7c5ff2f/attachment.html From omajid at redhat.com Tue Sep 11 11:46:22 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 11 Sep 2012 14:46:22 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 In-Reply-To: <20120907213331.GE7118@redhat.com> References: <20120907213331.GE7118@redhat.com> Message-ID: <504F86FE.9050803@redhat.com> On 09/07/2012 05:33 PM, Deepak Bhole wrote: > Hi, > > This patch fixes PR1161: > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 > > As specified there, the issue is that Java 7 changed what parent class > a trust manager needs to implement in order to correctly intercept > issues such as CN mismatch. As a result, icedtea-web currently cannot > load sites whose certificate has a CN mismatch (proprietary tools work > fine in such cases). > > Attached patch adds support for Java 7 while maintaining compatibility > with Java 6 (loading one trust manager for 6 and a different one for 7+). > > I would like to see this backported to 1.3 as well given its importance, but we > can let it bake in HEAD for a couple of weeks. If I may make a request, when you are pushing this, could you push this as two changesets? One that deals with the JDK version problems and the other that changes the check for hostname (this patch includes both but mixes them). > OK for HEAD? > > ChangeLog: > 2012-09-07 Deepak Bhole > > PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 > * Makefile.am: If building with JDK 6, don't build > VariableX509TrustManagerJDK7. > * NEWS: Updated. > * acinclude.m4: In addition to setting VERSION_DEFS, also set HAVE_JAVA7 > if building with JDK7. > * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Use new > getSSLSocketTrustManager() method to get the trust manager. > (getSSLSocketTrustManager): New method. Depending on runtime JRE version, > returns the appropriate trust manager. > * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Removed > unused tm variable. > * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java: No > longer extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager. > (checkClientTrusted): Renamed to checkTrustClient and removed overloaded > implementations. > (checkServerTrusted): Renamed to checkTrustServer. Also, modified to > accept socket and engine (may be null). Assume that CN is mismatched by > default, rather than matched. If explicitly trusted, bypass other checks, > including CN mismatch. > (checkAllManagers): Modified to accept socket and engine. Modified to work > for both JDK6 and JDK7. > (getAcceptedIssuers): Make protected (called by others in package). > * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: > New class -- X509TrustManager for JDK6. > * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java: > New class -- X509TrustManager for JDK7. > > Thanks, > Deepak > > > PR1161.patch > > > diff -r 0db02eca94bf Makefile.am > --- a/Makefile.am Fri Sep 07 13:52:23 2012 +0200 > +++ b/Makefile.am Fri Sep 07 17:28:56 2012 -0400 > @@ -348,6 +348,9 @@ > if !WITH_RHINO > sed -i '/RhinoBasedPacEvaluator/ d' $@ > endif > +if !HAVE_JAVA7 > + sed -i '/VariableX509TrustManagerJDK7/ d' $@ > +endif > > stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp > mkdir -p $(NETX_DIR) > diff -r 0db02eca94bf NEWS > --- a/NEWS Fri Sep 07 13:52:23 2012 +0200 > +++ b/NEWS Fri Sep 07 17:28:56 2012 -0400 > @@ -17,6 +17,7 @@ > * Common > - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered > - PR955: regression: SweetHome3D fails to run > + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 > > New in release 1.3 (2012-XX-XX): > * NetX > diff -r 0db02eca94bf acinclude.m4 > --- a/acinclude.m4 Fri Sep 07 13:52:23 2012 +0200 > +++ b/acinclude.m4 Fri Sep 07 17:28:56 2012 -0400 > @@ -714,10 +714,13 @@ > fi > AC_MSG_RESULT(${JAVA}) > AC_SUBST(JAVA) > - JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` > - case "${JAVA_VERSION}" in > - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; > - esac > + JAVA_VERSION=`$JAVA -version 2>&1 | sed -n -e '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` We should try and make this regex readable at some point :) > + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` > + if ! test -z "$HAVE_JAVA7" ; then > + VERSION_DEFS='-DHAVE_JAVA7' > + fi > + > + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) > AC_SUBST(VERSION_DEFS) > ]) > > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 13:52:23 2012 +0200 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 17:28:56 2012 -0400 > @@ -248,6 +269,42 @@ > } > > /** > + * Returns a TrustManager ideal for the running VM. > + * > + * @return TrustManager the trust manager to use for verifying https certificates > + */ Some indention seems to be off here. > + private static TrustManager getSSLSocketTrustManager() throws > + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { > + > + try { > + > + Class trustManagerClass; > + Constructor tmCtor = null; Perhaps it might be better to use X509TrustManager as the type argument to make thing clearer? You can chain it like Class.forName().asSubClass(X509TrustManager.class) to make the code more explicit. > + > + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); > + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); > + } > + > + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); > + tmCtor = tmCtors[0]; > + > + for (Constructor ctor : tmCtors) { > + if (tmCtor.getGenericParameterTypes().length == 0) { > + tmCtor = ctor; > + break; > + } > + } > + > + return (TrustManager) tmCtor.newInstance(); > + } catch (RuntimeException e) { > + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); Is it worth i18n'ing this message? Also, would it be better to print the "compiled with wrong jdk" message (which really indicates that the wanted class is not found") in the place where we do the jdk check? > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java > --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 13:52:23 2012 +0200 > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:28:56 2012 -0400 > /** > - * Check if the server is trusted > + * Check if the server is trusted. > * > * @param chain The cert chain > * @param authType The auth type algorithm > - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission > + * @param hostName The expected hostName that the server should have > + * @param socket The SSLSocket in use (may be null) > + * @param ending The SSLEngine in use (may be null) > */ > - public synchronized void checkServerTrusted(X509Certificate[] chain, > + public synchronized void checkTrustServer(X509Certificate[] chain, > String authType, String hostName, > - boolean checkOnly) throws CertificateException { > + SSLSocket socket, SSLEngine engine) throws CertificateException { > CertificateException ce = null; > boolean trusted = true; > - boolean CNMatched = true; > + boolean CNMatched = false; > > try { > - checkAllManagers(chain, authType); > + checkAllManagers(chain, authType, socket, engine); > } catch (CertificateException e) { > trusted = false; > ce = e; > @@ -226,59 +214,92 @@ > // If the certificate is not explicitly trusted, we > // need to prompt the user > if (!isExplicitlyTrusted(chain, authType)) { > - > - if (hostName == null) { > - CNMatched = false; > - } else { > + if (hostName != null) { > try { > HostnameChecker checker = HostnameChecker > .getInstance(HostnameChecker.TYPE_TLS); > > - checker.match(hostName, chain[0]); // only need to match @ 0 for > - // CN > + checker.match(hostName, chain[0]); // only need to match @ 0 for CN > > + CNMatched = true; > } catch (CertificateException e) { > - CNMatched = false; > ce = e; > } > } > + } else { > + // Else it is explicitly trusted. Return here. > + return; > } I don't like this else block: if the code below ever adds more checks, they will be skipped. Why not let the code below handle this? > > if (!trusted || !CNMatched) { > - if (checkOnly) { > - throw ce; > - } else { > - if (!isTemporarilyUntrusted(chain[0])) { > - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); > + if (!isTemporarilyUntrusted(chain[0])) { > + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); > > - if (b) { > - temporarilyTrust(chain[0]); > - } else { > - temporarilyUntrust(chain[0]); > - } > + if (b) { > + temporarilyTrust(chain[0]); > + return; > + } else { > + temporarilyUntrust(chain[0]); > } > + } > > - checkAllManagers(chain, authType); > - } > + throw ce; > } > } > > /** > - * Check system, user and custom trust manager > + * Check system, user and custom trust manager. > + * > + * This method is intended to work with both, JRE6 and JRE7. If socket > + * and engine are null, it assumes that the call is for JRE6 (i.e. not > + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If > + * either of those are not null, it will assume that the caTrustManagers > + * are javax.net.ssl.X509ExtendedTrustManager instances and will > + * invoke their check methods. > + * > + * @param chain The certificate chain > + * @param authType The authentication type > + * @param socket the SSLSocket being used for the connection > + * @param engine the SSLEngine being used for the connection > */ > - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { > + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { > + > // first try CA TrustManagers > boolean trusted = false; > ValidatorException savedException = null; > for (int i = 0; i < caTrustManagers.length; i++) { > try { > - caTrustManagers[i].checkServerTrusted(chain, authType); > + if (socket == null && engine == null) { > + caTrustManagers[i].checkServerTrusted(chain, authType); > + } else { > + > + try { > + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); > + if (engine == null) { > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); > + } else { > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); > + } > + } catch (NoSuchMethodException nsme) { > + throw new ValidatorException(nsme.getMessage()); > + } catch (InvocationTargetException ite) { > + throw new ValidatorException(ite.getMessage()); > + } catch (IllegalAccessException iae) { > + throw new ValidatorException(iae.getMessage()); > + } catch (ClassNotFoundException cnfe) { > + throw new ValidatorException(cnfe.getMessage()); > + } > + } > + Since this is not common code, why not put it in the JDK6/7 specific class? > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Fri Sep 07 17:28:56 2012 -0400 > @@ -0,0 +1,38 @@ > +package net.sourceforge.jnlp.security; Missing license header. > +import java.security.cert.CertificateException; > +import java.security.cert.X509Certificate; > + > +import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; > + > +public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { > + > + VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); Could you make this private? I don't think package-private is a problem, but just to be safe. > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java Fri Sep 07 17:28:56 2012 -0400 > @@ -0,0 +1,122 @@ > +package net.sourceforge.jnlp.security; Missing license header. > +public class VariableX509TrustManagerJDK7 extends X509ExtendedTrustManager { > + > + VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); Please make this private too. > + /** > + * Check if the server is trusted > + * > + * @param chain The cert chain > + * @param authType The auth type algorithm > + * @param socket the SSLSocket, if provided > + * @param engine the SSLEngine, if provided > + */ s/if provided/may be null/ ? > + private void checkTrustServer(X509Certificate[] chain, > + String authType, Socket socket, > + SSLEngine engine) throws CertificateException { > + > + String hostName = null; > + > + if (socket != null) { > + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); > + } else if (engine != null) { > + hostName = engine.getHandshakeSession().getPeerHost(); > + } > + > + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); > + } > + > + /** > + * Check if the server is trusted /me looks at method name > + * @param chain The cert chain > + * @param authType The auth type algorithm > + * @param socket the SSLSocket, if provided > + * @param engine the SSLEngine, if provided > + */ > + private void checkTrustClient(X509Certificate[] chain, > + String authType, Socket socket, > + SSLEngine engine) throws CertificateException { > + > + String hostName = null; > + > + try { > + if (socket != null) { > + Method mgetHandshakeSession = SSLSocket.class.getDeclaredMethod("getHandshakeSession"); > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(socket); > + > + if (session == null) { > + throw new CertificateException("No handshake session"); > + } > + > + hostName = session.getPeerHost(); > + } else if (engine != null) { > + Method mgetHandshakeSession = SSLEngine.class.getDeclaredMethod("getHandshakeSession"); > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(engine); > + > + if (session == null) { > + throw new CertificateException("No handshake session"); > + } > + > + hostName = session.getPeerHost(); > + } I don't see why we are using reflection here. Could you explain? > + } catch (NoSuchMethodException nsme) { > + // Do nothing. hostName will be null > + } catch (InvocationTargetException ite) { > + //Do nothing. hostName will be null > + } catch (IllegalAccessException iae) { > + //Do nothing. hostName will be null > + } > + > + vX509TM.checkTrustClient(chain, authType, hostName); > + } > +} > Thanks, Omair From dbhole at redhat.com Tue Sep 11 13:53:05 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 11 Sep 2012 16:53:05 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 In-Reply-To: <504F86FE.9050803@redhat.com> References: <20120907213331.GE7118@redhat.com> <504F86FE.9050803@redhat.com> Message-ID: <20120911205305.GH6575@redhat.com> * Omair Majid [2012-09-11 14:48]: > On 09/07/2012 05:33 PM, Deepak Bhole wrote: > > Hi, > > > > This patch fixes PR1161: > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 > > > > As specified there, the issue is that Java 7 changed what parent class > > a trust manager needs to implement in order to correctly intercept > > issues such as CN mismatch. As a result, icedtea-web currently cannot > > load sites whose certificate has a CN mismatch (proprietary tools work > > fine in such cases). > > > > Attached patch adds support for Java 7 while maintaining compatibility > > with Java 6 (loading one trust manager for 6 and a different one for 7+). > > > > I would like to see this backported to 1.3 as well given its importance, but we > > can let it bake in HEAD for a couple of weeks. > > If I may make a request, when you are pushing this, could you push this > as two changesets? One that deals with the JDK version problems and the > other that changes the check for hostname (this patch includes both but > mixes them). > Sorry can you elaborate a bit on what you mean by that? Which are the JDK version problems that you are referring to? Just the autotools file changes? .. .. > > AC_MSG_RESULT(${JAVA}) > > AC_SUBST(JAVA) > > - JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` > > - case "${JAVA_VERSION}" in > > - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; > > - esac > > + JAVA_VERSION=`$JAVA -version 2>&1 | sed -n -e '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` > > We should try and make this regex readable at some point :) > Ah, I agree. I don't think even I fully understand it which is why I kept it as is :) [Just noticed that I had an extra -e there to sed. While it makes no difference, I have reverted it] ... > > > @@ -248,6 +269,42 @@ > > } > > > > /** > > + * Returns a TrustManager ideal for the running VM. > > + * > > + * @return TrustManager the trust manager to use for verifying https certificates > > + */ > > Some indention seems to be off here. > Looks fine to me. Are you seeing tabs instead of spaces somewhere? > > + private static TrustManager getSSLSocketTrustManager() throws > > + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { > > + > > + try { > > + > > + Class trustManagerClass; > > + Constructor tmCtor = null; > > Perhaps it might be better to use X509TrustManager as the type argument > to make thing clearer? You can chain it like > Class.forName().asSubClass(X509TrustManager.class) to make the code more > explicit. > > > + > > + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 > > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); > > + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) > > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); > > + } > > + > > + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); > > + tmCtor = tmCtors[0]; > > + > > + for (Constructor ctor : tmCtors) { > > + if (tmCtor.getGenericParameterTypes().length == 0) { > > + tmCtor = ctor; > > + break; > > + } > > + } > > + > > + return (TrustManager) tmCtor.newInstance(); > > + } catch (RuntimeException e) { > > + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); > > Is it worth i18n'ing this message? > I thought about it but is not really a message the user can do much about anyway, it is more of a reference for developers as to what is going on. I can switch if you prefer though. > Also, would it be better to print the "compiled with wrong jdk" message > (which really indicates that the wanted class is not found") in the > place where we do the jdk check? > I think this is a better spot because not all applets will be loaded via https so this code will not always run and thus if we forcibly do a check elsewhere, we may be preventing initialization when there is no reason to. > > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java > > --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 13:52:23 2012 +0200 > > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:28:56 2012 -0400 > > /** > > - * Check if the server is trusted > > + * Check if the server is trusted. > > * > > * @param chain The cert chain > > * @param authType The auth type algorithm > > - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission > > + * @param hostName The expected hostName that the server should have > > + * @param socket The SSLSocket in use (may be null) > > + * @param ending The SSLEngine in use (may be null) > > */ > > - public synchronized void checkServerTrusted(X509Certificate[] chain, > > + public synchronized void checkTrustServer(X509Certificate[] chain, > > String authType, String hostName, > > - boolean checkOnly) throws CertificateException { > > + SSLSocket socket, SSLEngine engine) throws CertificateException { > > CertificateException ce = null; > > boolean trusted = true; > > - boolean CNMatched = true; > > + boolean CNMatched = false; > > > > try { > > - checkAllManagers(chain, authType); > > + checkAllManagers(chain, authType, socket, engine); > > } catch (CertificateException e) { > > trusted = false; > > ce = e; > > @@ -226,59 +214,92 @@ > > // If the certificate is not explicitly trusted, we > > // need to prompt the user > > if (!isExplicitlyTrusted(chain, authType)) { > > - > > - if (hostName == null) { > > - CNMatched = false; > > - } else { > > + if (hostName != null) { > > try { > > HostnameChecker checker = HostnameChecker > > .getInstance(HostnameChecker.TYPE_TLS); > > > > - checker.match(hostName, chain[0]); // only need to match @ 0 for > > - // CN > > + checker.match(hostName, chain[0]); // only need to match @ 0 for CN > > > > + CNMatched = true; > > } catch (CertificateException e) { > > - CNMatched = false; > > ce = e; > > } > > } > > + } else { > > + // Else it is explicitly trusted. Return here. > > + return; > > } > > I don't like this else block: if the code below ever adds more checks, > they will be skipped. Why not let the code below handle this? > If we let it fall down to the code below, the CN will always mismatch (even when cert is always trusted) and we will always end up showing a prompt. The Oracle plug-in does not pop up a warning once a cert is always trusted (even if underlying host changes). Not sure how secure that is, but then we don't store cert and host info so we cannot "always trust" for a specific host. > > // first try CA TrustManagers > > boolean trusted = false; > > ValidatorException savedException = null; > > for (int i = 0; i < caTrustManagers.length; i++) { > > try { > > - caTrustManagers[i].checkServerTrusted(chain, authType); > > + if (socket == null && engine == null) { > > + caTrustManagers[i].checkServerTrusted(chain, authType); > > + } else { > > + > > + try { > > + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); > > + if (engine == null) { > > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); > > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); > > + } else { > > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); > > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); > > + } > > + } catch (NoSuchMethodException nsme) { > > + throw new ValidatorException(nsme.getMessage()); > > + } catch (InvocationTargetException ite) { > > + throw new ValidatorException(ite.getMessage()); > > + } catch (IllegalAccessException iae) { > > + throw new ValidatorException(iae.getMessage()); > > + } catch (ClassNotFoundException cnfe) { > > + throw new ValidatorException(cnfe.getMessage()); > > + } > > + } > > + > > Since this is not common code, why not put it in the JDK6/7 specific class? > Not sure I understand -- the loop and initial checkServerTrusted() call are common. > > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Fri Sep 07 17:28:56 2012 -0400 > > @@ -0,0 +1,38 @@ > > +package net.sourceforge.jnlp.security; > > Missing license header. > Doh, will add it to both. > > +import java.security.cert.CertificateException; > > +import java.security.cert.X509Certificate; > > + > > +import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; > > + > > +public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { > > + > > + VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); > > Could you make this private? I don't think package-private is a problem, > but just to be safe. > Sure. > > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java Fri Sep 07 17:28:56 2012 -0400 > > @@ -0,0 +1,122 @@ > > +package net.sourceforge.jnlp.security; > > Missing license header. > Will add. > > +public class VariableX509TrustManagerJDK7 extends X509ExtendedTrustManager { > > + > > + VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); > > Please make this private too. > Yep, will do. > > + /** > > + * Check if the server is trusted > > + * > > + * @param chain The cert chain > > + * @param authType The auth type algorithm > > + * @param socket the SSLSocket, if provided > > + * @param engine the SSLEngine, if provided > > + */ > > s/if provided/may be null/ ? > Ah, good catch. if provides would imply variadic method. Thanks, will change. > > + private void checkTrustServer(X509Certificate[] chain, > > + String authType, Socket socket, > > + SSLEngine engine) throws CertificateException { > > + > > + String hostName = null; > > + > > + if (socket != null) { > > + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); > > + } else if (engine != null) { > > + hostName = engine.getHandshakeSession().getPeerHost(); > > + } > > + > > + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); > > + } > > + > > + /** > > + * Check if the server is trusted > > /me looks at method name > Intentional. check[Server|Client]Trusted are overridden whereas checkTrust* methods are helpers. > > + * @param chain The cert chain > > + * @param authType The auth type algorithm > > + * @param socket the SSLSocket, if provided > > + * @param engine the SSLEngine, if provided > > + */ > > + private void checkTrustClient(X509Certificate[] chain, > > + String authType, Socket socket, > > + SSLEngine engine) throws CertificateException { > > + > > + String hostName = null; > > + > > + try { > > + if (socket != null) { > > + Method mgetHandshakeSession = SSLSocket.class.getDeclaredMethod("getHandshakeSession"); > > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(socket); > > + > > + if (session == null) { > > + throw new CertificateException("No handshake session"); > > + } > > + > > + hostName = session.getPeerHost(); > > + } else if (engine != null) { > > + Method mgetHandshakeSession = SSLEngine.class.getDeclaredMethod("getHandshakeSession"); > > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(engine); > > + > > + if (session == null) { > > + throw new CertificateException("No handshake session"); > > + } > > + > > + hostName = session.getPeerHost(); > > + } > > I don't see why we are using reflection here. Could you explain? > getHandshakeSession() is new in 1.7 so it will not compile with 1.6 without reflection (both socket and engine will never be null for Java 6 so the above code will only be entered with 7). Thanks for the detailed review! New iteration of patch attached. Cheers, Deepak -------------- next part -------------- diff -r 0db02eca94bf Makefile.am --- a/Makefile.am Fri Sep 07 13:52:23 2012 +0200 +++ b/Makefile.am Tue Sep 11 16:49:58 2012 -0400 @@ -348,6 +348,9 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif +if !HAVE_JAVA7 + sed -i '/VariableX509TrustManagerJDK7/ d' $@ +endif stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) diff -r 0db02eca94bf NEWS --- a/NEWS Fri Sep 07 13:52:23 2012 +0200 +++ b/NEWS Tue Sep 11 16:49:58 2012 -0400 @@ -17,6 +17,7 @@ * Common - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered - PR955: regression: SweetHome3D fails to run + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.3 (2012-XX-XX): * NetX diff -r 0db02eca94bf acinclude.m4 --- a/acinclude.m4 Fri Sep 07 13:52:23 2012 +0200 +++ b/acinclude.m4 Tue Sep 11 16:49:58 2012 -0400 @@ -715,9 +715,12 @@ AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` - case "${JAVA_VERSION}" in - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; - esac + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` + if ! test -z "$HAVE_JAVA7" ; then + VERSION_DEFS='-DHAVE_JAVA7' + fi + + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) AC_SUBST(VERSION_DEFS) ]) diff -r 0db02eca94bf netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 13:52:23 2012 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Tue Sep 11 16:49:58 2012 -0400 @@ -16,38 +16,59 @@ package net.sourceforge.jnlp.runtime; -import java.io.*; +import java.awt.EventQueue; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.net.Authenticator; import java.net.ProxySelector; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; -import java.awt.*; -import java.text.*; -import java.util.*; +import java.security.AllPermission; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.List; -import java.security.*; -import javax.jnlp.*; +import java.util.ResourceBundle; + +import javax.jnlp.ServiceManager; import javax.naming.ConfigurationException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.swing.UIManager; import javax.swing.text.html.parser.ParserDelegator; -import sun.net.www.protocol.jar.URLJarFile; - -import net.sourceforge.jnlp.*; +import net.sourceforge.jnlp.DefaultLaunchHandler; +import net.sourceforge.jnlp.GuiLaunchHandler; +import net.sourceforge.jnlp.LaunchHandler; +import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.browser.BrowserAwareProxySelector; -import net.sourceforge.jnlp.cache.*; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.DefaultDownloadIndicator; +import net.sourceforge.jnlp.cache.DownloadIndicator; +import net.sourceforge.jnlp.cache.UpdatePolicy; import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.security.JNLPAuthenticator; import net.sourceforge.jnlp.security.KeyStores; import net.sourceforge.jnlp.security.SecurityDialogMessageHandler; import net.sourceforge.jnlp.security.VariableX509TrustManager; -import net.sourceforge.jnlp.services.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.services.XServiceManagerStub; +import net.sourceforge.jnlp.util.FileUtils; +import net.sourceforge.jnlp.util.TeeOutputStream; +import sun.net.www.protocol.jar.URLJarFile; /** * Configure and access the runtime environment. This class @@ -223,7 +244,7 @@ KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, KeyStores.getPassword()); - TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() }; + TrustManager[] trust = new TrustManager[] { getSSLSocketTrustManager() }; context.init(kmf.getKeyManagers(), trust, null); sslSocketFactory = context.getSocketFactory(); @@ -248,6 +269,42 @@ } /** + * Returns a TrustManager ideal for the running VM. + * + * @return TrustManager the trust manager to use for verifying https certificates + */ + private static TrustManager getSSLSocketTrustManager() throws + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { + + try { + + Class trustManagerClass; + Constructor tmCtor = null; + + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + } + + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); + tmCtor = tmCtors[0]; + + for (Constructor ctor : tmCtors) { + if (tmCtor.getGenericParameterTypes().length == 0) { + tmCtor = ctor; + break; + } + } + + return (TrustManager) tmCtor.newInstance(); + } catch (RuntimeException e) { + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); + throw e; + } + } + + /** * This must NOT be called form the application ThreadGroup. An application * can inject events into its {@link EventQueue} and bypass the security * dialogs. diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Sep 07 13:52:23 2012 +0200 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Sep 11 16:49:58 2012 -0400 @@ -59,7 +59,6 @@ public class HttpsCertVerifier implements CertVerifier { - private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; private String hostName; @@ -67,11 +66,9 @@ private boolean hostMatched; private ArrayList details = new ArrayList(); - public HttpsCertVerifier(VariableX509TrustManager tm, - X509Certificate[] chain, String authType, + public HttpsCertVerifier(X509Certificate[] chain, String authType, boolean isTrusted, boolean hostMatched, String hostName) { - this.tm = tm; this.chain = chain; this.authType = authType; this.hostName = hostName; diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 13:52:23 2012 +0200 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Tue Sep 11 16:49:58 2012 -0400 @@ -37,6 +37,9 @@ package net.sourceforge.jnlp.security; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; import java.security.AccessController; import java.security.KeyStore; import java.security.PrivilegedAction; @@ -47,25 +50,24 @@ import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import sun.security.util.HostnameChecker; import sun.security.validator.ValidatorException; -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; - /** * This class implements an X509 Trust Manager. The certificates it trusts are * "variable", in the sense that it can dynamically, and temporarily support * different certificates that are not in the keystore. */ -final public class VariableX509TrustManager extends X509ExtendedTrustManager { +final public class VariableX509TrustManager { /** TrustManagers containing trusted CAs */ private X509TrustManager[] caTrustManagers = null; @@ -164,8 +166,8 @@ /** * Check if client is trusted (no support for custom here, only system/user) */ - public void checkClientTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) + public void checkTrustClient(X509Certificate[] chain, String authType, + String hostName) throws CertificateException { boolean trusted = false; @@ -186,38 +188,24 @@ throw savedException; } - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) - throws CertificateException { - checkServerTrusted(chain, authType, hostName, false); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkServerTrusted(chain, authType, null, null); - } - /** - * Check if the server is trusted + * Check if the server is trusted. * * @param chain The cert chain * @param authType The auth type algorithm - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission + * @param hostName The expected hostName that the server should have + * @param socket The SSLSocket in use (may be null) + * @param ending The SSLEngine in use (may be null) */ - public synchronized void checkServerTrusted(X509Certificate[] chain, + public synchronized void checkTrustServer(X509Certificate[] chain, String authType, String hostName, - boolean checkOnly) throws CertificateException { + SSLSocket socket, SSLEngine engine) throws CertificateException { CertificateException ce = null; boolean trusted = true; - boolean CNMatched = true; + boolean CNMatched = false; try { - checkAllManagers(chain, authType); + checkAllManagers(chain, authType, socket, engine); } catch (CertificateException e) { trusted = false; ce = e; @@ -226,59 +214,92 @@ // If the certificate is not explicitly trusted, we // need to prompt the user if (!isExplicitlyTrusted(chain, authType)) { - - if (hostName == null) { - CNMatched = false; - } else { + if (hostName != null) { try { HostnameChecker checker = HostnameChecker .getInstance(HostnameChecker.TYPE_TLS); - checker.match(hostName, chain[0]); // only need to match @ 0 for - // CN + checker.match(hostName, chain[0]); // only need to match @ 0 for CN + CNMatched = true; } catch (CertificateException e) { - CNMatched = false; ce = e; } } + } else { + // Else it is trusted + trusted = true; } if (!trusted || !CNMatched) { - if (checkOnly) { - throw ce; - } else { - if (!isTemporarilyUntrusted(chain[0])) { - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); + if (!isTemporarilyUntrusted(chain[0])) { + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); - if (b) { - temporarilyTrust(chain[0]); - } else { - temporarilyUntrust(chain[0]); - } + if (b) { + temporarilyTrust(chain[0]); + return; + } else { + temporarilyUntrust(chain[0]); } + } - checkAllManagers(chain, authType); - } + throw ce; } } /** - * Check system, user and custom trust manager + * Check system, user and custom trust manager. + * + * This method is intended to work with both, JRE6 and JRE7. If socket + * and engine are null, it assumes that the call is for JRE6 (i.e. not + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If + * either of those are not null, it will assume that the caTrustManagers + * are javax.net.ssl.X509ExtendedTrustManager instances and will + * invoke their check methods. + * + * @param chain The certificate chain + * @param authType The authentication type + * @param socket the SSLSocket being used for the connection + * @param engine the SSLEngine being used for the connection */ - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { + // first try CA TrustManagers boolean trusted = false; ValidatorException savedException = null; for (int i = 0; i < caTrustManagers.length; i++) { try { - caTrustManagers[i].checkServerTrusted(chain, authType); + if (socket == null && engine == null) { + caTrustManagers[i].checkServerTrusted(chain, authType); + } else { + + try { + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); + if (engine == null) { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); + } else { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); + } + } catch (NoSuchMethodException nsme) { + throw new ValidatorException(nsme.getMessage()); + } catch (InvocationTargetException ite) { + throw new ValidatorException(ite.getMessage()); + } catch (IllegalAccessException iae) { + throw new ValidatorException(iae.getMessage()); + } catch (ClassNotFoundException cnfe) { + throw new ValidatorException(cnfe.getMessage()); + } + } + trusted = true; break; } catch (ValidatorException caex) { savedException = caex; } } + if (trusted) { return; } @@ -332,7 +353,7 @@ return explicitlyTrusted; } - public X509Certificate[] getAcceptedIssuers() { + protected X509Certificate[] getAcceptedIssuers() { List issuers = new ArrayList(); for (int i = 0; i < caTrustManagers.length; i++) { @@ -394,7 +415,7 @@ public Boolean run() { return SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, null, - new HttpsCertVerifier(trustManager, chain, authType, + new HttpsCertVerifier(chain, authType, isTrusted, hostMatched, hostName)); } diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Tue Sep 11 16:49:58 2012 -0400 @@ -0,0 +1,75 @@ +/* VariableX509TrustManagerJDK6.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { + + private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + checkClientTrusted(chain, authType, null, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, hostname); // We don't need algorithm, we will always use this for TLS only + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + // We don't need to pass algorithm, we will always use this for TLS only + vX509TM.checkTrustServer(chain, authType, hostname, null /* socket */, null /* engine */); + } + +} diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java Tue Sep 11 16:49:58 2012 -0400 @@ -0,0 +1,159 @@ +/* VariableX509TrustManagerJDK7.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK7 extends X509ExtendedTrustManager { + + private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, null /* hostname*/); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustClient(chain, authType, socket, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustServer(chain, authType, socket, null); + + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustClient(chain, authType, null, engine); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustServer(chain, authType, null, engine); + } + + /** + * Check if the server is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, may be null + * @param engine the SSLEngine, may be null + */ + private void checkTrustServer(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + if (socket != null) { + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); + } else if (engine != null) { + hostName = engine.getHandshakeSession().getPeerHost(); + } + + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); + } + + /** + * Check if the server is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, if provided + * @param engine the SSLEngine, if provided + */ + private void checkTrustClient(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + try { + if (socket != null) { + Method mgetHandshakeSession = SSLSocket.class.getDeclaredMethod("getHandshakeSession"); + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(socket); + + if (session == null) { + throw new CertificateException("No handshake session"); + } + + hostName = session.getPeerHost(); + + } else if (engine != null) { + Method mgetHandshakeSession = SSLEngine.class.getDeclaredMethod("getHandshakeSession"); + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(engine); + + if (session == null) { + throw new CertificateException("No handshake session"); + } + + hostName = session.getPeerHost(); + } + } catch (NoSuchMethodException nsme) { + // Do nothing. hostName will be null + } catch (InvocationTargetException ite) { + //Do nothing. hostName will be null + } catch (IllegalAccessException iae) { + //Do nothing. hostName will be null + } + + vX509TM.checkTrustClient(chain, authType, hostName); + } +} From omajid at redhat.com Tue Sep 11 14:33:28 2012 From: omajid at redhat.com (Omair Majid) Date: Tue, 11 Sep 2012 17:33:28 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 In-Reply-To: <20120911205305.GH6575@redhat.com> References: <20120907213331.GE7118@redhat.com> <504F86FE.9050803@redhat.com> <20120911205305.GH6575@redhat.com> Message-ID: <504FAE28.5030407@redhat.com> On 09/11/2012 04:53 PM, Deepak Bhole wrote: > * Omair Majid [2012-09-11 14:48]: >> > On 09/07/2012 05:33 PM, Deepak Bhole wrote: >>> > > Hi, >>> > > >>> > > This patch fixes PR1161: >>> > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 >>> > > >>> > > As specified there, the issue is that Java 7 changed what parent class >>> > > a trust manager needs to implement in order to correctly intercept >>> > > issues such as CN mismatch. As a result, icedtea-web currently cannot >>> > > load sites whose certificate has a CN mismatch (proprietary tools work >>> > > fine in such cases). >>> > > >>> > > Attached patch adds support for Java 7 while maintaining compatibility >>> > > with Java 6 (loading one trust manager for 6 and a different one for 7+). >>> > > >>> > > I would like to see this backported to 1.3 as well given its importance, but we >>> > > can let it bake in HEAD for a couple of weeks. >> > >> > If I may make a request, when you are pushing this, could you push this >> > as two changesets? One that deals with the JDK version problems and the >> > other that changes the check for hostname (this patch includes both but >> > mixes them). >> > > Sorry can you elaborate a bit on what you mean by that? Which are the > JDK version problems that you are referring to? Just the autotools file > changes? Oh, crap. I misread this part of the diff: > - > - if (hostName == null) { > - CNMatched = false; > - } else { > + if (hostName != null) { Without realizing the initial value of CNMatched has been changed too. Please ignore this. > >>> > > AC_MSG_RESULT(${JAVA}) >>> > > AC_SUBST(JAVA) >>> > > - JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` >>> > > - case "${JAVA_VERSION}" in >>> > > - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; >>> > > - esac >>> > > + JAVA_VERSION=`$JAVA -version 2>&1 | sed -n -e '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` >> > >> > We should try and make this regex readable at some point :) >> > > Ah, I agree. I don't think even I fully understand it which is why I > kept it as is :) [Just noticed that I had an extra -e there to sed. > While it makes no difference, I have reverted it] > Thanks. The extra -e was what prompted me to verify this expression and I couldn't get it to work outside the makefile :( > >> > >>> > > @@ -248,6 +269,42 @@ >>> > > } >>> > > >>> > > /** >>> > > + * Returns a TrustManager ideal for the running VM. >>> > > + * >>> > > + * @return TrustManager the trust manager to use for verifying https certificates >>> > > + */ >> > >> > Some indention seems to be off here. >> > > Looks fine to me. Are you seeing tabs instead of spaces somewhere? > I am. * Returns a TrustManager ideal for the running VM. ^ tab in the beginning of this line and other lines in the javadoc comment you have quoted above. The indentation in the method itself seems to be fine. >>> > > + private static TrustManager getSSLSocketTrustManager() throws >>> > > + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { >>> > > + >>> > > + try { >>> > > + >>> > > + Class trustManagerClass; >>> > > + Constructor tmCtor = null; >> > >> > Perhaps it might be better to use X509TrustManager as the type argument >> > to make thing clearer? You can chain it like >> > Class.forName().asSubClass(X509TrustManager.class) to make the code more >> > explicit. >> > >>> > > + >>> > > + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 >>> > > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); >>> > > + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) >>> > > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); >>> > > + } >>> > > + >>> > > + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); >>> > > + tmCtor = tmCtors[0]; >>> > > + >>> > > + for (Constructor ctor : tmCtors) { >>> > > + if (tmCtor.getGenericParameterTypes().length == 0) { >>> > > + tmCtor = ctor; >>> > > + break; >>> > > + } >>> > > + } >>> > > + >>> > > + return (TrustManager) tmCtor.newInstance(); >>> > > + } catch (RuntimeException e) { >>> > > + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); >> > >> > Is it worth i18n'ing this message? >> > > I thought about it but is not really a message the user can do much > about anyway, it is more of a reference for developers as to what is > going on. I can switch if you prefer though. No, that's fine. >> > Also, would it be better to print the "compiled with wrong jdk" message >> > (which really indicates that the wanted class is not found") in the >> > place where we do the jdk check? >> > > I think this is a better spot because not all applets will be loaded via > https so this code will not always run and thus if we forcibly do a > check elsewhere, we may be preventing initialization when there is no > reason to. > I just meant a few lines above. Something like: try { trustManagerClass = Class.forName("... VariableX509TrustManagerJDK6"); } catch (ClassNotFoundException notFound) { System.err.println("class ...TrustManagerJDK6 not found"); } Feel free to ignore this. >>> > > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java >>> > > --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 13:52:23 2012 +0200 >>> > > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:28:56 2012 -0400 >>> > > /** >>> > > - * Check if the server is trusted >>> > > + * Check if the server is trusted. >>> > > * >>> > > * @param chain The cert chain >>> > > * @param authType The auth type algorithm >>> > > - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission >>> > > + * @param hostName The expected hostName that the server should have >>> > > + * @param socket The SSLSocket in use (may be null) >>> > > + * @param ending The SSLEngine in use (may be null) >>> > > */ >>> > > - public synchronized void checkServerTrusted(X509Certificate[] chain, >>> > > + public synchronized void checkTrustServer(X509Certificate[] chain, >>> > > String authType, String hostName, >>> > > - boolean checkOnly) throws CertificateException { >>> > > + SSLSocket socket, SSLEngine engine) throws CertificateException { >>> > > CertificateException ce = null; >>> > > boolean trusted = true; >>> > > - boolean CNMatched = true; >>> > > + boolean CNMatched = false; >>> > > >>> > > try { >>> > > - checkAllManagers(chain, authType); >>> > > + checkAllManagers(chain, authType, socket, engine); >>> > > } catch (CertificateException e) { >>> > > trusted = false; >>> > > ce = e; >>> > > @@ -226,59 +214,92 @@ >>> > > // If the certificate is not explicitly trusted, we >>> > > // need to prompt the user >>> > > if (!isExplicitlyTrusted(chain, authType)) { >>> > > - >>> > > - if (hostName == null) { >>> > > - CNMatched = false; >>> > > - } else { >>> > > + if (hostName != null) { >>> > > try { >>> > > HostnameChecker checker = HostnameChecker >>> > > .getInstance(HostnameChecker.TYPE_TLS); >>> > > >>> > > - checker.match(hostName, chain[0]); // only need to match @ 0 for >>> > > - // CN >>> > > + checker.match(hostName, chain[0]); // only need to match @ 0 for CN >>> > > >>> > > + CNMatched = true; >>> > > } catch (CertificateException e) { >>> > > - CNMatched = false; >>> > > ce = e; >>> > > } >>> > > } >>> > > + } else { >>> > > + // Else it is explicitly trusted. Return here. >>> > > + return; >>> > > } >> > >> > I don't like this else block: if the code below ever adds more checks, >> > they will be skipped. Why not let the code below handle this? >> > > If we let it fall down to the code below, the CN will always mismatch > (even when cert is always trusted) and we will always end up showing a > prompt. > > The Oracle plug-in does not pop up a warning once a cert is always > trusted (even if underlying host changes). Not sure how secure that is, > but then we don't store cert and host info so we cannot "always trust" > for a specific host. > I am not disagreeing with the logic, just pointing out that the code is hard to follow (or maybe just the diff is), what with multiple escape points, multiple nested if statements and throwing exceptions on failure. Anything you can do to make it more linear? >>> > > // first try CA TrustManagers >>> > > boolean trusted = false; >>> > > ValidatorException savedException = null; >>> > > for (int i = 0; i < caTrustManagers.length; i++) { >>> > > try { >>> > > - caTrustManagers[i].checkServerTrusted(chain, authType); >>> > > + if (socket == null && engine == null) { >>> > > + caTrustManagers[i].checkServerTrusted(chain, authType); >>> > > + } else { >>> > > + >>> > > + try { >>> > > + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); >>> > > + if (engine == null) { >>> > > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); >>> > > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); >>> > > + } else { >>> > > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); >>> > > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); >>> > > + } >>> > > + } catch (NoSuchMethodException nsme) { >>> > > + throw new ValidatorException(nsme.getMessage()); >>> > > + } catch (InvocationTargetException ite) { >>> > > + throw new ValidatorException(ite.getMessage()); >>> > > + } catch (IllegalAccessException iae) { >>> > > + throw new ValidatorException(iae.getMessage()); >>> > > + } catch (ClassNotFoundException cnfe) { >>> > > + throw new ValidatorException(cnfe.getMessage()); >>> > > + } >>> > > + } >>> > > + >> > >> > Since this is not common code, why not put it in the JDK6/7 specific class? >> > > Not sure I understand -- the loop and initial checkServerTrusted() call are common. Yeah, they are. Maybe we can avoid this reflective code some other way? Perhaps you can make both JDK-specific TrustManager classes implement a custom interface with a single method: interface ServerCheckerCallback { void isTrusted(TrustManager,X509Certificate[],String,SSLEngine) } Both the JDK-specific classes inject themselves into VariableX509TrustManager using this interface and implement the method to do the invoke the right JDK-version-specific thing. Or do you think this is too complicated? >>> > > + private void checkTrustServer(X509Certificate[] chain, >>> > > + String authType, Socket socket, >>> > > + SSLEngine engine) throws CertificateException { >>> > > + >>> > > + String hostName = null; >>> > > + >>> > > + if (socket != null) { >>> > > + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); >>> > > + } else if (engine != null) { >>> > > + hostName = engine.getHandshakeSession().getPeerHost(); >>> > > + } >>> > > + >>> > > + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); >>> > > + } >>> > > + >>> > > + /** >>> > > + * Check if the server is trusted >> > >> > /me looks at method name >> > > Intentional. check[Server|Client]Trusted are overridden whereas > checkTrust* methods are helpers. > Could you make that distinction more explicit? It's hard to tell how the ordering implies the helper role. Besides, I meant the comment says "server is trusted" and the method name is "checkTrust_Client_". >>> > > + * @param chain The cert chain >>> > > + * @param authType The auth type algorithm >>> > > + * @param socket the SSLSocket, if provided >>> > > + * @param engine the SSLEngine, if provided >>> > > + */ >>> > > + private void checkTrustClient(X509Certificate[] chain, >>> > > + String authType, Socket socket, >>> > > + SSLEngine engine) throws CertificateException { >>> > > + >>> > > + String hostName = null; >>> > > + >>> > > + try { >>> > > + if (socket != null) { >>> > > + Method mgetHandshakeSession = SSLSocket.class.getDeclaredMethod("getHandshakeSession"); >>> > > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(socket); >>> > > + >>> > > + if (session == null) { >>> > > + throw new CertificateException("No handshake session"); >>> > > + } >>> > > + >>> > > + hostName = session.getPeerHost(); >>> > > + } else if (engine != null) { >>> > > + Method mgetHandshakeSession = SSLEngine.class.getDeclaredMethod("getHandshakeSession"); >>> > > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(engine); >>> > > + >>> > > + if (session == null) { >>> > > + throw new CertificateException("No handshake session"); >>> > > + } >>> > > + >>> > > + hostName = session.getPeerHost(); >>> > > + } >> > >> > I don't see why we are using reflection here. Could you explain? >> > > getHandshakeSession() is new in 1.7 so it will not compile with 1.6 > without reflection (both socket and engine will never be null for Java 6 > so the above code will only be entered with 7). But the class is named VariableX509TrustManagerJDK7 and is only built with 7, no? > Thanks for the detailed review! > > New iteration of patch attached. Thanks for addressing my concerns! Omair From ptisnovs at icedtea.classpath.org Wed Sep 12 06:16:33 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 12 Sep 2012 13:16:33 +0000 Subject: /hg/gfx-test: Stubs for five new tests. Message-ID: changeset 30110060e730 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=30110060e730 author: Pavel Tisnovsky date: Wed Sep 12 15:19:10 2012 +0200 Stubs for five new tests. diffstat: ChangeLog | 10 + Makefile | 10 + src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java | 83 ++++++++++++ src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java | 83 ++++++++++++ src/org/gfxtest/testsuites/PrintTestBitBltRotateImage.java | 83 ++++++++++++ src/org/gfxtest/testsuites/PrintTestBitBltScaleImage.java | 83 ++++++++++++ src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java | 84 +++++++++++++ 7 files changed, 436 insertions(+), 0 deletions(-) diffs (480 lines): diff -r ba24a5ebfe08 -r 30110060e730 ChangeLog --- a/ChangeLog Tue Sep 11 14:43:25 2012 +0200 +++ b/ChangeLog Wed Sep 12 15:19:10 2012 +0200 @@ -1,3 +1,13 @@ +2012-09-12 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java: + * src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java: + * src/org/gfxtest/testsuites/PrintTestBitBltRotateImage.java: + * src/org/gfxtest/testsuites/PrintTestBitBltScaleImage.java: + * src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java: + Stubs for new tests. + * Makefile: Added new classes to compile and new tests to run. + 2012-09-11 Pavel Tisnovsky * src/org/gfxtest/framework/annotations/BitBltOperation.java: diff -r ba24a5ebfe08 -r 30110060e730 Makefile --- a/Makefile Tue Sep 11 14:43:25 2012 +0200 +++ b/Makefile Wed Sep 12 15:19:10 2012 +0200 @@ -218,6 +218,11 @@ $(CLASSES)/$(TESTSUITE_DIR)/PrintTestQuadraticCurves.class \ $(CLASSES)/$(TESTSUITE_DIR)/PrintTestQuadraticCurvesAsPaths.class \ $(CLASSES)/$(TESTSUITE_DIR)/PrintTestBitBlt.class \ + $(CLASSES)/$(TESTSUITE_DIR)/PrintTestBitBltCropImage.class \ + $(CLASSES)/$(TESTSUITE_DIR)/PrintTestBitBltMirrorImage.class \ + $(CLASSES)/$(TESTSUITE_DIR)/PrintTestBitBltRotateImage.class \ + $(CLASSES)/$(TESTSUITE_DIR)/PrintTestBitBltScaleImage.class \ + $(CLASSES)/$(TESTSUITE_DIR)/PrintTestBitBltUsingBgColor.class \ $(CLASSES)/$(TESTSUITE_DIR)/PrintTestCircles.class \ $(CLASSES)/$(TESTSUITE_DIR)/PrintTestEllipses.class \ $(CLASSES)/$(TESTSUITE_DIR)/PrintTestDrawText.class \ @@ -311,6 +316,11 @@ $(RESULTS)/PrintTestQuadraticCurvesAsPaths \ $(RESULTS)/PrintTestArcs \ $(RESULTS)/PrintTestBitBlt \ + $(RESULTS)/PrintTestBitBltCropImage \ + $(RESULTS)/PrintTestBitBltMirrorImage \ + $(RESULTS)/PrintTestBitBltRotateImage \ + $(RESULTS)/PrintTestBitBltScaleImage \ + $(RESULTS)/PrintTestBitBltUsingBgColor \ $(RESULTS)/PrintTestCircles \ $(RESULTS)/PrintTestEllipses \ $(RESULTS)/PrintTestDrawText \ diff -r ba24a5ebfe08 -r 30110060e730 src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java Wed Sep 12 15:19:10 2012 +0200 @@ -0,0 +1,83 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.testsuites; + +import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; +import org.gfxtest.framework.annotations.GraphicsPrimitive; +import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.RenderStyle; +import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.TestType; +import org.gfxtest.framework.annotations.TestTypes; +import org.gfxtest.framework.annotations.Transformation; +import org.gfxtest.framework.annotations.Transformations; +import org.gfxtest.framework.annotations.Zoom; + + + +/** + * This test check the rendering of buffered images (so called bit block + * transfers or Bit Blt) created by various constructors. + * + * @author Pavel Tisnovsky + */ + at TestType(TestTypes.PRINT_TEST) + at GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.CROP) + at Transformation(Transformations.NONE) + at Zoom(1) +public class PrintTestBitBltCropImage extends PrintTest +{ + + /** + * Entry point to the test suite. + * + * @param args + * not used in this case + */ + public static void main(String[] args) + { + new PrintTestBitBltCropImage().runTestSuite(args); + } +} diff -r ba24a5ebfe08 -r 30110060e730 src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltMirrorImage.java Wed Sep 12 15:19:10 2012 +0200 @@ -0,0 +1,83 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.testsuites; + +import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; +import org.gfxtest.framework.annotations.GraphicsPrimitive; +import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.RenderStyle; +import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.TestType; +import org.gfxtest.framework.annotations.TestTypes; +import org.gfxtest.framework.annotations.Transformation; +import org.gfxtest.framework.annotations.Transformations; +import org.gfxtest.framework.annotations.Zoom; + + + +/** + * This test check the rendering of buffered images (so called bit block + * transfers or Bit Blt) created by various constructors. + * + * @author Pavel Tisnovsky + */ + at TestType(TestTypes.PRINT_TEST) + at GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.MIRROR) + at Transformation(Transformations.NONE) + at Zoom(1) +public class PrintTestBitBltMirrorImage extends PrintTest +{ + + /** + * Entry point to the test suite. + * + * @param args + * not used in this case + */ + public static void main(String[] args) + { + new PrintTestBitBltMirrorImage().runTestSuite(args); + } +} diff -r ba24a5ebfe08 -r 30110060e730 src/org/gfxtest/testsuites/PrintTestBitBltRotateImage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltRotateImage.java Wed Sep 12 15:19:10 2012 +0200 @@ -0,0 +1,83 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.testsuites; + +import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; +import org.gfxtest.framework.annotations.GraphicsPrimitive; +import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.RenderStyle; +import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.TestType; +import org.gfxtest.framework.annotations.TestTypes; +import org.gfxtest.framework.annotations.Transformation; +import org.gfxtest.framework.annotations.Transformations; +import org.gfxtest.framework.annotations.Zoom; + + + +/** + * This test check the rendering of buffered images (so called bit block + * transfers or Bit Blt) created by various constructors. + * + * @author Pavel Tisnovsky + */ + at TestType(TestTypes.PRINT_TEST) + at GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.ROTATE) + at Transformation(Transformations.NONE) + at Zoom(1) +public class PrintTestBitBltRotateImage extends PrintTest +{ + + /** + * Entry point to the test suite. + * + * @param args + * not used in this case + */ + public static void main(String[] args) + { + new PrintTestBitBltRotateImage().runTestSuite(args); + } +} diff -r ba24a5ebfe08 -r 30110060e730 src/org/gfxtest/testsuites/PrintTestBitBltScaleImage.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltScaleImage.java Wed Sep 12 15:19:10 2012 +0200 @@ -0,0 +1,83 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.testsuites; + +import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; +import org.gfxtest.framework.annotations.GraphicsPrimitive; +import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.RenderStyle; +import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.TestType; +import org.gfxtest.framework.annotations.TestTypes; +import org.gfxtest.framework.annotations.Transformation; +import org.gfxtest.framework.annotations.Transformations; +import org.gfxtest.framework.annotations.Zoom; + + + +/** + * This test check the rendering of buffered images (so called bit block + * transfers or Bit Blt) created by various constructors. + * + * @author Pavel Tisnovsky + */ + at TestType(TestTypes.PRINT_TEST) + at GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.SCALE) + at Transformation(Transformations.NONE) + at Zoom(1) +public class PrintTestBitBltScaleImage extends PrintTest +{ + + /** + * Entry point to the test suite. + * + * @param args + * not used in this case + */ + public static void main(String[] args) + { + new PrintTestBitBltScaleImage().runTestSuite(args); + } +} diff -r ba24a5ebfe08 -r 30110060e730 src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltUsingBgColor.java Wed Sep 12 15:19:10 2012 +0200 @@ -0,0 +1,84 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.gfxtest.testsuites; + +import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.annotations.BitBltOperation; +import org.gfxtest.framework.annotations.BitBltOperations; +import org.gfxtest.framework.annotations.GraphicsPrimitive; +import org.gfxtest.framework.annotations.GraphicsPrimitives; +import org.gfxtest.framework.annotations.RenderStyle; +import org.gfxtest.framework.annotations.RenderStyles; +import org.gfxtest.framework.annotations.TestType; +import org.gfxtest.framework.annotations.TestTypes; +import org.gfxtest.framework.annotations.Transformation; +import org.gfxtest.framework.annotations.Transformations; +import org.gfxtest.framework.annotations.Zoom; + + + +/** + * This test check the rendering of buffered images (so called bit block + * transfers or Bit Blt) created by various constructors. + * + * @author Pavel Tisnovsky + */ + at TestType(TestTypes.PRINT_TEST) + at GraphicsPrimitive(GraphicsPrimitives.COMMON_BITMAP) + at RenderStyle(RenderStyles.NORMAL) + at BitBltOperation(BitBltOperations.BITBLT) + at Transformation(Transformations.NONE) + at Zoom(1) +public class PrintTestBitBltUsingBgColor extends PrintTest +{ + + + /** + * Entry point to the test suite. + * + * @param args + * not used in this case + */ + public static void main(String[] args) + { + new PrintTestBitBltUsingBgColor().runTestSuite(args); + } +} From bugzilla-daemon at icedtea.classpath.org Wed Sep 12 08:06:03 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 12 Sep 2012 15:06:03 +0000 Subject: [Bug 1160] OpenJDK Bug with huge count of memmory and huge pages In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1160 --- Comment #19 from tstmsc at ya.ru --- Ok thx for all, i guess now no problems -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120912/f0050673/attachment.html From ptisnovs at icedtea.classpath.org Thu Sep 13 00:11:20 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 13 Sep 2012 07:11:20 +0000 Subject: /hg/gfx-test: Added various new tests to the test case Message-ID: changeset 26d1f5592d44 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=26d1f5592d44 author: Pavel Tisnovsky date: Thu Sep 13 09:13:56 2012 +0200 Added various new tests to the test case src/org/gfxtest/testsuites/PrintTestBitBlt.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestBitBlt.java | 163 ++++++++++++++++++++++++ 2 files changed, 168 insertions(+), 0 deletions(-) diffs (185 lines): diff -r 30110060e730 -r 26d1f5592d44 ChangeLog --- a/ChangeLog Wed Sep 12 15:19:10 2012 +0200 +++ b/ChangeLog Thu Sep 13 09:13:56 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-13 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBlt.java: + Added various new tests to this test case. + 2012-09-12 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java: diff -r 30110060e730 -r 26d1f5592d44 src/org/gfxtest/testsuites/PrintTestBitBlt.java --- a/src/org/gfxtest/testsuites/PrintTestBitBlt.java Wed Sep 12 15:19:10 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBlt.java Thu Sep 13 09:13:56 2012 +0200 @@ -261,6 +261,169 @@ } /** + * Test basic BitBlt operation for diagonal checker buffered image with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalCheckerBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for grid buffered image with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltGridBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for diagonal grid buffered image with type + * TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalGridBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalGridImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for horizontal stripes buffered image with + * type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithHorizontalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for vertical stripes buffered image with type + * TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithVerticalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for diagonal stripes buffered image with type + * TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for horizontal color stripes buffered image + * with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltHorizontalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for vertical color stripes buffered image + * with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltVerticalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for diagonal color stripes buffered image + * with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltDiagonalColorStripesBufferedImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for black and white dots pattern buffered image + * with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltBWDotsImageTypeByteBinary(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithBWDotsImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for color dots pattern buffered image + * with type TYPE_BYTE_BINARY. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltColorDotsImageTypeByteIntARGB(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithColorDotsImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB); + } + + /** * Entry point to the test suite. * * @param args From ptisnovs at icedtea.classpath.org Thu Sep 13 01:01:18 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 13 Sep 2012 08:01:18 +0000 Subject: /hg/rhino-tests: Added new test case src/org/RhinoTests/Compilab... Message-ID: changeset 658afb0e403e in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=658afb0e403e author: Pavel Tisnovsky date: Thu Sep 13 10:03:49 2012 +0200 Added new test case src/org/RhinoTests/CompilableClassTest.java with 20 tests. diffstat: ChangeLog | 5 + Makefile | 2 + src/org/RhinoTests/CompilableClassTest.java | 344 ++++++++++++++++++++++++++++ 3 files changed, 351 insertions(+), 0 deletions(-) diffs (379 lines): diff -r 1909ce4c5896 -r 658afb0e403e ChangeLog --- a/ChangeLog Tue Sep 11 17:02:20 2012 +0200 +++ b/ChangeLog Thu Sep 13 10:03:49 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-13 Pavel Tisnovsky + + * src/org/RhinoTests/CompilableClassTest.java: + Added new test case with 20 tests. + 2012-09-11 Pavel Tisnovsky * src/org/RhinoTests/InvocableClassTest.java: diff -r 1909ce4c5896 -r 658afb0e403e Makefile --- a/Makefile Tue Sep 11 17:02:20 2012 +0200 +++ b/Makefile Thu Sep 13 10:03:49 2012 +0200 @@ -59,6 +59,7 @@ JavaScriptsTest \ BindingsTest \ CompilableTest \ + CompilableClassTest \ CompiledScriptTest \ CompiledScriptClassTest \ InvocableTest \ @@ -88,6 +89,7 @@ $(BUILD_DIR)/$(TEST_PACKAGE)/BaseRhinoTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/BindingsTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompilableTest.class \ + $(BUILD_DIR)/$(TEST_PACKAGE)/CompilableClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompiledScriptTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/CompiledScriptClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/InvocableTest.class \ diff -r 1909ce4c5896 -r 658afb0e403e src/org/RhinoTests/CompilableClassTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/CompilableClassTest.java Thu Sep 13 10:03:49 2012 +0200 @@ -0,0 +1,344 @@ +/* + Rhino test framework + + Copyright (C) 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.RhinoTests; + +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import javax.script.Compilable; +import javax.script.ScriptEngineManager; +import javax.script.ScriptEngine; + + + +/** + * Set of tests which check the API of Compilable interface using + * Java reflection API. + * + * @author Pavel Tisnovsky + */ +public class CompilableClassTest extends BaseRhinoTest { + + /** + * Object that represents the type of Compilable. + */ + Class compilableClass = null; + + @Override + protected void setUp(String[] args) { + // setup attribute used by tests + this.compilableClass = Compilable.class; + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Test for method javax.script.Compilable.getClass().isAssignableFrom() + */ + protected void testIsAssignableFrom() { + assertTrue(this.compilableClass.isAssignableFrom(Compilable.class), + "Method Compilable.getClass().isAssignableFrom() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isInstance() + */ + protected void testIsInstance() { + assertTrue(this.compilableClass.isInstance((Compilable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))), + "Method Compilable.getClass().isInstance() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isInterface() + */ + protected void testIsInterface() { + assertTrue(this.compilableClass.isInterface(), + "Method Compilable.getClass().isInterface() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isLocalClass() + */ + protected void testIsLocalClass() { + assertFalse(this.compilableClass.isLocalClass(), + "Method Compilable.getClass().isLocalClass() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isMemberClass() + */ + protected void testIsMemberClass() { + assertFalse(this.compilableClass.isMemberClass(), + "Method Compilable.getClass().isMemberClass() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isPrimitive() + */ + protected void testIsPrimitive() { + assertFalse(this.compilableClass.isPrimitive(), + "Method Compilable.getClass().isPrimitive() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isSynthetic() + */ + protected void testIsSynthetic() { + assertFalse(this.compilableClass.isSynthetic(), + "Method Compilable.getClass().isSynthetic() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().getInterfaces() + */ + protected void testGetInterfaces() { + List interfaces = Arrays.asList(this.compilableClass.getInterfaces()); + assertTrue(interfaces.isEmpty(), + "list of implemented interfaces should be empty"); + } + + /** + * Test for method javax.script.Compilable.getClass().getModifiers() + */ + protected void testGetModifiers() { + int modifiers = this.compilableClass.getModifiers(); + assertTrue(Modifier.isPublic(modifiers), + "Method Compilable.getClass().getModifiers() - isPublic modifier is set to a wrong value"); + assertFalse(Modifier.isPrivate(modifiers), + "Method Compilable.getClass().getModifiers() - isPrivate modifier is set to a wrong value"); + assertFalse(Modifier.isProtected(modifiers), + "Method Compilable.getClass().getModifiers() - isProtected modifier is set to a wrong value"); + assertTrue(Modifier.isAbstract(modifiers), + "Method Compilable.getClass().getModifiers() - isAbstract modifier is set to a wrong value"); + assertFalse(Modifier.isFinal(modifiers), + "Method Compilable.getClass().getModifiers() - isFinal modifier is set to a wrong value"); + assertTrue(Modifier.isInterface(modifiers), + "Method Compilable.getClass().getModifiers() - isInterface modifier is set to a wrong value"); + assertFalse(Modifier.isNative(modifiers), + "Method Compilable.getClass().getModifiers() - isNative modifier is set to a wrong value"); + assertFalse(Modifier.isStatic(modifiers), + "Method Compilable.getClass().getModifiers() - isStatic modifier is set to a wrong value"); + assertFalse(Modifier.isStrict(modifiers), + "Method Compilable.getClass().getModifiers() - isStrict modifier is set to a wrong value"); + assertFalse(Modifier.isSynchronized(modifiers), + "Method Compilable.getClass().getModifiers() - isSynchronized modifier is set to a wrong value"); + assertFalse(Modifier.isTransient(modifiers), + "Method Compilable.getClass().getModifiers() - isTransient modifier is set to a wrong value"); + assertFalse(Modifier.isVolatile(modifiers), + "Method Compilable.getClass().getModifiers() - isVolatile modifier is set to a wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().getName() + */ + protected void testGetName() { + String name = this.compilableClass.getName(); + assertEquals(name, "javax.script.Compilable", + "Method Compilable.getClass().getName() returns wrong value " + name); + } + + /** + * Test for method javax.script.Compilable.getClass().getPackage() + */ + protected void testGetPackage() { + Package p = this.compilableClass.getPackage(); + String packageName = p.getName(); + assertEquals(packageName, "javax.script", + "Method Compilable.getClass().getPackage().getName() returns wrong value " + packageName); + } + + /** + * Test for method javax.script.Compilable.getClass().getSimpleName() + */ + protected void testGetSimpleName() { + String simpleName = this.compilableClass.getSimpleName(); + assertEquals(simpleName, "Compilable", + "Method Compilable.getClass().getSimpleName() returns wrong value " + simpleName); + } + + /** + * Test for method javax.script.Compilable.getClass().getSuperclass() + */ + protected void testGetSuperclass() { + Class superClass = this.compilableClass.getSuperclass(); + assertNull(superClass, + "Method Compilable.getClass().getSuperclass() does not return null"); + } + + /** + * Test for method javax.script.Compilable.getClass().getConstructors() + */ + protected void testGetConstructors() { + Constructor[] constructors = this.compilableClass.getConstructors(); + assertEquals(constructors.length, 0, "no constructors should be set"); + } + + /** + * Test for method javax.script.Compilable.getClass().getDeclaredConstructors() + */ + protected void testGetDeclaredConstructors() { + Constructor[] constructors = this.compilableClass.getDeclaredConstructors(); + assertEquals(constructors.length, 0, "no constructors should be set"); + } + + /** + * Test for method javax.script.Compilable.getClass().getFields() + */ + protected void testGetFields() { + // following fields should exists + final String[] fieldsThatShouldExists = { + }; + // get all fields + Field[] fields = this.compilableClass.getFields(); + // and transform the array into a list of field names + List fieldsAsString = new ArrayList(); + for (Field field : fields) { + fieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(fieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Compilable.getClass().getDeclaredFields() + */ + protected void testGetDeclaredFields() { + // following fields should be declared + final String[] fieldsThatShouldExists = { + }; + // get all declared fields + Field[] declaredFields = this.compilableClass.getDeclaredFields(); + // and transform the array into a list of field names + List declaredFieldsAsString = new ArrayList(); + for (Field field : declaredFields) { + declaredFieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(declaredFieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Compilable.getClass().getMethods() + */ + protected void testGetMethods() { + // following methods should be inherited + final String[] methodsThatShouldExists = { + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.io.Reader) throws javax.script.ScriptException", + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.lang.String) throws javax.script.ScriptException", + }; + // get all inherited methods + Method[] methods = this.compilableClass.getMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : methods) { + methodsAsString.add(method.toString()); + } + // check if all required methods really exists + for (String methodThatShouldExists : methodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.Compilable.getClass().getDeclaredMethods() + */ + protected void testGetDeclaredMethods() { + // following methods should be declared + final String[] declaredMethodsThatShouldExists = { + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.io.Reader) throws javax.script.ScriptException", + "public abstract javax.script.CompiledScript javax.script.Compilable.compile(java.lang.String) throws javax.script.ScriptException", + }; + // get all declared methods + Method[] declaredMethods = this.compilableClass.getDeclaredMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : declaredMethods) { + methodsAsString.add(method.toString()); + } + // check if all required methods really exists + for (String methodThatShouldExists : declaredMethodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "declared method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for instanceof operator applied to a class javax.script.Compilable + */ + protected void testInstanceOf() { + // tested object + Object o = (Compilable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript)); + + // basic check of instanceof operator + assertTrue(o instanceof Compilable, "instanceof Compilable is wrongly evaluated to false"); + + // check operator instanceof against all superclasses + // (but only one superclass is used in case of Compilable interface) + assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); + } + + /** + * Entry point to this test case. + * + * @param args parameters passed from command line + */ + public static void main(String[] args) { + new CompilableClassTest().doTests(args); + } +} + From smohamma at redhat.com Thu Sep 13 06:59:12 2012 From: smohamma at redhat.com (Saad Mohammad) Date: Thu, 13 Sep 2012 09:59:12 -0400 (EDT) Subject: [RFC][icedtea-web]: Fix PR909 - The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails In-Reply-To: <1471503176.69075512.1347544148972.JavaMail.root@redhat.com> Message-ID: <85828911.69079417.1347544752233.JavaMail.root@redhat.com> Hello, The patch attached fixes PR909. The problem is that every URL was being validated and percent-encoded (normalized). This was changing the URLs to point to invalid locations causing resources not to be found/loaded. Thanks. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: PR909Changelog0-1.patch Type: text/x-patch Size: 799 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120913/9573361f/PR909Changelog0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: PR909Fix0-1.patch Type: text/x-patch Size: 3736 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120913/9573361f/PR909Fix0-1.patch From bugzilla-daemon at icedtea.classpath.org Thu Sep 13 07:18:34 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 13 Sep 2012 14:18:34 +0000 Subject: [Bug 909] The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=909 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnu.andrew at redhat.com Component|Plugin |General Assignee|smohammad at redhat.com |dbhole at redhat.com --- Comment #2 from Saad Mohammad --- This bug is produced because ResourceTracker#addResource attempts to percent-encode all URLs before loading the resource, causing links to be invalid. Proposed patch: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020265.html -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120913/0b75ea85/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 13 07:19:30 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 13 Sep 2012 14:19:30 +0000 Subject: [Bug 909] The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=909 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |smohammad at redhat.com Assignee|dbhole at redhat.com |smohammad at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120913/75fc4755/attachment.html From ptisnovs at icedtea.classpath.org Fri Sep 14 01:06:27 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 14 Sep 2012 08:06:27 +0000 Subject: /hg/gfx-test: * src/org/gfxtest/framework/CommonBitmapOperations... Message-ID: changeset 0e6e63aebe13 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=0e6e63aebe13 author: Pavel Tisnovsky date: Fri Sep 14 10:09:04 2012 +0200 * src/org/gfxtest/framework/CommonBitmapOperations.java: Added support for rendering flipped images of certain types. * src/org/gfxtest/testsuites/BitBltMirrorImage.java: Added eight new tests to this test case, correction of various typos. diffstat: ChangeLog | 7 + src/org/gfxtest/framework/CommonBitmapOperations.java | 64 +++++- src/org/gfxtest/testsuites/BitBltMirrorImage.java | 190 +++++++++++++++++- 3 files changed, 253 insertions(+), 8 deletions(-) diffs (331 lines): diff -r 26d1f5592d44 -r 0e6e63aebe13 ChangeLog --- a/ChangeLog Thu Sep 13 09:13:56 2012 +0200 +++ b/ChangeLog Fri Sep 14 10:09:04 2012 +0200 @@ -1,3 +1,10 @@ +2012-09-14 Pavel Tisnovsky + + * src/org/gfxtest/framework/CommonBitmapOperations.java: + Added support for rendering flipped images of certain types. + * src/org/gfxtest/testsuites/BitBltMirrorImage.java: + Added eight new tests to this test case, correction of various typos. + 2012-09-13 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestBitBlt.java: diff -r 26d1f5592d44 -r 0e6e63aebe13 src/org/gfxtest/framework/CommonBitmapOperations.java --- a/src/org/gfxtest/framework/CommonBitmapOperations.java Thu Sep 13 09:13:56 2012 +0200 +++ b/src/org/gfxtest/framework/CommonBitmapOperations.java Fri Sep 14 10:09:04 2012 +0200 @@ -155,17 +155,75 @@ * image to which another image is to be drawn * @param graphics2d * graphics canvas - * @param type + * @param imageType * type of the created image */ - public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int type) + public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType) { - BufferedImage bufferedImage = createBufferedBitmap(type); + BufferedImage bufferedImage = createBufferedBitmap(imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } // BitBlt with 1:1 scaling return performBitBlt(bufferedImage, image, graphics2d) ? TestResult.PASSED : TestResult.FAILED; } /** + * Create new buffered image and then perform basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param width + * width of a image after BitBlt operation is performed + * @param height + * height of a image after BitBlt operation is performed + */ + public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height) + { + BufferedImage bufferedImage = createBufferedBitmap(imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with custom scaling + return performBitBlt(bufferedImage, image, graphics2d, width, height) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image and then perform basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param horizontalFlip + * enables performing horizontal flip of image + * @param verticalFlip + * enables performing vertical flip of image + */ + public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType, + boolean horizontalFlip, boolean verticalFlip) + { + BufferedImage bufferedImage = createBufferedBitmap(imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with 1:1 scaling + return performBitBlt(bufferedImage, image, graphics2d, horizontalFlip, verticalFlip) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing checker pattern and then perform basic BitBlt test. * * @param image diff -r 26d1f5592d44 -r 0e6e63aebe13 src/org/gfxtest/testsuites/BitBltMirrorImage.java --- a/src/org/gfxtest/testsuites/BitBltMirrorImage.java Thu Sep 13 09:13:56 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltMirrorImage.java Fri Sep 14 10:09:04 2012 +0200 @@ -125,7 +125,7 @@ /** * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY. - * Horizontal and vertical flip is performed on that image.. + * Horizontal and vertical flips are performed on that image.. * * @param image * image to which line is to be drawn @@ -185,7 +185,7 @@ /** * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. - * Horizontal and vertical flip is performed on that image.. + * Horizontal and vertical flips are performed on that image.. * * @param image * image to which line is to be drawn @@ -245,7 +245,7 @@ /** * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR. - * Horizontal and vertical flip is performed on that image.. + * Horizontal and vertical flips are performed on that image.. * * @param image * image to which line is to be drawn @@ -305,7 +305,7 @@ /** * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB. - * Horizontal and vertical flip is performed on that image.. + * Horizontal and vertical flips are performed on that image.. * * @param image * image to which line is to be drawn @@ -365,7 +365,7 @@ /** * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE. - * Horizontal and vertical flip is performed on that image.. + * Horizontal and vertical flips are performed on that image.. * * @param image * image to which line is to be drawn @@ -379,6 +379,186 @@ } /** + * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType3ByteBGRNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, false, false); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR. + * Horizontal flip is performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType3ByteBGRHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, true, false); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR. + * Vertical flip is performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType3ByteBGRVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, false, true); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR. + * Horizontal and vertical flips are performed on that image.. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType3ByteBGRHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, true, true); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGRNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, false, false); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR. + * Horizontal flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGRHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, true, false); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR. + * Vertical flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGRVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, false, true); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR. + * Horizontal and vertical flip are performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGRHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, true, true); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_PRE. + * No flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGR_PreNoFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, false, false); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_PRE. + * Horizontal flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGR_PreHorizontalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, true, false); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_PRE. + * Vertical flip is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGR_PreVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, false, true); + } + + /** + * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR_PRE. + * Horizontal and vertical flips are performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltEmptyBufferedImageType4ByteABGR_PreHorizontalAndVerticalFlip(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, true, true); + } + + /** * Entry point to the test suite. * * @param args not used in this case From ptisnovs at icedtea.classpath.org Fri Sep 14 01:56:27 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 14 Sep 2012 08:56:27 +0000 Subject: /hg/rhino-tests: Added new test case src/org/RhinoTests/ScriptEn... Message-ID: changeset df52afae62a2 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=df52afae62a2 author: Pavel Tisnovsky date: Fri Sep 14 10:59:01 2012 +0200 Added new test case src/org/RhinoTests/ScriptEngineFactoryClassTest.java. diffstat: ChangeLog | 7 + Makefile | 2 + src/org/RhinoTests/ScriptEngineFactoryClassTest.java | 362 +++++++++++++++++++ 3 files changed, 371 insertions(+), 0 deletions(-) diffs (399 lines): diff -r 658afb0e403e -r df52afae62a2 ChangeLog --- a/ChangeLog Thu Sep 13 10:03:49 2012 +0200 +++ b/ChangeLog Fri Sep 14 10:59:01 2012 +0200 @@ -1,3 +1,10 @@ +2012-09-14 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptEngineFactoryClassTest.java: + Added new test case with 20 tests. + * Makefile: + Added new class to compile and new test to run. + 2012-09-13 Pavel Tisnovsky * src/org/RhinoTests/CompilableClassTest.java: diff -r 658afb0e403e -r df52afae62a2 Makefile --- a/Makefile Thu Sep 13 10:03:49 2012 +0200 +++ b/Makefile Fri Sep 14 10:59:01 2012 +0200 @@ -56,6 +56,7 @@ ScriptEngineTest \ ScriptEngineClassTest \ ScriptEngineFactoryTest \ + ScriptEngineFactoryClassTest \ JavaScriptsTest \ BindingsTest \ CompilableTest \ @@ -98,6 +99,7 @@ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptContextTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptContextClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptEngineFactoryTest.class \ + $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptEngineFactoryClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptEngineManagerTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptEngineManagerClassTest.class \ $(BUILD_DIR)/$(TEST_PACKAGE)/ScriptEngineTest.class \ diff -r 658afb0e403e -r df52afae62a2 src/org/RhinoTests/ScriptEngineFactoryClassTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/ScriptEngineFactoryClassTest.java Fri Sep 14 10:59:01 2012 +0200 @@ -0,0 +1,362 @@ +/* + Rhino test framework + + Copyright (C) 2011, 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package org.RhinoTests; + +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + +import javax.script.ScriptEngineFactory; +import javax.script.ScriptEngineManager; + + + +/** + * Set of tests which check the API of ScriptEngineFactory interface using + * Java reflection API. + * + * @author Pavel Tisnovsky + */ +public class ScriptEngineFactoryClassTest extends BaseRhinoTest { + + /** + * Object that represents the type of ScriptEngineFactory. + */ + Class scriptEngineFactoryClass = null; + + @Override + protected void setUp(String[] args) { + // setup attribute used by tests + this.scriptEngineFactoryClass = ScriptEngineFactory.class; + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isAssignableFrom() + */ + protected void testIsAssignableFrom() { + assertTrue(this.scriptEngineFactoryClass.isAssignableFrom(ScriptEngineFactory.class), + "Method ScriptEngineFactory.getClass().isAssignableFrom() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isInstance() + */ + protected void testIsInstance() { + assertTrue(this.scriptEngineFactoryClass.isInstance(new ScriptEngineManager().getEngineFactories().get(0)), + "Method ScriptEngineFactory.getClass().isInstance() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isInterface() + */ + protected void testIsInterface() { + assertTrue(this.scriptEngineFactoryClass.isInterface(), + "Method ScriptEngineFactory.getClass().isInterface() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isLocalClass() + */ + protected void testIsLocalClass() { + assertFalse(this.scriptEngineFactoryClass.isLocalClass(), + "Method ScriptEngineFactory.getClass().isLocalClass() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isMemberClass() + */ + protected void testIsMemberClass() { + assertFalse(this.scriptEngineFactoryClass.isMemberClass(), + "Method ScriptEngineFactory.getClass().isMemberClass() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isPrimitive() + */ + protected void testIsPrimitive() { + assertFalse(this.scriptEngineFactoryClass.isPrimitive(), + "Method ScriptEngineFactory.getClass().isPrimitive() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().isSynthetic() + */ + protected void testIsSynthetic() { + assertFalse(this.scriptEngineFactoryClass.isSynthetic(), + "Method ScriptEngineFactory.getClass().isSynthetic() returns wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getInterfaces() + */ + protected void testGetInterfaces() { + List interfaces = Arrays.asList(this.scriptEngineFactoryClass.getInterfaces()); + assertTrue(interfaces.isEmpty(), + "list of implemented interfaces should be empty"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getModifiers() + */ + protected void testGetModifiers() { + int modifiers = this.scriptEngineFactoryClass.getModifiers(); + assertTrue(Modifier.isPublic(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isPublic modifier is set to a wrong value"); + assertFalse(Modifier.isPrivate(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isPrivate modifier is set to a wrong value"); + assertFalse(Modifier.isProtected(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isProtected modifier is set to a wrong value"); + assertTrue(Modifier.isAbstract(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isAbstract modifier is set to a wrong value"); + assertFalse(Modifier.isFinal(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isFinal modifier is set to a wrong value"); + assertTrue(Modifier.isInterface(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isInterface modifier is set to a wrong value"); + assertFalse(Modifier.isNative(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isNative modifier is set to a wrong value"); + assertFalse(Modifier.isStatic(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isStatic modifier is set to a wrong value"); + assertFalse(Modifier.isStrict(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isStrict modifier is set to a wrong value"); + assertFalse(Modifier.isSynchronized(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isSynchronized modifier is set to a wrong value"); + assertFalse(Modifier.isTransient(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isTransient modifier is set to a wrong value"); + assertFalse(Modifier.isVolatile(modifiers), + "Method ScriptEngineFactory.getClass().getModifiers() - isVolatile modifier is set to a wrong value"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getName() + */ + protected void testGetName() { + String name = this.scriptEngineFactoryClass.getName(); + assertEquals(name, "javax.script.ScriptEngineFactory", + "Method ScriptEngineFactory.getClass().getName() returns wrong value " + name); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getPackage() + */ + protected void testGetPackage() { + Package p = this.scriptEngineFactoryClass.getPackage(); + String packageName = p.getName(); + assertEquals(packageName, "javax.script", + "Method ScriptEngineFactory.getClass().getPackage().getName() returns wrong value " + packageName); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getSimpleName() + */ + protected void testGetSimpleName() { + String simpleName = this.scriptEngineFactoryClass.getSimpleName(); + assertEquals(simpleName, "ScriptEngineFactory", + "Method ScriptEngineFactory.getClass().getSimpleName() returns wrong value " + simpleName); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getSuperclass() + */ + protected void testGetSuperclass() { + Class superClass = this.scriptEngineFactoryClass.getSuperclass(); + assertNull(superClass, + "Method ScriptEngineFactory.getClass().getSuperclass() does not return null"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getConstructors() + */ + protected void testGetConstructors() { + Constructor[] constructors = this.scriptEngineFactoryClass.getConstructors(); + assertEquals(constructors.length, 0, "no constructors should be set"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getDeclaredConstructors() + */ + protected void testGetDeclaredConstructors() { + Constructor[] constructors = this.scriptEngineFactoryClass.getDeclaredConstructors(); + assertEquals(constructors.length, 0, "no constructors should be set"); + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getFields() + */ + protected void testGetFields() { + // following fields should exists + final String[] fieldsThatShouldExists = { + }; + // get all fields + Field[] fields = this.scriptEngineFactoryClass.getFields(); + // and transform the array into a list of field names + List fieldsAsString = new ArrayList(); + for (Field field : fields) { + fieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(fieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getDeclaredFields() + */ + protected void testGetDeclaredFields() { + // following fields should be declared + final String[] fieldsThatShouldExists = { + }; + // get all declared fields + Field[] declaredFields = this.scriptEngineFactoryClass.getDeclaredFields(); + // and transform the array into a list of field names + List declaredFieldsAsString = new ArrayList(); + for (Field field : declaredFields) { + declaredFieldsAsString.add(field.toString()); + } + // check if all required fields really exists + for (String fieldThatShouldExists : fieldsThatShouldExists) { + assertTrue(declaredFieldsAsString.contains(fieldThatShouldExists), + "field " + fieldThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getMethods() + */ + protected void testGetMethods() { + // following methods should be inherited + final String[] methodsThatShouldExists = { + "public abstract java.lang.Object javax.script.ScriptEngineFactory.getParameter(java.lang.String)", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getEngineName()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getEngineVersion()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getLanguageName()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getLanguageVersion()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getMethodCallSyntax(java.lang.String,java.lang.String,java.lang.String[])", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getOutputStatement(java.lang.String)", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getProgram(java.lang.String[])", + "public abstract java.util.List javax.script.ScriptEngineFactory.getExtensions()", + "public abstract java.util.List javax.script.ScriptEngineFactory.getMimeTypes()", + "public abstract java.util.List javax.script.ScriptEngineFactory.getNames()", + "public abstract javax.script.ScriptEngine javax.script.ScriptEngineFactory.getScriptEngine()", + }; + // get all inherited methods + Method[] methods = this.scriptEngineFactoryClass.getMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : methods) { + methodsAsString.add(method.toString()); + } + // check if all required methods really exists + for (String methodThatShouldExists : methodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for method javax.script.ScriptEngineFactory.getClass().getDeclaredMethods() + */ + protected void testGetDeclaredMethods() { + // following methods should be declared + final String[] declaredMethodsThatShouldExists = { + "public abstract java.lang.Object javax.script.ScriptEngineFactory.getParameter(java.lang.String)", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getEngineName()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getEngineVersion()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getLanguageName()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getLanguageVersion()", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getMethodCallSyntax(java.lang.String,java.lang.String,java.lang.String[])", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getOutputStatement(java.lang.String)", + "public abstract java.lang.String javax.script.ScriptEngineFactory.getProgram(java.lang.String[])", + "public abstract java.util.List javax.script.ScriptEngineFactory.getExtensions()", + "public abstract java.util.List javax.script.ScriptEngineFactory.getMimeTypes()", + "public abstract java.util.List javax.script.ScriptEngineFactory.getNames()", + "public abstract javax.script.ScriptEngine javax.script.ScriptEngineFactory.getScriptEngine()", + }; + // get all declared methods + Method[] declaredMethods = this.scriptEngineFactoryClass.getDeclaredMethods(); + // and transform the array into a list of method names + List methodsAsString = new ArrayList(); + for (Method method : declaredMethods) { + methodsAsString.add(method.toString()); + } + // check if all required methods really exists + for (String methodThatShouldExists : declaredMethodsThatShouldExists) { + assertTrue(methodsAsString.contains(methodThatShouldExists), + "declared method " + methodThatShouldExists + " not found"); + } + } + + /** + * Test for instanceof operator applied to a class javax.script.ScriptEngineFactory + */ + protected void testInstanceOf() { + // tested object + Object o = new ScriptEngineManager().getEngineFactories().get(0); + + // basic check of instanceof operator + assertTrue(o instanceof ScriptEngineFactory, "instanceof ScriptEngineFactory is wrongly evaluated to false"); + + // check operator instanceof against all superclasses + assertTrue(o instanceof Object, "instanceof Object is wrongly evaluated to false"); + } + + /** + * Entry point to this test case. + * + * @param args parameters passed from command line + */ + public static void main(String[] args) { + new ScriptEngineFactoryClassTest().doTests(args); + } +} + From bugzilla-daemon at icedtea.classpath.org Fri Sep 14 12:36:43 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 14 Sep 2012 19:36:43 +0000 Subject: [Bug 1166] New: Applet fails to load using jnlp_href: http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/examples/dist/depl_EmbeddingJNLPInWebPage/AppletPage.html Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1166 Priority: P3 Bug ID: 1166 CC: unassigned at icedtea.classpath.org Assignee: smohammad at redhat.com Summary: Applet fails to load using jnlp_href: http://docs.oracle.com/javase/tutorial/deployment/depl oymentInDepth/examples/dist/depl_EmbeddingJNLPInWebPag e/AppletPage.html Severity: normal Classification: Unclassified OS: Linux Reporter: smohammad at redhat.com Hardware: x86_64 Status: NEW Version: unspecified Component: Plugin Product: IcedTea-Web This applet fails to launch: http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/examples/dist/depl_EmbeddingJNLPInWebPage/AppletPage.html LaunchException is thrown claiming one of the resource is missing. This applet works fine with proprietary plugin. LOG: JAR http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/examples/dist/depl_EmbeddingJNLPInWebPage/dist/applet_ComponentArch_DynamicTreeDemo/DynamicTreeDemo.jar not found. Continuing. netx: Initialization Error: Could not initialize applet. (dummy) netx: Initialization Error: Could not initialize applet. (dummy) net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize applet. at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:754) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:687) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:905) Caused by: java.lang.ClassNotFoundException: dummy at net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:1611) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:744) ... 2 more java.lang.NullPointerException at net.sourceforge.jnlp.NetxPanel.runLoader(NetxPanel.java:154) at sun.applet.AppletPanel.run(AppletPanel.java:379) at java.lang.Thread.run(Thread.java:722) java.lang.NullPointerException at sun.applet.AppletPanel.run(AppletPanel.java:429) at java.lang.Thread.run(Thread.java:722) -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120914/eb7bcf1f/attachment.html From ssmile03 at gmail.com Sat Sep 15 19:44:26 2012 From: ssmile03 at gmail.com (Smiley 4321) Date: Sun, 16 Sep 2012 08:14:26 +0530 Subject: ARM Java Porting ..help!! Message-ID: All, Let me express my appreciation to the excellent group OpenJDK what we have and support provided to it's members. I am looking for some clue/documentation for Java Runtime (JRE) support for custom RISC/ARM based 32-bit (typical Load/Store architecture with INT, Single FP and double FP) and Linux (-v2.4), Memory configurable processor. To start with, simply I wish to know - - What are the things to be done to setup a Java Development environment for this processor? - This would include ... - Host Side: - A JDK environment, Editors, Java compiler (generating Bytecode), Debuggers, ...etc. - Device Side: - A JRE which includes JVM, Java libraries, ...etc. What are the major items that need to be done ... - Example, using existing Eclipse tools for development (IDE, ...etc.) - Determining which Java version we will support - Which existing JVM implementation one should use? Or should one be implemented from scratch? - What parts of that JVM are C++ code which will work without any change (just would need re-compilation)? - What parts of the JVM are native code, which will have to be implemented for the ARM Processor? - Boot Image ? Will this be needed to boot ARM based JVM? - Optimized ARM Java Compiler tool-chain ? These ARM JVM tool-chain that generates optimized machine code from byte code through - (a) Supporting JVM backend to ARM board (b) Supporting Integer, Floating-point and Thumb instructions sets with test suites. (c) Optimizing Memory Management Unit (MMU) and Garbage Collector (GC) as whole performance of Anurag JVM would depend on this two critical parameters. (d) Supporting Java Multi-threading and POSIX capabilities (e) Application Binary Interface (ABI) (f) Porting and executing parallel based algorithms (g) Power saving ? Using trade-off between Thumb code and ARM code. - Porting interfaces for the GUI alternatives - To meet product requirements for speed and cost/resource constraints. In some cases, to provide GUI interoperability that would allow AWT based applications to cooperate with native applications. - Profiling ? To profile explicitly both from application (hotspots, etc.) and system (pipeline, events, cache, branch mis-predictions, context threading, etc) end. - Benchmark (Dhrystone, SpecJVM2008, etc) I know I have asked tons of questions but would really appreciate a direction to KICK START. I have a x64 bit machine with Ubuntu-12.04 loaded on it. Looking forward. ----- Thanks!! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120916/cf687bd8/attachment.html From fcassia at gmail.com Sat Sep 15 23:00:45 2012 From: fcassia at gmail.com (Fernando Cassia) Date: Sun, 16 Sep 2012 03:00:45 -0300 Subject: ARM Java Porting ..help!! In-Reply-To: References: Message-ID: On Sat, Sep 15, 2012 at 11:44 PM, Smiley 4321 wrote: > I am looking for some clue/documentation for Java Runtime (JRE) support > for custom RISC/ARM based 32-bit (typical Load/Store architecture with > INT, Single FP and double FP) and Linux > There is Java (both OpenJDK and also Oracle JRE) for ARM already. Just install Fedora 17 for ARM and you will have OpenJDK http://fedoraproject.org/wiki/Architectures/ARM/Fedora_17_GA FC -- During times of Universal Deceit, telling the truth becomes a revolutionary act - George Orwell -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120916/ad73fb2a/attachment.html From aph at redhat.com Sun Sep 16 01:55:15 2012 From: aph at redhat.com (Andrew Haley) Date: Sun, 16 Sep 2012 09:55:15 +0100 Subject: ARM Java Porting ..help!! In-Reply-To: References: Message-ID: <505593F3.40207@redhat.com> On 09/16/2012 03:44 AM, Smiley 4321 wrote: > Let me express my appreciation to the excellent group OpenJDK what we have > and support provided to it's members. > > I am looking for some clue/documentation for Java Runtime (JRE) support for > custom RISC/ARM based 32-bit (typical Load/Store architecture with INT, > Single FP and double FP) and Linux (-v2.4), Memory configurable processor. > > To start with, simply I wish to know - > > - What are the things to be done to setup a Java Development environment > for this processor? > - This would include ... > - Host Side: > > > - A JDK environment, Editors, Java compiler (generating Bytecode), > Debuggers, ...etc. > > > - Device Side: > > > - A JRE which includes JVM, Java libraries, ...etc. I'd start with the IcedTea ARM port. This is available with full source code at http://icedtea.classpath.org, but I would start by using an ARM-based GNU/Linux distribution. Andrew. From ptisnovs at icedtea.classpath.org Mon Sep 17 01:21:05 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 17 Sep 2012 08:21:05 +0000 Subject: /hg/gfx-test: Eight new tests added to the test suite BitBltScal... Message-ID: changeset 4fdd5848ee80 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=4fdd5848ee80 author: Pavel Tisnovsky date: Mon Sep 17 10:23:43 2012 +0200 Eight new tests added to the test suite BitBltScaleImage. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltScaleImage.java | 212 ++++++++++++++++++++++- 2 files changed, 213 insertions(+), 4 deletions(-) diffs (262 lines): diff -r 0e6e63aebe13 -r 4fdd5848ee80 ChangeLog --- a/ChangeLog Fri Sep 14 10:09:04 2012 +0200 +++ b/ChangeLog Mon Sep 17 10:23:43 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-17 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltScaleImage.java: + Eight new tests added to the test suite BitBltScaleImage. + 2012-09-14 Pavel Tisnovsky * src/org/gfxtest/framework/CommonBitmapOperations.java: diff -r 0e6e63aebe13 -r 4fdd5848ee80 src/org/gfxtest/testsuites/BitBltScaleImage.java --- a/src/org/gfxtest/testsuites/BitBltScaleImage.java Fri Sep 14 10:09:04 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltScaleImage.java Mon Sep 17 10:23:43 2012 +0200 @@ -79,6 +79,210 @@ public class BitBltScaleImage extends GfxTest { /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to a double size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRScaleTwoTimes(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT * 2); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one half size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRScaleOneHalf(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 2); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one third size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRScaleOneThird(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 3); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to two thirds size in both dimensions. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRScaleTwoThirds(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2 / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT *2 / 3); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to a double size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRHScaleTwoTimes(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one half size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRHScaleOneHalf(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 2, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one third size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRHScaleOneThird(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to two thirds size in horizontal dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRHScaleTwoThirds(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2 / 3, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to a double size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRVScaleTwoTimes(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT * 2); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one half size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRVScaleOneHalf(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 2); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to one third size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRVScaleOneThird(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT / 3); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR. + * The image is scaled to two thirds size in vertical dimension. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageType3ByteBGRVScaleTwoThirds(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT *2 / 3); + } + + /** * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY. * The image is scaled to a double size in both dimensions. * @@ -156,7 +360,7 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testBitBltCheckerBufferedImageTypeByteBinaryHscaleOneHalf(TestImage image, Graphics2D graphics2d) + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryHScaleOneHalf(TestImage image, Graphics2D graphics2d) { return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH / 2, @@ -173,7 +377,7 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testBitBltCheckerBufferedImageTypeByteBinaryHscaleTwoTimes(TestImage image, Graphics2D graphics2d) + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryHScaleTwoTimes(TestImage image, Graphics2D graphics2d) { return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH * 2, @@ -190,7 +394,7 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testBitBltCheckerBufferedImageTypeByteBinaryVscaleOneHalf(TestImage image, Graphics2D graphics2d) + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryVScaleOneHalf(TestImage image, Graphics2D graphics2d) { return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, @@ -207,7 +411,7 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testBitBltCheckerBufferedImageTypeByteBinaryVscaleTwoTimes(TestImage image, Graphics2D graphics2d) + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryVScaleTwoTimes(TestImage image, Graphics2D graphics2d) { return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH, From ptisnovs at icedtea.classpath.org Mon Sep 17 03:18:39 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 17 Sep 2012 10:18:39 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite src/org/... Message-ID: changeset a699d77ef3a5 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=a699d77ef3a5 author: Pavel Tisnovsky date: Mon Sep 17 12:21:16 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/AbstractScriptEngineClassTest.java. diffstat: ChangeLog | 5 + src/org/RhinoTests/AbstractScriptEngineClassTest.java | 54 +++++++++++++++++++ 2 files changed, 59 insertions(+), 0 deletions(-) diffs (76 lines): diff -r df52afae62a2 -r a699d77ef3a5 ChangeLog --- a/ChangeLog Fri Sep 14 10:59:01 2012 +0200 +++ b/ChangeLog Mon Sep 17 12:21:16 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-17 Pavel Tisnovsky + + * src/org/RhinoTests/AbstractScriptEngineClassTest.java: + Added five new tests to this test suite. + 2012-09-14 Pavel Tisnovsky * src/org/RhinoTests/ScriptEngineFactoryClassTest.java: diff -r df52afae62a2 -r a699d77ef3a5 src/org/RhinoTests/AbstractScriptEngineClassTest.java --- a/src/org/RhinoTests/AbstractScriptEngineClassTest.java Fri Sep 14 10:59:01 2012 +0200 +++ b/src/org/RhinoTests/AbstractScriptEngineClassTest.java Mon Sep 17 12:21:16 2012 +0200 @@ -136,6 +136,60 @@ } /** + * Test for method javax.script.AbstractScriptEngine.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.abstractScriptEngineClass.isAnnotation(), + "Method AbstractScriptEngine.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.AbstractScriptEngine.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.Override.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.abstractScriptEngineClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method AbstractScriptEngine.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.AbstractScriptEngine.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.abstractScriptEngineClass.isAnonymousClass(), + "Method AbstractScriptEngine.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.AbstractScriptEngine.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.abstractScriptEngineClass.isArray(), + "Method AbstractScriptEngine.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.AbstractScriptEngine.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.abstractScriptEngineClass.isEnum(), + "Method AbstractScriptEngine.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.AbstractScriptEngine.getClass().getInterfaces() */ protected void testGetInterfaces() { From jfabriko at redhat.com Mon Sep 17 04:27:34 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 17 Sep 2012 13:27:34 +0200 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <502E1A9E.4000503@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> Message-ID: <50570926.4040604@redhat.com> Hello Adam and Jiri, the closing listeners seem very useful for my reproducers of Java<->Javascript communication. The speedup for these reproducers when using closing listeners is very signifficant (several seconds instead of the full 20s for one test run) - I would like to be able to use closing listeners officially:) Jana On 08/17/2012 12:19 PM, Jiri Vanek wrote: > On 08/15/2012 06:57 PM, Jiri Vanek wrote: >> On 08/14/2012 05:50 PM, Adam Domurad wrote: >>> On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote: >>>> This idea should speed up browser tests a lot. When all conditions >>>> for pass/failure are done, >>>> browser is terminated and is not waiting for time-out any more. >>>> It is bringing some more load to tester, but its usage is mandatory. >>> Thanks very much for the ideas! >>> >>> It would have been nice if it were like this from the beginning - but >>> nevertheless this would be a great improvement. >>> >>> I'm 100% for converting all tests to this form, and mandating it for >>> future applet tests. I'm sure as the most frequent runner of the test >>> suite you can agree, at least for mandating it for future tests :) >> >> Definitely! I will need some helpt to get it to tests in head ;) >>> >>>> >>>> Usage here is demonstrated on simple applet test. >>>> Any ideas (especially how to avoid doubled "contains" or "matches") >>>> welcomed. >>>> >>>> J. >>>> >>>> * >>>> tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: >>>> Integrated ClosingListener >>>> speed-up. >>>> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: >>>> New file, interface for all >>>> ClosingListeners. >>>> * >>>> tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: >>>> Implementation of >>>> ClsoingListeners which is storing copy of complete output of program. >>>> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: >>>> added (setTimeout) method as >>>> cleanest possibility to terminate process immediately >>>> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new >>>> method (setUpClosingListener) >>>> for setting necessary variables in ClosingListener >>> >>> This method is nice enough, although is it possible to have a >>> standardized way to see if an exception has caused the applet to stop ? >>> >>> I'm very much in favour of adding a clear end marker to the end of tests >>> rather than duplicating contains/matches. If you don't like a hardcoded >>> ending message, then, what if we had a closing listener implementation >>> that takes a single string as an argument, and a string is printed at >>> the end of the applet. Custom closing listeners could always also be >>> created. >>> >> >> I'm little bit against using such a constants (which must be copy >> pasted into reproducer to complete >> the evil ) but I admit it canhel a lot. But I would recommend to be >> careful with such a simple >> "terminator" - as exception can be thrown "later". >> >> Anyway some idea how to integrate this is in this updated patch. >> >> I have posted also one more idea to patch, and although it eliminates >> duplicity, it have quite a lot >> of code :-/. >> >> Both new apporaches shown in AppletTestSigned >> >> thanx for discussion, >> >> J. >> >> >> Ps - I have not tested this new code due to lack of time today so be >> patient with it. I will do in >> friday. I'm posting it for you to get the feedback for more ideas! > > No ideas ? Never mind - debugged version of above attached There was > serious error in listeners (also was caused your listeners in previous > reproducer not working). It is included here but I'm going to fix this > separately. > > > J. > From jvanek at redhat.com Mon Sep 17 04:55:05 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 17 Sep 2012 13:55:05 +0200 Subject: [RFC][icedtea-web]: Fix PR909 - The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails In-Reply-To: <85828911.69079417.1347544752233.JavaMail.root@redhat.com> References: <85828911.69079417.1347544752233.JavaMail.root@redhat.com> Message-ID: <50570F99.1060506@redhat.com> On 09/13/2012 03:59 PM, Saad Mohammad wrote: > Hello, > > The patch attached fixes PR909. > > > The problem is that every URL was being validated and percent-encoded > (normalized). This was changing the URLs to point to invalid locations > causing resources not to be found/loaded. I must disagree with this solution. It is removing consequence rather then fixing the issue. The url encoding/decoding is correct think here. And I do not believe that theirs server is not decoding url properly. So the error will be in handling of url in jnlp-href - eg some second encoding of url or something like it? Or maybe current encoding/decoding is wrong? But I would like to avoid your fallback unless nothing else can be done here. Do you mind to prepare also reproducer with the fix? Thanx for touching the issue and sorry for disagreeing! J. > > Thanks. > > -- > Cheers, > Saad Mohammad > > > PR909Changelog0-1.patch > > > diff --git a/ChangeLog b/ChangeLog > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,9 @@ > +2012-09-12 Saad Mohammad > + > + Fix PR909 - URL is invalid after normalization. > + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (addResource): > + Avoids normalizing resource location URLs unless they are invalid. > + > 2012-09-07 Saad Mohammad > > Added signed jnlp tests for applications with multiple jar resources. > diff --git a/NEWS b/NEWS > --- a/NEWS > +++ b/NEWS > @@ -17,6 +17,7 @@ > * Common > - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered > - PR955: regression: SweetHome3D fails to run > + - PR909: The Java applet athttp://de.gosupermodel.com/games/wardrobegame.jsp fails > > New in release 1.3 (2012-XX-XX): > * NetX > > > PR909Fix0-1.patch > > > diff --git a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java > @@ -185,14 +185,58 @@ > public void addResource(URL location, Version version, DownloadOptions options, UpdatePolicy updatePolicy) { > if (location == null) > throw new IllegalResourceDescriptorException("location==null"); > - try { > - location = normalizeUrl(location, JNLPRuntime.isDebug()); > - } catch (Exception ex) { > - System.err.println("Normalization of " + location.toString() + " have failed"); > - ex.printStackTrace(); > + > + boolean downloaded = false; > + boolean needsNormalization = true; > + > + //Attempts to continue without normalizing (validating) the URL > + //If the resource is already being tracked or is already downloaded, > + //assume normalization is not required > + > + Resource resource = Resource.getResource(location, version, updatePolicy); > + > + synchronized (resources) { > + if (resources.contains(resource)) > + needsNormalization = false; > } > - Resource resource = Resource.getResource(location, version, updatePolicy); > - boolean downloaded = false; > + > + // checkCache may take a while (loads properties file). this > + // should really be synchronized on resources, but the worst > + // case should be that the resource will be updated once even > + // if unnecessary. > + downloaded = checkCache(resource, updatePolicy); > + > + //Checks if the URL is invalid. If so, normalize URL > + if (needsNormalization && !downloaded && !"file".equals(location.getProtocol())) { > + try { > + HttpURLConnection resourceConnect = (HttpURLConnection) location.openConnection(); > + int responseCode = resourceConnect.getResponseCode(); > + > + if (responseCode < 199 || responseCode > 300) { > + if (JNLPRuntime.isDebug()) > + System.err.println("Http errored: " + responseCode + "without any url validation"); > + } else { > + needsNormalization = false; > + } > + > + } catch (IOException e) { > + e.printStackTrace(); > + } finally { > + if (needsNormalization) { > + try { > + //Normalize URL > + if (JNLPRuntime.isDebug()) > + System.err.println("Attempting to normalize url of " + location.toString()); > + > + location = normalizeUrl(location, JNLPRuntime.isDebug()); > + resource = Resource.getResource(location, version, updatePolicy); > + downloaded = checkCache(resource, updatePolicy); > + } catch (IOException e) { > + e.printStackTrace(); > + } > + } > + } > + } > > synchronized (resources) { > if (resources.contains(resource)) > @@ -206,12 +250,6 @@ > } > downloadOptions.put(resource, options); > > - // checkCache may take a while (loads properties file). this > - // should really be synchronized on resources, but the worst > - // case should be that the resource will be updated once even > - // if unnecessary. > - downloaded = checkCache(resource, updatePolicy); > - > synchronized (lock) { > if (!downloaded) > if (prefetch && threads == 0) // existing threads do pre-fetch when queue empty > From bugzilla-daemon at icedtea.classpath.org Mon Sep 17 06:00:12 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 17 Sep 2012 13:00:12 +0000 Subject: [Bug 1147] wrongly assume DNS available even behind a proxy In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1147 Jerome Robert changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|wrongly assume DNS avaible |wrongly assume DNS |even behind a proxy |available even behind a | |proxy -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120917/8ef979f6/attachment.html From mvyskocil at suse.cz Mon Sep 17 07:24:56 2012 From: mvyskocil at suse.cz (Michal Vyskocil) Date: Mon, 17 Sep 2012 16:24:56 +0200 Subject: [PATCH] fix dependencies for stamps/extract-jamvm.stamp Message-ID: <20120917142455.GJ17599@zelva.suse.cz> The stamps/download-jamvm.stamp must be called before extract-jamvm, otherwise the tar xf $(JAMVM_SRC_ZIP) might get a wrong path. diff -r 2eb479d57f25 -r f6ca0873f6b5 ChangeLog --- a/ChangeLog Wed Sep 05 11:41:19 2012 +0200 +++ b/ChangeLog Mon Sep 17 16:09:42 2012 +0200 @@ -1,3 +1,9 @@ +2012-09-17 Michal Vyskocil + + * Makefile.am: + (stamps/extract-jamvm.stamp): Depends on stamps/download-jamvm.stamp. + Fix the dependency problem on JamVM build. + 2012-09-05 Matthias Klose configure.ac: Remove the Xp header and library checks. diff -r 2eb479d57f25 -r f6ca0873f6b5 Makefile.am --- a/Makefile.am Wed Sep 05 11:41:19 2012 +0200 +++ b/Makefile.am Mon Sep 17 16:09:42 2012 +0200 @@ -1285,7 +1285,7 @@ clean-extract-cacao: clean-cacao rm -f stamps/extract-cacao.stamp -stamps/extract-jamvm.stamp: +stamps/extract-jamvm.stamp: stamps/download-jamvm.stamp if BUILD_JAMVM set -e ; \ if ! test -d jamvm ; \ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 198 bytes Desc: Digital signature Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120917/bf9ca425/attachment.bin From adomurad at redhat.com Mon Sep 17 11:54:47 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 17 Sep 2012 14:54:47 -0400 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <502E1A9E.4000503@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> Message-ID: <1347908087.17468.33.camel@adomurad-desktop> On Fri, 2012-08-17 at 12:19 +0200, Jiri Vanek wrote: > On 08/15/2012 06:57 PM, Jiri Vanek wrote: > > On 08/14/2012 05:50 PM, Adam Domurad wrote: > >> On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote: > >>> This idea should speed up browser tests a lot. When all conditions for pass/failure are done, > >>> browser is terminated and is not waiting for time-out any more. > >>> It is bringing some more load to tester, but its usage is mandatory. > >> Thanks very much for the ideas! > >> > >> It would have been nice if it were like this from the beginning - but > >> nevertheless this would be a great improvement. > >> > >> I'm 100% for converting all tests to this form, and mandating it for > >> future applet tests. I'm sure as the most frequent runner of the test > >> suite you can agree, at least for mandating it for future tests :) > > > > Definitely! I will need some helpt to get it to tests in head ;) > >> > >>> > >>> Usage here is demonstrated on simple applet test. > >>> Any ideas (especially how to avoid doubled "contains" or "matches") welcomed. > >>> > >>> J. > >>> > >>> * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: Integrated ClosingListener > >>> speed-up. > >>> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: New file, interface for all > >>> ClosingListeners. > >>> * tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: Implementation of > >>> ClsoingListeners which is storing copy of complete output of program. > >>> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added (setTimeout) method as > >>> cleanest possibility to terminate process immediately > >>> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new method (setUpClosingListener) > >>> for setting necessary variables in ClosingListener > >> > >> This method is nice enough, although is it possible to have a > >> standardized way to see if an exception has caused the applet to stop ? > >> > >> I'm very much in favour of adding a clear end marker to the end of tests > >> rather than duplicating contains/matches. If you don't like a hardcoded > >> ending message, then, what if we had a closing listener implementation > >> that takes a single string as an argument, and a string is printed at > >> the end of the applet. Custom closing listeners could always also be > >> created. > >> > > > > I'm little bit against using such a constants (which must be copy pasted into reproducer to complete > > the evil ) but I admit it canhel a lot. But I would recommend to be careful with such a simple > > "terminator" - as exception can be thrown "later". > > > > Anyway some idea how to integrate this is in this updated patch. > > > > I have posted also one more idea to patch, and although it eliminates duplicity, it have quite a lot > > of code :-/. > > > > Both new apporaches shown in AppletTestSigned > > > > thanx for discussion, > > > > J. > > > > > > Ps - I have not tested this new code due to lack of time today so be patient with it. I will do in > > friday. I'm posting it for you to get the feedback for more ideas! > > No ideas ? Never mind - debugged version of above attached There was serious error in listeners I had ideas, I had to think them through though :) I don't know if I like the verbosity here. Creating a contains-rule for everything separately and then combining them into an array of rules seems like a lot to simply close the browser at the right time. Better would be something like: RuleSet passingRules = new RuleSet().contains(str1, str2).matches(str3, str4); RuleSet failingRules = new RuleSet().contains(str5, str6).matches(str7, str8); But I'm still not sure. It would be much more ideal if the applet simply signal when it is completed somehow, independent of the validation rules. I think simply checking for an ***APPLET FINISHED*** message that was standard for all tests is a good-enough solution. It will cause all well-behaving applets to speed up, which should be at least the majority of them. It could also be nice to have some components common to all applets, (eg common patterns such as Killer thread), that way we could have something like TestAppletsUtil.printFinishedMessage(); > (also was caused your listeners in previous reproducer not working). It is included here but I'm > going to fix this separately. > > > J. > From dbhole at redhat.com Mon Sep 17 12:14:22 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 17 Sep 2012 15:14:22 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 In-Reply-To: <504FAE28.5030407@redhat.com> References: <20120907213331.GE7118@redhat.com> <504F86FE.9050803@redhat.com> <20120911205305.GH6575@redhat.com> <504FAE28.5030407@redhat.com> Message-ID: <20120917191421.GH402@redhat.com> * Omair Majid [2012-09-11 17:36]: > On 09/11/2012 04:53 PM, Deepak Bhole wrote: > > * Omair Majid [2012-09-11 14:48]: > >> > On 09/07/2012 05:33 PM, Deepak Bhole wrote: > >>> > > Hi, > >>> > > > >>> > > This patch fixes PR1161: > >>> > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 > >>> > > > >>> > > As specified there, the issue is that Java 7 changed what parent class > >>> > > a trust manager needs to implement in order to correctly intercept > >>> > > issues such as CN mismatch. As a result, icedtea-web currently cannot > >>> > > load sites whose certificate has a CN mismatch (proprietary tools work > >>> > > fine in such cases). > >>> > > > >>> > > Attached patch adds support for Java 7 while maintaining compatibility > >>> > > with Java 6 (loading one trust manager for 6 and a different one for 7+). > >>> > > > >>> > > I would like to see this backported to 1.3 as well given its importance, but we > >>> > > can let it bake in HEAD for a couple of weeks. > >> > > >> > If I may make a request, when you are pushing this, could you push this > >> > as two changesets? One that deals with the JDK version problems and the > >> > other that changes the check for hostname (this patch includes both but > >> > mixes them). > >> > > > Sorry can you elaborate a bit on what you mean by that? Which are the > > JDK version problems that you are referring to? Just the autotools file > > changes? > > Oh, crap. I misread this part of the diff: > > > - > > - if (hostName == null) { > > - CNMatched = false; > > - } else { > > + if (hostName != null) { > > Without realizing the initial value of CNMatched has been changed too. > Please ignore this. > > > > >>> > > AC_MSG_RESULT(${JAVA}) > >>> > > AC_SUBST(JAVA) > >>> > > - JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` > >>> > > - case "${JAVA_VERSION}" in > >>> > > - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; > >>> > > - esac > >>> > > + JAVA_VERSION=`$JAVA -version 2>&1 | sed -n -e '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` > >> > > >> > We should try and make this regex readable at some point :) > >> > > > Ah, I agree. I don't think even I fully understand it which is why I > > kept it as is :) [Just noticed that I had an extra -e there to sed. > > While it makes no difference, I have reverted it] > > > > Thanks. The extra -e was what prompted me to verify this expression and > I couldn't get it to work outside the makefile :( > > > > >> > > >>> > > @@ -248,6 +269,42 @@ > >>> > > } > >>> > > > >>> > > /** > >>> > > + * Returns a TrustManager ideal for the running VM. > >>> > > + * > >>> > > + * @return TrustManager the trust manager to use for verifying https certificates > >>> > > + */ > >> > > >> > Some indention seems to be off here. > >> > > > Looks fine to me. Are you seeing tabs instead of spaces somewhere? > > > > I am. > * Returns a TrustManager ideal for the running VM. > ^ tab in the beginning of this line and other lines in the javadoc > comment you have quoted above. The indentation in the method itself > seems to be fine. > Doh. I can see it now. Fixed. > >>> > > + private static TrustManager getSSLSocketTrustManager() throws > >>> > > + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { > >>> > > + > >>> > > + try { > >>> > > + > >>> > > + Class trustManagerClass; > >>> > > + Constructor tmCtor = null; > >> > > >> > Perhaps it might be better to use X509TrustManager as the type argument > >> > to make thing clearer? You can chain it like > >> > Class.forName().asSubClass(X509TrustManager.class) to make the code more > >> > explicit. > >> > > >>> > > + > >>> > > + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 > >>> > > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); > >>> > > + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) > >>> > > + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); > >>> > > + } > >>> > > + > >>> > > + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); > >>> > > + tmCtor = tmCtors[0]; > >>> > > + > >>> > > + for (Constructor ctor : tmCtors) { > >>> > > + if (tmCtor.getGenericParameterTypes().length == 0) { > >>> > > + tmCtor = ctor; > >>> > > + break; > >>> > > + } > >>> > > + } > >>> > > + > >>> > > + return (TrustManager) tmCtor.newInstance(); > >>> > > + } catch (RuntimeException e) { > >>> > > + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); > >> > > >> > Is it worth i18n'ing this message? > >> > > > I thought about it but is not really a message the user can do much > > about anyway, it is more of a reference for developers as to what is > > going on. I can switch if you prefer though. > > No, that's fine. > > >> > Also, would it be better to print the "compiled with wrong jdk" message > >> > (which really indicates that the wanted class is not found") in the > >> > place where we do the jdk check? > >> > > > I think this is a better spot because not all applets will be loaded via > > https so this code will not always run and thus if we forcibly do a > > check elsewhere, we may be preventing initialization when there is no > > reason to. > > > > I just meant a few lines above. Something like: > try { > trustManagerClass = Class.forName("... VariableX509TrustManagerJDK6"); > } catch (ClassNotFoundException notFound) { > System.err.println("class ...TrustManagerJDK6 not found"); > } > > Feel free to ignore this. > Changed. > >>> > > diff -r 0db02eca94bf netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java > >>> > > --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 13:52:23 2012 +0200 > >>> > > +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:28:56 2012 -0400 > >>> > > /** > >>> > > - * Check if the server is trusted > >>> > > + * Check if the server is trusted. > >>> > > * > >>> > > * @param chain The cert chain > >>> > > * @param authType The auth type algorithm > >>> > > - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission > >>> > > + * @param hostName The expected hostName that the server should have > >>> > > + * @param socket The SSLSocket in use (may be null) > >>> > > + * @param ending The SSLEngine in use (may be null) > >>> > > */ > >>> > > - public synchronized void checkServerTrusted(X509Certificate[] chain, > >>> > > + public synchronized void checkTrustServer(X509Certificate[] chain, > >>> > > String authType, String hostName, > >>> > > - boolean checkOnly) throws CertificateException { > >>> > > + SSLSocket socket, SSLEngine engine) throws CertificateException { > >>> > > CertificateException ce = null; > >>> > > boolean trusted = true; > >>> > > - boolean CNMatched = true; > >>> > > + boolean CNMatched = false; > >>> > > > >>> > > try { > >>> > > - checkAllManagers(chain, authType); > >>> > > + checkAllManagers(chain, authType, socket, engine); > >>> > > } catch (CertificateException e) { > >>> > > trusted = false; > >>> > > ce = e; > >>> > > @@ -226,59 +214,92 @@ > >>> > > // If the certificate is not explicitly trusted, we > >>> > > // need to prompt the user > >>> > > if (!isExplicitlyTrusted(chain, authType)) { > >>> > > - > >>> > > - if (hostName == null) { > >>> > > - CNMatched = false; > >>> > > - } else { > >>> > > + if (hostName != null) { > >>> > > try { > >>> > > HostnameChecker checker = HostnameChecker > >>> > > .getInstance(HostnameChecker.TYPE_TLS); > >>> > > > >>> > > - checker.match(hostName, chain[0]); // only need to match @ 0 for > >>> > > - // CN > >>> > > + checker.match(hostName, chain[0]); // only need to match @ 0 for CN > >>> > > > >>> > > + CNMatched = true; > >>> > > } catch (CertificateException e) { > >>> > > - CNMatched = false; > >>> > > ce = e; > >>> > > } > >>> > > } > >>> > > + } else { > >>> > > + // Else it is explicitly trusted. Return here. > >>> > > + return; > >>> > > } > >> > > >> > I don't like this else block: if the code below ever adds more checks, > >> > they will be skipped. Why not let the code below handle this? > >> > > > If we let it fall down to the code below, the CN will always mismatch > > (even when cert is always trusted) and we will always end up showing a > > prompt. > > > > The Oracle plug-in does not pop up a warning once a cert is always > > trusted (even if underlying host changes). Not sure how secure that is, > > but then we don't store cert and host info so we cannot "always trust" > > for a specific host. > > > > I am not disagreeing with the logic, just pointing out that the code is > hard to follow (or maybe just the diff is), what with multiple escape > points, multiple nested if statements and throwing exceptions on > failure. Anything you can do to make it more linear? > I am looking at the patched file and though a bit convoluted, I think along with the comments it is fairly clear as to what is happening. I have added additional comments to further clarify it. Please let me know if you feel more changes are needed. > >>> > > // first try CA TrustManagers > >>> > > boolean trusted = false; > >>> > > ValidatorException savedException = null; > >>> > > for (int i = 0; i < caTrustManagers.length; i++) { > >>> > > try { > >>> > > - caTrustManagers[i].checkServerTrusted(chain, authType); > >>> > > + if (socket == null && engine == null) { > >>> > > + caTrustManagers[i].checkServerTrusted(chain, authType); > >>> > > + } else { > >>> > > + > >>> > > + try { > >>> > > + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); > >>> > > + if (engine == null) { > >>> > > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); > >>> > > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); > >>> > > + } else { > >>> > > + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); > >>> > > + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); > >>> > > + } > >>> > > + } catch (NoSuchMethodException nsme) { > >>> > > + throw new ValidatorException(nsme.getMessage()); > >>> > > + } catch (InvocationTargetException ite) { > >>> > > + throw new ValidatorException(ite.getMessage()); > >>> > > + } catch (IllegalAccessException iae) { > >>> > > + throw new ValidatorException(iae.getMessage()); > >>> > > + } catch (ClassNotFoundException cnfe) { > >>> > > + throw new ValidatorException(cnfe.getMessage()); > >>> > > + } > >>> > > + } > >>> > > + > >> > > >> > Since this is not common code, why not put it in the JDK6/7 specific class? > >> > > > Not sure I understand -- the loop and initial checkServerTrusted() call are common. > > Yeah, they are. Maybe we can avoid this reflective code some other way? > Perhaps you can make both JDK-specific TrustManager classes implement a > custom interface with a single method: > > interface ServerCheckerCallback { > void isTrusted(TrustManager,X509Certificate[],String,SSLEngine) > } > > Both the JDK-specific classes inject themselves into > VariableX509TrustManager using this interface and implement the method > to do the invoke the right JDK-version-specific thing. > > Or do you think this is too complicated? > There is already a lot of confusion with regards to interface extensions and overloaded methods, so I think avoiding additional interfaces of our own might be better if possible. If your objection if reflection is based on performance, the above code will run very rarely and only during the initial connect, so I don't think performance would suffer much. Still, I can change it you think it is better to have an additional interface though. Please let me know. > >>> > > + private void checkTrustServer(X509Certificate[] chain, > >>> > > + String authType, Socket socket, > >>> > > + SSLEngine engine) throws CertificateException { > >>> > > + > >>> > > + String hostName = null; > >>> > > + > >>> > > + if (socket != null) { > >>> > > + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); > >>> > > + } else if (engine != null) { > >>> > > + hostName = engine.getHandshakeSession().getPeerHost(); > >>> > > + } > >>> > > + > >>> > > + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); > >>> > > + } > >>> > > + > >>> > > + /** > >>> > > + * Check if the server is trusted > >> > > >> > /me looks at method name > >> > > > Intentional. check[Server|Client]Trusted are overridden whereas > > checkTrust* methods are helpers. > > > > Could you make that distinction more explicit? It's hard to tell how the > ordering implies the helper role. > Everything in VariableX509TrustManager is a helper as it does not extend any of the trust manager interfaces itself. > Besides, I meant the comment says "server is trusted" and the method > name is "checkTrust_Client_". > Ah, fixed. > >>> > > + * @param chain The cert chain > >>> > > + * @param authType The auth type algorithm > >>> > > + * @param socket the SSLSocket, if provided > >>> > > + * @param engine the SSLEngine, if provided > >>> > > + */ > >>> > > + private void checkTrustClient(X509Certificate[] chain, > >>> > > + String authType, Socket socket, > >>> > > + SSLEngine engine) throws CertificateException { > >>> > > + > >>> > > + String hostName = null; > >>> > > + > >>> > > + try { > >>> > > + if (socket != null) { > >>> > > + Method mgetHandshakeSession = SSLSocket.class.getDeclaredMethod("getHandshakeSession"); > >>> > > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(socket); > >>> > > + > >>> > > + if (session == null) { > >>> > > + throw new CertificateException("No handshake session"); > >>> > > + } > >>> > > + > >>> > > + hostName = session.getPeerHost(); > >>> > > + } else if (engine != null) { > >>> > > + Method mgetHandshakeSession = SSLEngine.class.getDeclaredMethod("getHandshakeSession"); > >>> > > + SSLSession session = (SSLSession) mgetHandshakeSession.invoke(engine); > >>> > > + > >>> > > + if (session == null) { > >>> > > + throw new CertificateException("No handshake session"); > >>> > > + } > >>> > > + > >>> > > + hostName = session.getPeerHost(); > >>> > > + } > >> > > >> > I don't see why we are using reflection here. Could you explain? > >> > > > getHandshakeSession() is new in 1.7 so it will not compile with 1.6 > > without reflection (both socket and engine will never be null for Java 6 > > so the above code will only be entered with 7). > > But the class is named VariableX509TrustManagerJDK7 and is only built > with 7, no? > Doh. I did it in the function just above it too :/ You're right, fixed now. New patch attached. Thanks, Deepak -------------- next part -------------- diff -r 439f0b1cee5c Makefile.am --- a/Makefile.am Fri Sep 07 17:06:08 2012 -0400 +++ b/Makefile.am Mon Sep 17 15:12:13 2012 -0400 @@ -348,6 +348,9 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif +if !HAVE_JAVA7 + sed -i '/VariableX509TrustManagerJDK7/ d' $@ +endif stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) diff -r 439f0b1cee5c NEWS --- a/NEWS Fri Sep 07 17:06:08 2012 -0400 +++ b/NEWS Mon Sep 17 15:12:13 2012 -0400 @@ -17,6 +17,7 @@ * Common - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered - PR955: regression: SweetHome3D fails to run + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.3 (2012-XX-XX): * NetX diff -r 439f0b1cee5c acinclude.m4 --- a/acinclude.m4 Fri Sep 07 17:06:08 2012 -0400 +++ b/acinclude.m4 Mon Sep 17 15:12:13 2012 -0400 @@ -715,9 +715,12 @@ AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` - case "${JAVA_VERSION}" in - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; - esac + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` + if ! test -z "$HAVE_JAVA7" ; then + VERSION_DEFS='-DHAVE_JAVA7' + fi + + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) AC_SUBST(VERSION_DEFS) ]) diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon Sep 17 15:12:13 2012 -0400 @@ -16,38 +16,59 @@ package net.sourceforge.jnlp.runtime; -import java.io.*; +import java.awt.EventQueue; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.net.Authenticator; import java.net.ProxySelector; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; -import java.awt.*; -import java.text.*; -import java.util.*; +import java.security.AllPermission; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.List; -import java.security.*; -import javax.jnlp.*; +import java.util.ResourceBundle; + +import javax.jnlp.ServiceManager; import javax.naming.ConfigurationException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.swing.UIManager; import javax.swing.text.html.parser.ParserDelegator; -import sun.net.www.protocol.jar.URLJarFile; - -import net.sourceforge.jnlp.*; +import net.sourceforge.jnlp.DefaultLaunchHandler; +import net.sourceforge.jnlp.GuiLaunchHandler; +import net.sourceforge.jnlp.LaunchHandler; +import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.browser.BrowserAwareProxySelector; -import net.sourceforge.jnlp.cache.*; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.DefaultDownloadIndicator; +import net.sourceforge.jnlp.cache.DownloadIndicator; +import net.sourceforge.jnlp.cache.UpdatePolicy; import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.security.JNLPAuthenticator; import net.sourceforge.jnlp.security.KeyStores; import net.sourceforge.jnlp.security.SecurityDialogMessageHandler; import net.sourceforge.jnlp.security.VariableX509TrustManager; -import net.sourceforge.jnlp.services.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.services.XServiceManagerStub; +import net.sourceforge.jnlp.util.FileUtils; +import net.sourceforge.jnlp.util.TeeOutputStream; +import sun.net.www.protocol.jar.URLJarFile; /** * Configure and access the runtime environment. This class @@ -223,7 +244,7 @@ KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, KeyStores.getPassword()); - TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() }; + TrustManager[] trust = new TrustManager[] { getSSLSocketTrustManager() }; context.init(kmf.getKeyManagers(), trust, null); sslSocketFactory = context.getSocketFactory(); @@ -248,6 +269,52 @@ } /** + * Returns a TrustManager ideal for the running VM. + * + * @return TrustManager the trust manager to use for verifying https certificates + */ + private static TrustManager getSSLSocketTrustManager() throws + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { + + try { + + Class trustManagerClass; + Constructor tmCtor = null; + + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + return null; + } + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + return null; + } + } + + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); + tmCtor = tmCtors[0]; + + for (Constructor ctor : tmCtors) { + if (tmCtor.getGenericParameterTypes().length == 0) { + tmCtor = ctor; + break; + } + } + + return (TrustManager) tmCtor.newInstance(); + } catch (RuntimeException e) { + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); + throw e; + } + } + + /** * This must NOT be called form the application ThreadGroup. An application * can inject events into its {@link EventQueue} and bypass the security * dialogs. diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Mon Sep 17 15:12:13 2012 -0400 @@ -59,7 +59,6 @@ public class HttpsCertVerifier implements CertVerifier { - private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; private String hostName; @@ -67,11 +66,9 @@ private boolean hostMatched; private ArrayList details = new ArrayList(); - public HttpsCertVerifier(VariableX509TrustManager tm, - X509Certificate[] chain, String authType, + public HttpsCertVerifier(X509Certificate[] chain, String authType, boolean isTrusted, boolean hostMatched, String hostName) { - this.tm = tm; this.chain = chain; this.authType = authType; this.hostName = hostName; diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Mon Sep 17 15:12:13 2012 -0400 @@ -37,6 +37,9 @@ package net.sourceforge.jnlp.security; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; import java.security.AccessController; import java.security.KeyStore; import java.security.PrivilegedAction; @@ -47,25 +50,24 @@ import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import sun.security.util.HostnameChecker; import sun.security.validator.ValidatorException; -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; - /** * This class implements an X509 Trust Manager. The certificates it trusts are * "variable", in the sense that it can dynamically, and temporarily support * different certificates that are not in the keystore. */ -final public class VariableX509TrustManager extends X509ExtendedTrustManager { +final public class VariableX509TrustManager { /** TrustManagers containing trusted CAs */ private X509TrustManager[] caTrustManagers = null; @@ -164,8 +166,8 @@ /** * Check if client is trusted (no support for custom here, only system/user) */ - public void checkClientTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) + public void checkTrustClient(X509Certificate[] chain, String authType, + String hostName) throws CertificateException { boolean trusted = false; @@ -186,99 +188,125 @@ throw savedException; } - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) - throws CertificateException { - checkServerTrusted(chain, authType, hostName, false); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkServerTrusted(chain, authType, null, null); - } - /** - * Check if the server is trusted + * Check if the server is trusted. + * + * First, existing stores are checked to see if the certificate is trusted. + * Next, if the certificate is not explicitly trusted by the user, a host + * name check is performed. The user is them prompted as needed. * * @param chain The cert chain * @param authType The auth type algorithm - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission + * @param hostName The expected hostName that the server should have + * @param socket The SSLSocket in use (may be null) + * @param ending The SSLEngine in use (may be null) */ - public synchronized void checkServerTrusted(X509Certificate[] chain, + public synchronized void checkTrustServer(X509Certificate[] chain, String authType, String hostName, - boolean checkOnly) throws CertificateException { + SSLSocket socket, SSLEngine engine) throws CertificateException { CertificateException ce = null; boolean trusted = true; - boolean CNMatched = true; + boolean CNMatched = false; + // Check trust stores try { - checkAllManagers(chain, authType); + checkAllManagers(chain, authType, socket, engine); } catch (CertificateException e) { trusted = false; ce = e; } // If the certificate is not explicitly trusted, we - // need to prompt the user + // check host match if (!isExplicitlyTrusted(chain, authType)) { - - if (hostName == null) { - CNMatched = false; - } else { + if (hostName != null) { try { HostnameChecker checker = HostnameChecker .getInstance(HostnameChecker.TYPE_TLS); - checker.match(hostName, chain[0]); // only need to match @ 0 for - // CN + checker.match(hostName, chain[0]); // only need to match @ 0 for CN + CNMatched = true; } catch (CertificateException e) { - CNMatched = false; ce = e; } } + } else { + // If it is explicitly trusted, just return right away. + return; } + // If it is (not explicitly trusted) AND + // ((it is not in store) OR (there is a host mismatch)) if (!trusted || !CNMatched) { - if (checkOnly) { - throw ce; - } else { - if (!isTemporarilyUntrusted(chain[0])) { - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); + if (!isTemporarilyUntrusted(chain[0])) { + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); - if (b) { - temporarilyTrust(chain[0]); - } else { - temporarilyUntrust(chain[0]); - } + if (b) { + temporarilyTrust(chain[0]); + return; + } else { + temporarilyUntrust(chain[0]); } + } - checkAllManagers(chain, authType); - } + throw ce; } } /** - * Check system, user and custom trust manager + * Check system, user and custom trust manager. + * + * This method is intended to work with both, JRE6 and JRE7. If socket + * and engine are null, it assumes that the call is for JRE6 (i.e. not + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If + * either of those are not null, it will assume that the caTrustManagers + * are javax.net.ssl.X509ExtendedTrustManager instances and will + * invoke their check methods. + * + * @param chain The certificate chain + * @param authType The authentication type + * @param socket the SSLSocket being used for the connection + * @param engine the SSLEngine being used for the connection */ - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { + // first try CA TrustManagers boolean trusted = false; ValidatorException savedException = null; for (int i = 0; i < caTrustManagers.length; i++) { try { - caTrustManagers[i].checkServerTrusted(chain, authType); + if (socket == null && engine == null) { + caTrustManagers[i].checkServerTrusted(chain, authType); + } else { + + try { + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); + if (engine == null) { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); + } else { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); + } + } catch (NoSuchMethodException nsme) { + throw new ValidatorException(nsme.getMessage()); + } catch (InvocationTargetException ite) { + throw new ValidatorException(ite.getMessage()); + } catch (IllegalAccessException iae) { + throw new ValidatorException(iae.getMessage()); + } catch (ClassNotFoundException cnfe) { + throw new ValidatorException(cnfe.getMessage()); + } + } + trusted = true; break; } catch (ValidatorException caex) { savedException = caex; } } + if (trusted) { return; } @@ -332,7 +360,7 @@ return explicitlyTrusted; } - public X509Certificate[] getAcceptedIssuers() { + protected X509Certificate[] getAcceptedIssuers() { List issuers = new ArrayList(); for (int i = 0; i < caTrustManagers.length; i++) { @@ -394,7 +422,7 @@ public Boolean run() { return SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, null, - new HttpsCertVerifier(trustManager, chain, authType, + new HttpsCertVerifier(chain, authType, isTrusted, hostMatched, hostName)); } diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Mon Sep 17 15:12:13 2012 -0400 @@ -0,0 +1,75 @@ +/* VariableX509TrustManagerJDK6.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK6 extends X509ExtendedTrustManager { + + private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + checkClientTrusted(chain, authType, null, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, hostname); // We don't need algorithm, we will always use this for TLS only + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, String hostname, String algorithm) throws CertificateException { + // We don't need to pass algorithm, we will always use this for TLS only + vX509TM.checkTrustServer(chain, authType, hostname, null /* socket */, null /* engine */); + } + +} diff -r 439f0b1cee5c netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java Mon Sep 17 15:12:13 2012 -0400 @@ -0,0 +1,136 @@ +/* VariableX509TrustManagerJDK7.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ + +package net.sourceforge.jnlp.security; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSession; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.X509ExtendedTrustManager; + +public class VariableX509TrustManagerJDK7 extends X509ExtendedTrustManager { + + private VariableX509TrustManager vX509TM = VariableX509TrustManager.getInstance(); + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustClient(chain, authType, null /* hostname*/); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + vX509TM.checkTrustServer(chain, authType, null /* hostname*/, null /* socket */, null /* engine */); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return vX509TM.getAcceptedIssuers(); + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustClient(chain, authType, socket, null); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, Socket socket) throws CertificateException { + checkTrustServer(chain, authType, socket, null); + + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustClient(chain, authType, null, engine); + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType, SSLEngine engine) throws CertificateException { + checkTrustServer(chain, authType, null, engine); + } + + /** + * Check if the server is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, may be null + * @param engine the SSLEngine, may be null + */ + private void checkTrustServer(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + if (socket != null) { + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); + } else if (engine != null) { + hostName = engine.getHandshakeSession().getPeerHost(); + } + + vX509TM.checkTrustServer(chain, authType, hostName, (SSLSocket) socket, engine); + } + + /** + * Check if the client is trusted + * + * @param chain The cert chain + * @param authType The auth type algorithm + * @param socket the SSLSocket, if provided + * @param engine the SSLEngine, if provided + */ + private void checkTrustClient(X509Certificate[] chain, + String authType, Socket socket, + SSLEngine engine) throws CertificateException { + + String hostName = null; + + if (socket != null) { + hostName = ((SSLSocket) socket).getHandshakeSession().getPeerHost(); + } else if (engine != null) { + hostName = engine.getHandshakeSession().getPeerHost(); + } + + vX509TM.checkTrustClient(chain, authType, hostName); + } +} From adomurad at redhat.com Mon Sep 17 12:31:54 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 17 Sep 2012 15:31:54 -0400 Subject: [RFC][icedtea-web] Fixes for PluginAppletSecurityContext In-Reply-To: <1346183396.19536.107.camel@voip-10-15-18-79.yyz.redhat.com> References: <1344579091.5003.7.camel@localhost.localdomain> <1344625632.17512.34.camel@voip-10-15-18-79.yyz.redhat.com> <1345388357.9167.3.camel@localhost.localdomain> <1346183396.19536.107.camel@voip-10-15-18-79.yyz.redhat.com> Message-ID: <1347910314.17468.34.camel@adomurad-desktop> On Tue, 2012-08-28 at 15:49 -0400, Adam Domurad wrote: > On Sun, 2012-08-19 at 16:59 +0200, Thomas Meyer wrote: > > Am Freitag, den 10.08.2012, 15:07 -0400 schrieb Adam Domurad: > > > > Hi, > > > > > > + private static class Signature { > > > Good change. Multiple classes per file at top level is a rather obscure > > > java feature. > > > > + private final String signature; > > > > + private final List> typeList; > > [...] > > > I'm going to have to take your word that this class is identical to what > > > it was before ? I skimmed it and it looked OK. > > > > I did test the parsing of the JNI signatures which are prepopulated via > > prePopulateLCClasses(). Sadly these signatures contains no arrays. So > > somebody should test JNI signatures containing arrays... > > > > > > > > > + private static class BrowserReadPermission extends > > > > BasicPermission { > > > > public BrowserReadPermission() { > > > > super("browserRead"); > > > > } > > > > diff -r caefdb0bc90a plugin/icedteanp/java/sun/applet/PluginMain.java > > > > --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Thu Aug 09 > > > > 20:14:53 2012 +0200 > > > > +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Thu Aug 09 > > > > 20:57:20 2012 +0200 > > > > @@ -106,9 +106,7 @@ > > > > // must be called before JNLPRuntime.initialize() > > > > JNLPRuntime.setRedirectStreams(redirectStreams); > > > > > > > > - PluginAppletSecurityContext sc = new > > > > PluginAppletSecurityContext(0); > > > > - sc.prePopulateLCClasses(); > > > > - > > > > PluginAppletSecurityContext.setStreamhandler(streamHandler); > > > > + PluginAppletSecurityContext sc = new > > > > PluginAppletSecurityContext(0, streamHandler); > > > > AppletSecurityContextManager.addContext(0, sc); > > > > > > > > PluginAppletViewer.setStreamhandler(streamHandler); > > > > > > > > > > Overall looks good! Definitely worth having. I very much like changes > > > like this. In addition to my nits, needs a ChangeLog before being > > > push-ready, though. > > > > Update patch attached. > > > > with kind regards > > thomas > > Sorry for the delay, thanks for the update! OK for HEAD from me. > - Adam > > Ping. I did not see this committed and don't want it to become lost, it was a good changeset. I can commit it under your name if need be. - Adam From omajid at redhat.com Mon Sep 17 12:30:33 2012 From: omajid at redhat.com (Omair Majid) Date: Mon, 17 Sep 2012 15:30:33 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 In-Reply-To: <20120917191421.GH402@redhat.com> References: <20120907213331.GE7118@redhat.com> <504F86FE.9050803@redhat.com> <20120911205305.GH6575@redhat.com> <504FAE28.5030407@redhat.com> <20120917191421.GH402@redhat.com> Message-ID: <50577A59.20305@redhat.com> On 09/17/2012 03:14 PM, Deepak Bhole wrote: > New patch attached. Looks fine to me. Cheers, Omair From dbhole at icedtea.classpath.org Mon Sep 17 13:40:31 2012 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Mon, 17 Sep 2012 20:40:31 +0000 Subject: /hg/icedtea-web: PR1161: X509VariableTrustManager does not work ... Message-ID: changeset 9d46cc3428eb in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9d46cc3428eb author: Deepak Bhole date: Mon Sep 17 16:40:25 2012 -0400 PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 diffstat: ChangeLog | 30 ++ Makefile.am | 3 + NEWS | 1 + acinclude.m4 | 9 +- netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 93 +++++- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 5 +- netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java | 138 ++++++--- netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java | 75 +++++ netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java | 136 +++++++++ 9 files changed, 415 insertions(+), 75 deletions(-) diffs (truncated from 704 to 500 lines): diff -r 439f0b1cee5c -r 9d46cc3428eb ChangeLog --- a/ChangeLog Fri Sep 07 17:06:08 2012 -0400 +++ b/ChangeLog Mon Sep 17 16:40:25 2012 -0400 @@ -1,3 +1,33 @@ +2012-09-17 Deepak Bhole + + PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 + * Makefile.am: If building with JDK 6, don't build + VariableX509TrustManagerJDK7. + * NEWS: Updated. + * acinclude.m4: In addition to setting VERSION_DEFS, also set HAVE_JAVA7 + if building with JDK7. + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Use new + getSSLSocketTrustManager() method to get the trust manager. + (getSSLSocketTrustManager): New method. Depending on runtime JRE version, + returns the appropriate trust manager. + * netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Removed + unused tm variable. + * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java: No + longer extends com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager. + (checkClientTrusted): Renamed to checkTrustClient and removed overloaded + implementations. + (checkServerTrusted): Renamed to checkTrustServer. Also, modified to + accept socket and engine (may be null). Assume that CN is mismatched by + default, rather than matched. If explicitly trusted, bypass other checks, + including CN mismatch. + (checkAllManagers): Modified to accept socket and engine. Modified to work + for both JDK6 and JDK7. + (getAcceptedIssuers): Make protected (called by others in package). + * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java: + New class -- X509TrustManager for JDK6. + * netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK7.java: + New class -- X509TrustManager for JDK7. + 2012-09-07 Saad Mohammad Added signed jnlp tests for applications with multiple jar resources. diff -r 439f0b1cee5c -r 9d46cc3428eb Makefile.am --- a/Makefile.am Fri Sep 07 17:06:08 2012 -0400 +++ b/Makefile.am Mon Sep 17 16:40:25 2012 -0400 @@ -348,6 +348,9 @@ if !WITH_RHINO sed -i '/RhinoBasedPacEvaluator/ d' $@ endif +if !HAVE_JAVA7 + sed -i '/VariableX509TrustManagerJDK7/ d' $@ +endif stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp mkdir -p $(NETX_DIR) diff -r 439f0b1cee5c -r 9d46cc3428eb NEWS --- a/NEWS Fri Sep 07 17:06:08 2012 -0400 +++ b/NEWS Mon Sep 17 16:40:25 2012 -0400 @@ -17,6 +17,7 @@ * Common - PR1049: Extension jnlp's signed jar with the content of only META-INF/* is considered - PR955: regression: SweetHome3D fails to run + - PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 New in release 1.3 (2012-XX-XX): * NetX diff -r 439f0b1cee5c -r 9d46cc3428eb acinclude.m4 --- a/acinclude.m4 Fri Sep 07 17:06:08 2012 -0400 +++ b/acinclude.m4 Mon Sep 17 16:40:25 2012 -0400 @@ -715,9 +715,12 @@ AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) JAVA_VERSION=`$JAVA -version 2>&1 | sed -n '1s/@<:@^"@:>@*"\(.*\)"$/\1/p'` - case "${JAVA_VERSION}" in - 1.7*) VERSION_DEFS='-DHAVE_JAVA7';; - esac + HAVE_JAVA7=`echo $JAVA_VERSION | awk '{if ($(0) >= 1.7) print "yes"}'` + if ! test -z "$HAVE_JAVA7" ; then + VERSION_DEFS='-DHAVE_JAVA7' + fi + + AM_CONDITIONAL([HAVE_JAVA7], test x"${HAVE_JAVA7}" = "xyes" ) AC_SUBST(VERSION_DEFS) ]) diff -r 439f0b1cee5c -r 9d46cc3428eb netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon Sep 17 16:40:25 2012 -0400 @@ -16,38 +16,59 @@ package net.sourceforge.jnlp.runtime; -import java.io.*; +import java.awt.EventQueue; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.PrintStream; +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.lang.reflect.InvocationTargetException; import java.net.Authenticator; import java.net.ProxySelector; import java.nio.channels.FileChannel; import java.nio.channels.FileLock; -import java.awt.*; -import java.text.*; -import java.util.*; +import java.security.AllPermission; +import java.security.KeyStore; +import java.security.Policy; +import java.security.Security; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.text.MessageFormat; import java.util.List; -import java.security.*; -import javax.jnlp.*; +import java.util.ResourceBundle; + +import javax.jnlp.ServiceManager; import javax.naming.ConfigurationException; import javax.net.ssl.HttpsURLConnection; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.swing.UIManager; import javax.swing.text.html.parser.ParserDelegator; -import sun.net.www.protocol.jar.URLJarFile; - -import net.sourceforge.jnlp.*; +import net.sourceforge.jnlp.DefaultLaunchHandler; +import net.sourceforge.jnlp.GuiLaunchHandler; +import net.sourceforge.jnlp.LaunchHandler; +import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.browser.BrowserAwareProxySelector; -import net.sourceforge.jnlp.cache.*; +import net.sourceforge.jnlp.cache.CacheUtil; +import net.sourceforge.jnlp.cache.DefaultDownloadIndicator; +import net.sourceforge.jnlp.cache.DownloadIndicator; +import net.sourceforge.jnlp.cache.UpdatePolicy; import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.security.JNLPAuthenticator; import net.sourceforge.jnlp.security.KeyStores; import net.sourceforge.jnlp.security.SecurityDialogMessageHandler; import net.sourceforge.jnlp.security.VariableX509TrustManager; -import net.sourceforge.jnlp.services.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.services.XServiceManagerStub; +import net.sourceforge.jnlp.util.FileUtils; +import net.sourceforge.jnlp.util.TeeOutputStream; +import sun.net.www.protocol.jar.URLJarFile; /** * Configure and access the runtime environment. This class @@ -223,7 +244,7 @@ KeyStore ks = KeyStores.getKeyStore(KeyStores.Level.USER, KeyStores.Type.CLIENT_CERTS); KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509"); kmf.init(ks, KeyStores.getPassword()); - TrustManager[] trust = new TrustManager[] { VariableX509TrustManager.getInstance() }; + TrustManager[] trust = new TrustManager[] { getSSLSocketTrustManager() }; context.init(kmf.getKeyManagers(), trust, null); sslSocketFactory = context.getSocketFactory(); @@ -248,6 +269,52 @@ } /** + * Returns a TrustManager ideal for the running VM. + * + * @return TrustManager the trust manager to use for verifying https certificates + */ + private static TrustManager getSSLSocketTrustManager() throws + ClassNotFoundException, IllegalAccessException, InstantiationException, InvocationTargetException { + + try { + + Class trustManagerClass; + Constructor tmCtor = null; + + if (System.getProperty("java.version").startsWith("1.6")) { // Java 6 + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK6"); + return null; + } + } else { // Java 7 or more (technically could be <= 1.5 but <= 1.5 is unsupported) + try { + trustManagerClass = Class.forName("net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + } catch (ClassNotFoundException cnfe) { + System.err.println("Unable to find class net.sourceforge.jnlp.security.VariableX509TrustManagerJDK7"); + return null; + } + } + + Constructor[] tmCtors = trustManagerClass.getDeclaredConstructors(); + tmCtor = tmCtors[0]; + + for (Constructor ctor : tmCtors) { + if (tmCtor.getGenericParameterTypes().length == 0) { + tmCtor = ctor; + break; + } + } + + return (TrustManager) tmCtor.newInstance(); + } catch (RuntimeException e) { + System.err.println("Unable to load JDK-specific TrustManager. Was this version of IcedTea-Web compiled with JDK6?"); + throw e; + } + } + + /** * This must NOT be called form the application ThreadGroup. An application * can inject events into its {@link EventQueue} and bypass the security * dialogs. diff -r 439f0b1cee5c -r 9d46cc3428eb netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Mon Sep 17 16:40:25 2012 -0400 @@ -59,7 +59,6 @@ public class HttpsCertVerifier implements CertVerifier { - private VariableX509TrustManager tm; private X509Certificate[] chain; private String authType; private String hostName; @@ -67,11 +66,9 @@ private boolean hostMatched; private ArrayList details = new ArrayList(); - public HttpsCertVerifier(VariableX509TrustManager tm, - X509Certificate[] chain, String authType, + public HttpsCertVerifier(X509Certificate[] chain, String authType, boolean isTrusted, boolean hostMatched, String hostName) { - this.tm = tm; this.chain = chain; this.authType = authType; this.hostName = hostName; diff -r 439f0b1cee5c -r 9d46cc3428eb netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java --- a/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Fri Sep 07 17:06:08 2012 -0400 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java Mon Sep 17 16:40:25 2012 -0400 @@ -37,6 +37,9 @@ package net.sourceforge.jnlp.security; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.Socket; import java.security.AccessController; import java.security.KeyStore; import java.security.PrivilegedAction; @@ -47,25 +50,24 @@ import java.util.Arrays; import java.util.List; +import javax.net.ssl.SSLEngine; +import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; +import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import sun.security.util.HostnameChecker; import sun.security.validator.ValidatorException; -import com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager; -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; - /** * This class implements an X509 Trust Manager. The certificates it trusts are * "variable", in the sense that it can dynamically, and temporarily support * different certificates that are not in the keystore. */ -final public class VariableX509TrustManager extends X509ExtendedTrustManager { +final public class VariableX509TrustManager { /** TrustManagers containing trusted CAs */ private X509TrustManager[] caTrustManagers = null; @@ -164,8 +166,8 @@ /** * Check if client is trusted (no support for custom here, only system/user) */ - public void checkClientTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) + public void checkTrustClient(X509Certificate[] chain, String authType, + String hostName) throws CertificateException { boolean trusted = false; @@ -186,99 +188,125 @@ throw savedException; } - public void checkClientTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkClientTrusted(chain, authType, null, null); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType, - String hostName, String algorithm) - throws CertificateException { - checkServerTrusted(chain, authType, hostName, false); - } - - public void checkServerTrusted(X509Certificate[] chain, String authType) - throws CertificateException { - checkServerTrusted(chain, authType, null, null); - } - /** - * Check if the server is trusted + * Check if the server is trusted. + * + * First, existing stores are checked to see if the certificate is trusted. + * Next, if the certificate is not explicitly trusted by the user, a host + * name check is performed. The user is them prompted as needed. * * @param chain The cert chain * @param authType The auth type algorithm - * @param checkOnly Whether to "check only" i.e. no user prompt, or to prompt for permission + * @param hostName The expected hostName that the server should have + * @param socket The SSLSocket in use (may be null) + * @param ending The SSLEngine in use (may be null) */ - public synchronized void checkServerTrusted(X509Certificate[] chain, + public synchronized void checkTrustServer(X509Certificate[] chain, String authType, String hostName, - boolean checkOnly) throws CertificateException { + SSLSocket socket, SSLEngine engine) throws CertificateException { CertificateException ce = null; boolean trusted = true; - boolean CNMatched = true; + boolean CNMatched = false; + // Check trust stores try { - checkAllManagers(chain, authType); + checkAllManagers(chain, authType, socket, engine); } catch (CertificateException e) { trusted = false; ce = e; } // If the certificate is not explicitly trusted, we - // need to prompt the user + // check host match if (!isExplicitlyTrusted(chain, authType)) { - - if (hostName == null) { - CNMatched = false; - } else { + if (hostName != null) { try { HostnameChecker checker = HostnameChecker .getInstance(HostnameChecker.TYPE_TLS); - checker.match(hostName, chain[0]); // only need to match @ 0 for - // CN + checker.match(hostName, chain[0]); // only need to match @ 0 for CN + CNMatched = true; } catch (CertificateException e) { - CNMatched = false; ce = e; } } + } else { + // If it is explicitly trusted, just return right away. + return; } + // If it is (not explicitly trusted) AND + // ((it is not in store) OR (there is a host mismatch)) if (!trusted || !CNMatched) { - if (checkOnly) { - throw ce; - } else { - if (!isTemporarilyUntrusted(chain[0])) { - boolean b = askUser(chain, authType, trusted, CNMatched, hostName); + if (!isTemporarilyUntrusted(chain[0])) { + boolean b = askUser(chain, authType, trusted, CNMatched, hostName); - if (b) { - temporarilyTrust(chain[0]); - } else { - temporarilyUntrust(chain[0]); - } + if (b) { + temporarilyTrust(chain[0]); + return; + } else { + temporarilyUntrust(chain[0]); } + } - checkAllManagers(chain, authType); - } + throw ce; } } /** - * Check system, user and custom trust manager + * Check system, user and custom trust manager. + * + * This method is intended to work with both, JRE6 and JRE7. If socket + * and engine are null, it assumes that the call is for JRE6 (i.e. not + * javax.net.ssl.X509ExtendedTrustManager which is Java 7 specific). If + * either of those are not null, it will assume that the caTrustManagers + * are javax.net.ssl.X509ExtendedTrustManager instances and will + * invoke their check methods. + * + * @param chain The certificate chain + * @param authType The authentication type + * @param socket the SSLSocket being used for the connection + * @param engine the SSLEngine being used for the connection */ - private void checkAllManagers(X509Certificate[] chain, String authType) throws CertificateException { + private void checkAllManagers(X509Certificate[] chain, String authType, Socket socket, SSLEngine engine) throws CertificateException { + // first try CA TrustManagers boolean trusted = false; ValidatorException savedException = null; for (int i = 0; i < caTrustManagers.length; i++) { try { - caTrustManagers[i].checkServerTrusted(chain, authType); + if (socket == null && engine == null) { + caTrustManagers[i].checkServerTrusted(chain, authType); + } else { + + try { + Class x509ETMClass = Class.forName("javax.net.ssl.X509ExtendedTrustManager"); + if (engine == null) { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, Socket.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, socket); + } else { + Method mcheckServerTrusted = x509ETMClass.getDeclaredMethod("checkServerTrusted", X509Certificate[].class, String.class, SSLEngine.class); + mcheckServerTrusted.invoke(caTrustManagers[i], chain, authType, engine); + } + } catch (NoSuchMethodException nsme) { + throw new ValidatorException(nsme.getMessage()); + } catch (InvocationTargetException ite) { + throw new ValidatorException(ite.getMessage()); + } catch (IllegalAccessException iae) { + throw new ValidatorException(iae.getMessage()); + } catch (ClassNotFoundException cnfe) { + throw new ValidatorException(cnfe.getMessage()); + } + } + trusted = true; break; } catch (ValidatorException caex) { savedException = caex; } } + if (trusted) { return; } @@ -332,7 +360,7 @@ return explicitlyTrusted; } - public X509Certificate[] getAcceptedIssuers() { + protected X509Certificate[] getAcceptedIssuers() { List issuers = new ArrayList(); for (int i = 0; i < caTrustManagers.length; i++) { @@ -394,7 +422,7 @@ public Boolean run() { return SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, null, - new HttpsCertVerifier(trustManager, chain, authType, + new HttpsCertVerifier(chain, authType, isTrusted, hostMatched, hostName)); } diff -r 439f0b1cee5c -r 9d46cc3428eb netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/VariableX509TrustManagerJDK6.java Mon Sep 17 16:40:25 2012 -0400 @@ -0,0 +1,75 @@ +/* VariableX509TrustManagerJDK6.java + Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of From dbhole at redhat.com Mon Sep 17 13:41:40 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 17 Sep 2012 16:41:40 -0400 Subject: RFC: Fix for PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 In-Reply-To: <50577A59.20305@redhat.com> References: <20120907213331.GE7118@redhat.com> <504F86FE.9050803@redhat.com> <20120911205305.GH6575@redhat.com> <504FAE28.5030407@redhat.com> <20120917191421.GH402@redhat.com> <50577A59.20305@redhat.com> Message-ID: <20120917204140.GN402@redhat.com> * Omair Majid [2012-09-17 15:33]: > On 09/17/2012 03:14 PM, Deepak Bhole wrote: > > New patch attached. > > Looks fine to me. > Thanks! Pushed: http://icedtea.classpath.org/hg/icedtea-web/rev/9d46cc3428eb Cheers, Deepak From ptisnovs at icedtea.classpath.org Tue Sep 18 04:57:30 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 18 Sep 2012 11:57:30 +0000 Subject: /hg/gfx-test: Added helper methods for rendering cropped images.... Message-ID: changeset 69fc6f9b7bb7 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=69fc6f9b7bb7 author: Pavel Tisnovsky date: Tue Sep 18 14:00:08 2012 +0200 Added helper methods for rendering cropped images. Those method are to be used by various tests. diffstat: ChangeLog | 6 + src/org/gfxtest/framework/CommonBitmapOperations.java | 412 +++++++++++++++-- 2 files changed, 370 insertions(+), 48 deletions(-) diffs (truncated from 780 to 500 lines): diff -r 4fdd5848ee80 -r 69fc6f9b7bb7 ChangeLog --- a/ChangeLog Mon Sep 17 10:23:43 2012 +0200 +++ b/ChangeLog Tue Sep 18 14:00:08 2012 +0200 @@ -1,3 +1,9 @@ +2012-09-18 Pavel Tisnovsky + + * src/org/gfxtest/framework/CommonBitmapOperations.java: + Added helper methods for rendering cropped images. Those + method are to be used by various tests. + 2012-09-17 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltScaleImage.java: diff -r 4fdd5848ee80 -r 69fc6f9b7bb7 src/org/gfxtest/framework/CommonBitmapOperations.java --- a/src/org/gfxtest/framework/CommonBitmapOperations.java Mon Sep 17 10:23:43 2012 +0200 +++ b/src/org/gfxtest/framework/CommonBitmapOperations.java Tue Sep 18 14:00:08 2012 +0200 @@ -41,8 +41,16 @@ package org.gfxtest.framework; import java.awt.Graphics2D; +import java.awt.Rectangle; import java.awt.image.BufferedImage; + + +/** + * This class contains various bitmap operations used by some gfx tests. + * + * @author Pavel Tisnovsky + */ public class CommonBitmapOperations { /** @@ -61,7 +69,8 @@ public final static int DEFAULT_TEST_IMAGE_HEIGHT = 256; /** - * Performs BitBlt operation. + * Performs basic BitBlt operation for given source and destination image. + * No mirroring, scaling and/or clipping are performed during BitBlt. * * @param sourceImage * source image for BitBlt @@ -81,7 +90,8 @@ } /** - * Performs BitBlt operation. + * Performs BitBlt operation for given source and destination image. Scaling + * are performed according to parameters width and height. * * @param sourceImage * source image for BitBlt @@ -90,7 +100,9 @@ * @param graphics2d * instance of class used during rendering * @param width + * width of the destination region * @param height + * height of the destination region * @return if the image has completely loaded and its pixels are no longer * being changed, then returns true. Otherwise, returns false */ @@ -103,7 +115,9 @@ } /** - * Performs BitBlt operation. + * Performs BitBlt operation for given source and destination image. + * Horizontal and/or vertical flipping/mirroring are performed according to + * parameters horizontalFlip and verticalFlip. * * @param sourceImage * source image for BitBlt @@ -137,6 +151,39 @@ } /** + * Performs BitBlt operation for given source and destination image. + * Cropping is used according to parameter cropRegion. + * + * @param sourceImage + * source image for BitBlt + * @param destinationImage + * destination image for BitBlt graphics canvas + * @param graphics2d + * instance of class used during rendering + * @param cropRegion + * region used to crop part of the image + * @return if the image has completely loaded and its pixels are no longer + * being changed, then returns true. Otherwise, returns false + */ + private static boolean performBitBlt(BufferedImage sourceImage, TestImage destinationImage, Graphics2D graphics2d, + Rectangle cropRegion) + { + // compute top-left corner coordinates of destination image + final int dx1 = (destinationImage.getWidth() - DEFAULT_TEST_IMAGE_WIDTH) >> 1; + final int dy1 = (destinationImage.getHeight() - DEFAULT_TEST_IMAGE_HEIGHT) >> 1; + // compute bottom-right corner coordinates of destination image + final int dx2 = dx1 + cropRegion.width; + final int dy2 = dy1 + cropRegion.height; + // compute top-left corner coordinates of source image + final int sx1 = cropRegion.x; + final int sy1 = cropRegion.y; + // compute bottom-right corner coordinates of source image + final int sx2 = sx1 + cropRegion.width; + final int sy2 = sy1 + cropRegion.height; + return graphics2d.drawImage(sourceImage, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2, null); + } + + /** * Create buffered bitmap with given type. * * @param type @@ -160,13 +207,15 @@ */ public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType) { + // create new buffered bitmap with given type + // bitmap should be empty - solid color pixels BufferedImage bufferedImage = createBufferedBitmap(imageType); // basic check if buffered image was created if (bufferedImage == null) { return TestResult.FAILED; } - // BitBlt with 1:1 scaling + // BitBlt with 1:1 scaling, no flipping and no cropping return performBitBlt(bufferedImage, image, graphics2d) ? TestResult.PASSED : TestResult.FAILED; } @@ -186,6 +235,8 @@ */ public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height) { + // create new buffered bitmap with given type + // bitmap should be empty - solid color pixels BufferedImage bufferedImage = createBufferedBitmap(imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -213,6 +264,8 @@ public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType, boolean horizontalFlip, boolean verticalFlip) { + // create new buffered bitmap with given type + // bitmap should be empty - solid color pixels BufferedImage bufferedImage = createBufferedBitmap(imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -224,6 +277,33 @@ } /** + * Create new buffered image and then perform basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param cropRegion + * region in the image to crop + */ + public static TestResult doBitBltTestWithEmptyImage(TestImage image, Graphics2D graphics2d, int imageType, + Rectangle cropRegion) + { + // create new buffered bitmap with given type + // bitmap should be empty - solid color pixels + BufferedImage bufferedImage = createBufferedBitmap(imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with 1:1 scaling and cropping + return performBitBlt(bufferedImage, image, graphics2d, cropRegion) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing checker pattern and then perform basic BitBlt test. * * @param image @@ -235,7 +315,8 @@ */ public static TestResult doBitBltTestWithCheckerImage(TestImage image, Graphics2D graphics2d, int imageType) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains checker pattern BufferedImage bufferedImage = ImageFactory.createCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -262,7 +343,8 @@ */ public static TestResult doBitBltTestWithCheckerImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains checker pattern BufferedImage bufferedImage = ImageFactory.createCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -291,7 +373,8 @@ public static TestResult doBitBltTestWithCheckerImage(TestImage image, Graphics2D graphics2d, int imageType, boolean horizontalFlip, boolean verticalFlip) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains checker pattern BufferedImage bufferedImage = ImageFactory.createCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -303,6 +386,34 @@ } /** + * Create new buffered image containing checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param cropRegion + * region in the image to crop + */ + public static TestResult doBitBltTestWithCheckerImage(TestImage image, Graphics2D graphics2d, int imageType, + Rectangle cropRegion) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with 1:1 scaling and cropping + return performBitBlt(bufferedImage, image, graphics2d, cropRegion) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing diagonal checker pattern and then perform basic BitBlt test. * * @param image @@ -314,7 +425,8 @@ */ public static TestResult doBitBltTestWithDiagonalCheckerImage(TestImage image, Graphics2D graphics2d, int imageType) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains diagonal checker pattern BufferedImage bufferedImage = ImageFactory.createDiagonalCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -341,7 +453,8 @@ */ public static TestResult doBitBltTestWithDiagonalCheckerImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains diagonal checker pattern BufferedImage bufferedImage = ImageFactory.createDiagonalCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -353,6 +466,64 @@ } /** + * Create new buffered image containing diagonal checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param horizontalFlip + * enables performing horizontal flip of image + * @param verticalFlip + * enables performing vertical flip of image + */ + public static TestResult doBitBltTestWithDiagonalCheckerImage(TestImage image, Graphics2D graphics2d, int imageType, + boolean horizontalFlip, boolean verticalFlip) + { + // create new buffered bitmap with given type + // bitmap should contains diagonal checker pattern + BufferedImage bufferedImage = ImageFactory.createDiagonalCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with custom scaling + return performBitBlt(bufferedImage, image, graphics2d, horizontalFlip, verticalFlip) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image containing diagonal checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param cropRegion + * region in the image to crop + */ + public static TestResult doBitBltTestWithDiagonalCheckerImage(TestImage image, Graphics2D graphics2d, int imageType, + Rectangle cropRegion) + { + // create new buffered bitmap with given type + // bitmap should contains diagonal checker pattern + BufferedImage bufferedImage = ImageFactory.createDiagonalCheckerImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with 1:1 scaling and cropping + return performBitBlt(bufferedImage, image, graphics2d, cropRegion) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing grid pattern and then perform basic BitBlt test. * * @param image @@ -364,7 +535,8 @@ */ public static TestResult doBitBltTestWithGridImage(TestImage image, Graphics2D graphics2d, int imageType) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains grid pattern BufferedImage bufferedImage = ImageFactory.createGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -391,7 +563,8 @@ */ public static TestResult doBitBltTestWithGridImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains grid pattern BufferedImage bufferedImage = ImageFactory.createGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -403,6 +576,64 @@ } /** + * Create new buffered image containing diagonal checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param horizontalFlip + * enables performing horizontal flip of image + * @param verticalFlip + * enables performing vertical flip of image + */ + public static TestResult doBitBltTestWithGridImage(TestImage image, Graphics2D graphics2d, int imageType, + boolean horizontalFlip, boolean verticalFlip) + { + // create new buffered bitmap with given type + // bitmap should contains grid pattern + BufferedImage bufferedImage = ImageFactory.createGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with custom scaling + return performBitBlt(bufferedImage, image, graphics2d, horizontalFlip, verticalFlip) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image containing diagonal checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param cropRegion + * region in the image to crop + */ + public static TestResult doBitBltTestWithGridImage(TestImage image, Graphics2D graphics2d, int imageType, + Rectangle cropRegion) + { + // create new buffered bitmap with given type + // bitmap should contains grid pattern + BufferedImage bufferedImage = ImageFactory.createGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with 1:1 scaling and cropping + return performBitBlt(bufferedImage, image, graphics2d, cropRegion) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing diagonal grid pattern and then perform basic BitBlt test. * * @param image @@ -414,7 +645,8 @@ */ public static TestResult doBitBltTestWithDiagonalGridImage(TestImage image, Graphics2D graphics2d, int imageType) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains diagonal grid pattern BufferedImage bufferedImage = ImageFactory.createDiagonalGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -441,7 +673,8 @@ */ public static TestResult doBitBltTestWithDiagonalGridImage(TestImage image, Graphics2D graphics2d, int imageType, int width, int height) { - // create image with given pattern + // create new buffered bitmap with given type + // bitmap should contains diagonal grid pattern BufferedImage bufferedImage = ImageFactory.createDiagonalGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); // basic check if buffered image was created if (bufferedImage == null) @@ -453,6 +686,64 @@ } /** + * Create new buffered image containing diagonal checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param horizontalFlip + * enables performing horizontal flip of image + * @param verticalFlip + * enables performing vertical flip of image + */ + public static TestResult doBitBltTestWithDiagonalGridImage(TestImage image, Graphics2D graphics2d, int imageType, + boolean horizontalFlip, boolean verticalFlip) + { + // create new buffered bitmap with given type + // bitmap should contains diagonal grid pattern + BufferedImage bufferedImage = ImageFactory.createDiagonalGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with custom scaling + return performBitBlt(bufferedImage, image, graphics2d, horizontalFlip, verticalFlip) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image containing diagonal checker pattern and then perform + * basic BitBlt test. + * + * @param image + * image to which another image is to be drawn + * @param graphics2d + * graphics canvas + * @param imageType + * type of the created image + * @param cropRegion + * region in the image to crop + */ + public static TestResult doBitBltTestWithDiagonalGridImage(TestImage image, Graphics2D graphics2d, int imageType, + Rectangle cropRegion) + { + // create new buffered bitmap with given type + // bitmap should contains diagonal grid pattern + BufferedImage bufferedImage = ImageFactory.createDiagonalGridImage(GRID_SIZE, DEFAULT_TEST_IMAGE_WIDTH, DEFAULT_TEST_IMAGE_HEIGHT, imageType); + // basic check if buffered image was created + if (bufferedImage == null) + { + return TestResult.FAILED; + } + // BitBlt with 1:1 scaling and cropping + return performBitBlt(bufferedImage, image, graphics2d, cropRegion) ? TestResult.PASSED : TestResult.FAILED; + } + + /** From bugzilla-daemon at icedtea.classpath.org Tue Sep 18 07:00:20 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 18 Sep 2012 14:00:20 +0000 Subject: [Bug 1112] Main class from signed jar's INDEX.LIST fails to load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1112 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Adam Domurad --- Sorry, would have responded sooner if I noticed your posting earlier. The issue is understood and I have a patch that 'fixes' it, but it's too much of a change of how things are done to be comfortably added (yet). The issue essentially is, icedtea-web has a phase where it goes through every jar it knows of and checks if the specified main-class is in that jar. Because icedtea-web does not currently check jars that are loaded only through a jar's INDEX.LIST, it overlooks that the main class actually exists and fatally errors saying it doesn't. (My aforementioned patch skips this logic more or less and tries to load the class anyway) There are several things that can be done. The simplest (not requiring the jars to be modified) is to add the jar that has the main class to the archive parameter. AFAICS all you would need to do is make the archive parameter this: archive="EditorApplet_files/jchempaint-applet-editor.jar,EditorApplet_files/jchempaint-applet-core.jar" Thanks for your interest in making your applet icedtea-web compatible! The general rule of thumb is to use the core features, whereas loading classes solely through the META-INF/ folder is a bit of a more obscure feature. We're working hard to track down all these corner cases but there are a lot of them. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120918/a6dd4735/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 18 07:24:44 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 18 Sep 2012 14:24:44 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dbhole at redhat.com Depends on| |1161 Assignee|adomurad at redhat.com |dbhole at redhat.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120918/2efaa9bd/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 18 07:26:14 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 18 Sep 2012 14:26:14 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 Bug 1122 depends on bug 1161, which changed state. Bug 1161 Summary: X509VariableTrustManager does not work correctly with OpenJDK7 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1161 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120918/f8e6f5b6/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 18 07:26:20 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 18 Sep 2012 14:26:20 +0000 Subject: [Bug 1122] Applets hosted on https:// always give security warning about HTTPS certificate In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1122 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Deepak Bhole --- Fixed by fix for 1161: http://icedtea.classpath.org/hg/icedtea-web/rev/9d46cc3428eb -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120918/2ddbff5e/attachment.html From jvanek at redhat.com Tue Sep 18 08:35:44 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 18 Sep 2012 17:35:44 +0200 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <1347908087.17468.33.camel@adomurad-desktop> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> Message-ID: <505894D0.1020904@redhat.com> On 09/17/2012 08:54 PM, Adam Domurad wrote: > On Fri, 2012-08-17 at 12:19 +0200, Jiri Vanek wrote: >> On 08/15/2012 06:57 PM, Jiri Vanek wrote: >>> On 08/14/2012 05:50 PM, Adam Domurad wrote: >>>> On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote: >>>>> This idea should speed up browser tests a lot. When all conditions for pass/failure are done, >>>>> browser is terminated and is not waiting for time-out any more. >>>>> It is bringing some more load to tester, but its usage is mandatory. >>>> Thanks very much for the ideas! >>>> >>>> It would have been nice if it were like this from the beginning - but >>>> nevertheless this would be a great improvement. >>>> >>>> I'm 100% for converting all tests to this form, and mandating it for >>>> future applet tests. I'm sure as the most frequent runner of the test >>>> suite you can agree, at least for mandating it for future tests :) >>> >>> Definitely! I will need some helpt to get it to tests in head ;) >>>> >>>>> >>>>> Usage here is demonstrated on simple applet test. >>>>> Any ideas (especially how to avoid doubled "contains" or "matches") welcomed. >>>>> >>>>> J. >>>>> >>>>> * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: Integrated ClosingListener >>>>> speed-up. >>>>> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: New file, interface for all >>>>> ClosingListeners. >>>>> * tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: Implementation of >>>>> ClsoingListeners which is storing copy of complete output of program. >>>>> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added (setTimeout) method as >>>>> cleanest possibility to terminate process immediately >>>>> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new method (setUpClosingListener) >>>>> for setting necessary variables in ClosingListener >>>> >>>> This method is nice enough, although is it possible to have a >>>> standardized way to see if an exception has caused the applet to stop ? >>>> >>>> I'm very much in favour of adding a clear end marker to the end of tests >>>> rather than duplicating contains/matches. If you don't like a hardcoded >>>> ending message, then, what if we had a closing listener implementation >>>> that takes a single string as an argument, and a string is printed at >>>> the end of the applet. Custom closing listeners could always also be >>>> created. >>>> >>> >>> I'm little bit against using such a constants (which must be copy pasted into reproducer to complete >>> the evil ) but I admit it canhel a lot. But I would recommend to be careful with such a simple >>> "terminator" - as exception can be thrown "later". >>> >>> Anyway some idea how to integrate this is in this updated patch. >>> >>> I have posted also one more idea to patch, and although it eliminates duplicity, it have quite a lot >>> of code :-/. >>> >>> Both new apporaches shown in AppletTestSigned >>> >>> thanx for discussion, >>> >>> J. >>> >>> >>> Ps - I have not tested this new code due to lack of time today so be patient with it. I will do in >>> friday. I'm posting it for you to get the feedback for more ideas! >> >> No ideas ? Never mind - debugged version of above attached There was serious error in listeners > I had ideas, I had to think them through though :) Good :) > I don't know if I like the verbosity here. Creating a contains-rule for Yap. I was little bit unhappy with it too. > everything separately and then combining them into an array of rules > seems like a lot to simply close the browser at the right time. > > Better would be something like: > RuleSet passingRules = new RuleSet().contains(str1, str2).matches(str3, > str4); > RuleSet failingRules = new RuleSet().contains(str5, str6).matches(str7, > str8); Sure. This make sense. Just except RulesSet i would rather keep the class already in this patch (unless you stroongly disagree with name). So: rulesFolowingClosingListener.add(rule1).add(rule2)... This is no problem to add and I like this idea. > But I'm still not sure. It would be much more ideal if the applet simply > signal when it is completed somehow, independent of the validation > rules. I think simply checking for an ***APPLET FINISHED*** message that I agree. Jana have also used just this simple approach.My only concern here is the magical string. But I think we agre at this aprt, can I post final version of the idea with implemented and used AutoOkClosingListener and AutoErrorClosingListener (although I believe only to AutoOkClosingListener to be usefull at all) > was standard for all tests is a good-enough solution. It will cause all > well-behaving applets to speed up, which should be at least the majority > of them. It could also be nice to have some components common to all > applets, (eg common patterns such as Killer thread), that way we could > have something like TestAppletsUtil.printFinishedMessage(); I would like to satisfy your requirement, but I'm afraid of loosing of independence and of simplicity ("one jar") of reprodcuers. But I'm also starting to feel that this becomes necessary. To achieve this, "troubles" will arise and we will have to deal with them: - tools jars must be compiled and deployed to jnlp_test_server (no issue here except setting IDEs) - all reproducers (or some mark that "this particular one" ) have to be compiled with such a tool jar/classes on classapth - the applets/apps which are really using such a code must have this tools jar on classapth by html/jnlp both above are breaking pureness of reproducer. I will be more happy if `some mark that "this particular one"` will be invented but here I'm hesitating too [rfc] :) > >> (also was caused your listeners in previous reproducer not working). It is included here but I'm >> going to fix this separately. After posting Auto*ClosingListeners to review for you, I will attach patch or "patch" with rest of listeners and with some "tools jar" to this thread to keep solving this. Please consider the advantages and disadvantages of "tools jar" and of other ClosingListeners I still think that the generalized Rules listeners can bring more advantages then the tools jars. Damn I hate the tools jar. It can bring so much profit [magical string constants, killer and such a stuff..] but I'm really afraid it can bring more unforeseen bad :( [failures due to one more jar on classapth both compile and runtime time] >> >> >> J. >> > > From adomurad at redhat.com Tue Sep 18 09:22:06 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 18 Sep 2012 12:22:06 -0400 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <505894D0.1020904@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> Message-ID: <1347985326.17468.54.camel@adomurad-desktop> Apologies - I originally replied off list. On Tue, 2012-09-18 at 17:35 +0200, Jiri Vanek wrote: > On 09/17/2012 08:54 PM, Adam Domurad wrote: > > On Fri, 2012-08-17 at 12:19 +0200, Jiri Vanek wrote: > >> On 08/15/2012 06:57 PM, Jiri Vanek wrote: > >>> On 08/14/2012 05:50 PM, Adam Domurad wrote: > >>>> On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote: > >>>>> This idea should speed up browser tests a lot. When all conditions for pass/failure are done, > >>>>> browser is terminated and is not waiting for time-out any more. > >>>>> It is bringing some more load to tester, but its usage is mandatory. > >>>> Thanks very much for the ideas! > >>>> > >>>> It would have been nice if it were like this from the beginning - but > >>>> nevertheless this would be a great improvement. > >>>> > >>>> I'm 100% for converting all tests to this form, and mandating it for > >>>> future applet tests. I'm sure as the most frequent runner of the test > >>>> suite you can agree, at least for mandating it for future tests :) > >>> > >>> Definitely! I will need some helpt to get it to tests in head ;) > >>>> > >>>>> > >>>>> Usage here is demonstrated on simple applet test. > >>>>> Any ideas (especially how to avoid doubled "contains" or "matches") welcomed. > >>>>> > >>>>> J. > >>>>> > >>>>> * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: Integrated ClosingListener > >>>>> speed-up. > >>>>> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: New file, interface for all > >>>>> ClosingListeners. > >>>>> * tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: Implementation of > >>>>> ClsoingListeners which is storing copy of complete output of program. > >>>>> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added (setTimeout) method as > >>>>> cleanest possibility to terminate process immediately > >>>>> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new method (setUpClosingListener) > >>>>> for setting necessary variables in ClosingListener > >>>> > >>>> This method is nice enough, although is it possible to have a > >>>> standardized way to see if an exception has caused the applet to stop ? > >>>> > >>>> I'm very much in favour of adding a clear end marker to the end of tests > >>>> rather than duplicating contains/matches. If you don't like a hardcoded > >>>> ending message, then, what if we had a closing listener implementation > >>>> that takes a single string as an argument, and a string is printed at > >>>> the end of the applet. Custom closing listeners could always also be > >>>> created. > >>>> > >>> > >>> I'm little bit against using such a constants (which must be copy pasted into reproducer to complete > >>> the evil ) but I admit it canhel a lot. But I would recommend to be careful with such a simple > >>> "terminator" - as exception can be thrown "later". > >>> > >>> Anyway some idea how to integrate this is in this updated patch. > >>> > >>> I have posted also one more idea to patch, and although it eliminates duplicity, it have quite a lot > >>> of code :-/. > >>> > >>> Both new apporaches shown in AppletTestSigned > >>> > >>> thanx for discussion, > >>> > >>> J. > >>> > >>> > >>> Ps - I have not tested this new code due to lack of time today so be patient with it. I will do in > >>> friday. I'm posting it for you to get the feedback for more ideas! > >> > >> No ideas ? Never mind - debugged version of above attached There was serious error in listeners > > I had ideas, I had to think them through though :) > > Good :) > > > I don't know if I like the verbosity here. Creating a contains-rule for > > Yap. I was little bit unhappy with it too. > > > everything separately and then combining them into an array of rules > > seems like a lot to simply close the browser at the right time. > > > > Better would be something like: > > RuleSet passingRules = new RuleSet().contains(str1, str2).matches(str3, > > str4); > > RuleSet failingRules = new RuleSet().contains(str5, str6).matches(str7, > > str8); > > Sure. This make sense. Just except RulesSet i would rather keep the class already in this patch > (unless you stroongly disagree with name). So: Name was illustrative, as long as its clear I have no preference (RulesSet isn't completely clear by itself). > > rulesFolowingClosingListener.add(rule1).add(rule2)... > > This is no problem to add and I like this idea. I still feel like a simple .contains(String...) and .matches(String...) would make this more palatable. 99% of rules are going to be 'contains' by the looks of it. If not, it would still be worthwhile to have a variable-number-of-arguments add function, so you can call eg rulesFolowingClosingListener.add(rule1, rule2). I really want think it would be most natural for the existing tests if the auto closing listener was, in most cases, just a bunch of strings to look for, which would typically be named constants anyway. It's still a little unwieldy, but I see your point about why you prefer it, more notes below. > > > But I'm still not sure. It would be much more ideal if the applet simply > > signal when it is completed somehow, independent of the validation > > rules. I think simply checking for an ***APPLET FINISHED*** message that > > I agree. Jana have also used just this simple approach.My only concern here is the magical string. > But I think we agre at this aprt, can I post final version of the idea with implemented and used Whether the version is final is up to reviewer ;) > > AutoOkClosingListener and AutoErrorClosingListener (although I believe only to AutoOkClosingListener > to be usefull at all) > > > > > was standard for all tests is a good-enough solution. It will cause all > > well-behaving applets to speed up, which should be at least the majority > > of them. It could also be nice to have some components common to all > > applets, (eg common patterns such as Killer thread), that way we could > > have something like TestAppletsUtil.printFinishedMessage(); > > I would like to satisfy your requirement, but I'm afraid of loosing of independence and of > simplicity ("one jar") of reprodcuers. But I'm also starting to feel that this becomes necessary. > > To achieve this, "troubles" will arise and we will have to deal with them: > - tools jars must be compiled and deployed to jnlp_test_server (no issue here except setting IDEs) > - all reproducers (or some mark that "this particular one" ) have to be compiled with such a tool > jar/classes on classapth > - the applets/apps which are really using such a code must have this tools jar on classapth by html/jnlp > > both above are breaking pureness of reproducer. I will be more happy if `some mark that "this > particular one"` will be invented but here I'm hesitating too [rfc] :) You're right ... I totally overlooked that the applets can't just magically access this jar :). That does make it a lot more messy than I thought. > > > > >> (also was caused your listeners in previous reproducer not working). It is included here but I'm > >> going to fix this separately. > > After posting Auto*ClosingListeners to review for you, I will attach patch or "patch" with rest of > listeners and with some "tools jar" to this thread to keep solving this. > > Please consider the advantages and disadvantages of "tools jar" and of other ClosingListeners > > I still think that the generalized Rules listeners can bring more advantages then the tools jars. > Damn I hate the tools jar. It can bring so much profit [magical string constants, killer and such a > stuff..] but I'm really afraid it can bring more unforeseen bad :( [failures due to one more jar on > classapth both compile and runtime time] I can understand your disdain for the idea... it is somewhat of an artificial addition to what are supposed to be simple isolated tests. There is the dark route of adding more testing based flags, so that eg a checkable message is printed whenever an applet destroy() or maybe stop() method is called. This has the similar brittleness of a hardcoded message however, and escapes the isolation of the test system.... Probably bad news. Your disdain for the tools jar idea is very understandable, and I'm inclined to agree. Overall, I'm starting to think that a standard, magic, "**APPLET FINISHED**" string copypasted into every applet is the best route. There would then be a convenient default closing listener provided that checks for "**APPLET FINISHED**". For most uses, this would be good enough. Where there are multiple exit scenarios and a single magic string isn't good, the other closing listeners could be used. Thanks for looking into this, - Adam > > >> > >> > >> J. > >> > > > > > From jvanek at redhat.com Tue Sep 18 09:36:24 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 18 Sep 2012 18:36:24 +0200 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <1347985272.17468.53.camel@adomurad-desktop> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> <1347985272.17468.53.camel@adomurad-desktop> Message-ID: <5058A308.6050208@redhat.com> On 09/18/2012 06:21 PM, Adam Domurad wrote: > On Tue, 2012-09-18 at 17:35 +0200, Jiri Vanek wrote: >> On 09/17/2012 08:54 PM, Adam Domurad wrote: >>> On Fri, 2012-08-17 at 12:19 +0200, Jiri Vanek wrote: >>>> On 08/15/2012 06:57 PM, Jiri Vanek wrote: >>>>> On 08/14/2012 05:50 PM, Adam Domurad wrote: >>>>>> On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote: >>>>>>> This idea should speed up browser tests a lot. When all conditions for pass/failure are done, >>>>>>> browser is terminated and is not waiting for time-out any more. >>>>>>> It is bringing some more load to tester, but its usage is mandatory. >>>>>> Thanks very much for the ideas! >>>>>> >>>>>> It would have been nice if it were like this from the beginning - but >>>>>> nevertheless this would be a great improvement. >>>>>> >>>>>> I'm 100% for converting all tests to this form, and mandating it for >>>>>> future applet tests. I'm sure as the most frequent runner of the test >>>>>> suite you can agree, at least for mandating it for future tests :) >>>>> >>>>> Definitely! I will need some helpt to get it to tests in head ;) >>>>>> >>>>>>> >>>>>>> Usage here is demonstrated on simple applet test. >>>>>>> Any ideas (especially how to avoid doubled "contains" or "matches") welcomed. >>>>>>> >>>>>>> J. >>>>>>> >>>>>>> * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: Integrated ClosingListener >>>>>>> speed-up. >>>>>>> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: New file, interface for all >>>>>>> ClosingListeners. >>>>>>> * tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: Implementation of >>>>>>> ClsoingListeners which is storing copy of complete output of program. >>>>>>> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added (setTimeout) method as >>>>>>> cleanest possibility to terminate process immediately >>>>>>> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new method (setUpClosingListener) >>>>>>> for setting necessary variables in ClosingListener >>>>>> >>>>>> This method is nice enough, although is it possible to have a >>>>>> standardized way to see if an exception has caused the applet to stop ? >>>>>> >>>>>> I'm very much in favour of adding a clear end marker to the end of tests >>>>>> rather than duplicating contains/matches. If you don't like a hardcoded >>>>>> ending message, then, what if we had a closing listener implementation >>>>>> that takes a single string as an argument, and a string is printed at >>>>>> the end of the applet. Custom closing listeners could always also be >>>>>> created. >>>>>> >>>>> >>>>> I'm little bit against using such a constants (which must be copy pasted into reproducer to complete >>>>> the evil ) but I admit it canhel a lot. But I would recommend to be careful with such a simple >>>>> "terminator" - as exception can be thrown "later". >>>>> >>>>> Anyway some idea how to integrate this is in this updated patch. >>>>> >>>>> I have posted also one more idea to patch, and although it eliminates duplicity, it have quite a lot >>>>> of code :-/. >>>>> >>>>> Both new apporaches shown in AppletTestSigned >>>>> >>>>> thanx for discussion, >>>>> >>>>> J. >>>>> >>>>> >>>>> Ps - I have not tested this new code due to lack of time today so be patient with it. I will do in >>>>> friday. I'm posting it for you to get the feedback for more ideas! >>>> >>>> No ideas ? Never mind - debugged version of above attached There was serious error in listeners >>> I had ideas, I had to think them through though :) >> >> Good :) >> >>> I don't know if I like the verbosity here. Creating a contains-rule for >> >> Yap. I was little bit unhappy with it too. >> >>> everything separately and then combining them into an array of rules >>> seems like a lot to simply close the browser at the right time. >>> >>> Better would be something like: >>> RuleSet passingRules = new RuleSet().contains(str1, str2).matches(str3, >>> str4); >>> RuleSet failingRules = new RuleSet().contains(str5, str6).matches(str7, >>> str8); >> >> Sure. This make sense. Just except RulesSet i would rather keep the class already in this patch >> (unless you stroongly disagree with name). So: > Name was illustrative, as long as its clear I have no preference > (RulesSet isn't completely clear by itself). >> >> rulesFolowingClosingListener.add(rule1).add(rule2)... >> >> This is no problem to add and I like this idea. > I still feel like a simple .contains(String...) and .matches(String...) > would make this more palatable. 99% of rules are going to be 'contains' I agree.and I can include also not/match/not/contains simplifications. My main reason for Rules was to gather Assert.something("something should contains/match X", s.matches/contains(X)) someClsongListener{ canClose(){ return s.matches/contains(X)}} this s.matches/contains(X) is thre three times. The rule should unify it. > by the looks of it. If not, it would still be worthwhile to have a > variable-number-of-arguments add function, so you can call eg > rulesFolowingClosingListener.add(rule1, rule2). I really want think it > would be most natural for the existing tests if the auto closing > listener was, in most cases, just a bunch of strings to look for, which > would typically be named constants anyway. > > It's still a little unwieldy, but I see your point about why you prefer > it, more notes below. >> >>> But I'm still not sure. It would be much more ideal if the applet simply >>> signal when it is completed somehow, independent of the validation >>> rules. I think simply checking for an ***APPLET FINISHED*** message that >> >> I agree. Jana have also used just this simple approach.My only concern here is the magical string. >> But I think we agre at this aprt, can I post final version of the idea with implemented and used > Whether the version is final is up to reviewer ;) >> >> AutoOkClosingListener and AutoErrorClosingListener (although I believe only to AutoOkClosingListener >> to be usefull at all) > >> >> >> >>> was standard for all tests is a good-enough solution. It will cause all >>> well-behaving applets to speed up, which should be at least the majority >>> of them. It could also be nice to have some components common to all >>> applets, (eg common patterns such as Killer thread), that way we could >>> have something like TestAppletsUtil.printFinishedMessage(); >> >> I would like to satisfy your requirement, but I'm afraid of loosing of independence and of >> simplicity ("one jar") of reprodcuers. But I'm also starting to feel that this becomes necessary. >> >> To achieve this, "troubles" will arise and we will have to deal with them: >> - tools jars must be compiled and deployed to jnlp_test_server (no issue here except setting IDEs) >> - all reproducers (or some mark that "this particular one" ) have to be compiled with such a tool >> jar/classes on classapth >> - the applets/apps which are really using such a code must have this tools jar on classapth by html/jnlp >> >> both above are breaking pureness of reproducer. I will be more happy if `some mark that "this >> particular one"` will be invented but here I'm hesitating too [rfc] :) > You're right ... I totally overlooked that the applets can't just > magically access this jar :). That does make it a lot more messy than I > thought. > >> >>> >>>> (also was caused your listeners in previous reproducer not working). It is included here but I'm >>>> going to fix this separately. >> >> After posting Auto*ClosingListeners to review for you, I will attach patch or "patch" with rest of >> listeners and with some "tools jar" to this thread to keep solving this. >> >> Please consider the advantages and disadvantages of "tools jar" and of other ClosingListeners >> >> I still think that the generalized Rules listeners can bring more advantages then the tools jars. >> Damn I hate the tools jar. It can bring so much profit [magical string constants, killer and such a >> stuff..] but I'm really afraid it can bring more unforeseen bad :( [failures due to one more jar on >> classapth both compile and runtime time] > I can understand your disdain for the idea... it is somewhat of an > artificial addition to what are supposed to be simple isolated tests. > > There is the dark route of adding more testing based flags, so that eg a > checkable message is printed whenever an applet destroy() or maybe > stop() method is called. This has the similar brittleness of a hardcoded > message however, and escapes the isolation of the test system.... > Probably bad news. > > Your disdain for the tools jar idea is very understandable, and I'm > inclined to agree. Overall, I'm starting to think that a standard, > magic, "**APPLET FINISHED**" string copypasted into every applet is the > best route. There would then be a convenient default closing listener > provided that checks for "**APPLET FINISHED**". For most uses, this > would be good enough. Where there are multiple exit scenarios and a > single magic string isn't good, the other closing listeners could be > used. > agreed. > Thanks for looking into this, > - Adam >> >>>> >>>> >>>> J. >>>> >>> >>> >> > > From bugzilla-daemon at icedtea.classpath.org Tue Sep 18 10:02:37 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 18 Sep 2012 17:02:37 +0000 Subject: [Bug 1112] Main class from signed jar's INDEX.LIST fails to load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1112 --- Comment #6 from ralf at ark.in-berlin.de --- Of course I'm interested in a smooth user experience, so many thanks for the info, it works fine now. As I will have to change the deployed HTML too, that link will no longer be a good testcase for your task. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120918/09911e4e/attachment.html From bugzilla-daemon at icedtea.classpath.org Tue Sep 18 11:49:45 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 18 Sep 2012 18:49:45 +0000 Subject: [Bug 1112] Main class from signed jar's INDEX.LIST fails to load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1112 --- Comment #7 from Adam Domurad --- (In reply to comment #6) > Of course I'm interested in a smooth user experience, so many thanks for the > info, it works fine now. As I will have to change the deployed HTML too, > that link will no longer be a good testcase for your task. No problem. We have an independent test for this issue now. And I can recreate the initial conditions easily, as well. Thanks again for bringing the issue to our attention. As a small nit, icedtea-web is technically not part of OpenJDK. It's a confusing distinction though to be sure :) Glad the fix worked. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120918/f09ef0c4/attachment.html From andrew at icedtea.classpath.org Tue Sep 18 21:17:14 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 19 Sep 2012 04:17:14 +0000 Subject: /hg/icedtea7: Update to u10 b07. Message-ID: changeset 788a1e4afb82 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=788a1e4afb82 author: Andrew John Hughes date: Wed Sep 19 05:17:00 2012 +0100 Update to u10 b07. 2012-09-19 Andrew John Hughes * Makefile.am, (OPENJDK_VERSION): Bump to b07. (JDK_UPDATE_VERSION): Bump to u10. (CORBA_CHANGESET): Update to IcedTea7 forest head. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * hotspot.map: Update default to head of IcedTea7 forest HotSpot. * patches/boot/ecj-diamond.patch: Add additional cases in sun.launcher.LauncherHelper. * patches/boot/ecj-trywithresources.patch: Add new case in sun.launcher.LauncherHelper. diffstat: ChangeLog | 24 ++++++++++++++++++++++++ Makefile.am | 28 ++++++++++++++-------------- hotspot.map | 2 +- patches/boot/ecj-diamond.patch | 18 ++++++++++++++++++ patches/boot/ecj-trywithresources.patch | 25 +++++++++++++++++++++++++ 5 files changed, 82 insertions(+), 15 deletions(-) diffs (139 lines): diff -r b7036fcc4727 -r 788a1e4afb82 ChangeLog --- a/ChangeLog Mon Sep 03 14:06:01 2012 +0100 +++ b/ChangeLog Wed Sep 19 05:17:00 2012 +0100 @@ -1,3 +1,27 @@ +2012-09-19 Andrew John Hughes + + * Makefile.am, + (OPENJDK_VERSION): Bump to b07. + (JDK_UPDATE_VERSION): Bump to u10. + (CORBA_CHANGESET): Update to IcedTea7 forest head. + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (CORBA_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + * hotspot.map: Update default to head of IcedTea7 + forest HotSpot. + * patches/boot/ecj-diamond.patch: + Add additional cases in sun.launcher.LauncherHelper. + * patches/boot/ecj-trywithresources.patch: + Add new case in sun.launcher.LauncherHelper. + 2012-09-03 Andrew John Hughes * NEWS: Add new releases: 2.1.2, 2.2.2, diff -r b7036fcc4727 -r 788a1e4afb82 Makefile.am --- a/Makefile.am Mon Sep 03 14:06:01 2012 +0100 +++ b/Makefile.am Wed Sep 19 05:17:00 2012 +0100 @@ -1,22 +1,22 @@ # Dependencies -OPENJDK_VERSION = b04 -JDK_UPDATE_VERSION = 08 +OPENJDK_VERSION = b07 +JDK_UPDATE_VERSION = 10 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) -CORBA_CHANGESET = 0145833b7e10 -JAXP_CHANGESET = 6de64995ea6e -JAXWS_CHANGESET = 1a01efb4cd05 -JDK_CHANGESET = 5a2688a73184 -LANGTOOLS_CHANGESET = 3ce5864ed9da -OPENJDK_CHANGESET = d2607b1bfb20 +CORBA_CHANGESET = 460b8758b9e4 +JAXP_CHANGESET = 5022489661f3 +JAXWS_CHANGESET = cf12218e2d86 +JDK_CHANGESET = 7458205a24cb +LANGTOOLS_CHANGESET = b6aa87579acb +OPENJDK_CHANGESET = d6cfb4b87935 -CORBA_SHA256SUM = fcf6f60b89b1dd3d98c9fffdb226dad3f6503ab0829c43807a30e94d22800795 -JAXP_SHA256SUM = 3e64af781e9f17aae31cf8e94483d6f8a03a4c587c76c69c4b8009fa5d6118a2 -JAXWS_SHA256SUM = d388525b19f5a0eefc70dc77bceb2e6697061a47372697769e5a5e2ee8ec35cc -JDK_SHA256SUM = 84637b747bfc0e5bf1dd4c47322c2bbc3ac81483f361553fb9c29d1446fd070a -LANGTOOLS_SHA256SUM = 6c68a410c723c09a902659a28ee953a760b5c9d89947fcacee545a008e9d8918 -OPENJDK_SHA256SUM = 237d4d7c35d66536604e54781d1c927c7e75809a24b918640b3d10d92fec4e2c +CORBA_SHA256SUM = a9f997e9b8b530a8155505bbb0ef83a2aac5cdea120f87196172f1402f98018c +JAXP_SHA256SUM = efc733f72384008e3bb095420964b671eeecba02e7003bb50355e835f2495bf3 +JAXWS_SHA256SUM = 3aae6d0d757c460b4d9a5cbebf722fc81192d1dcebd25d4c709fe6b03c12d48d +JDK_SHA256SUM = 9602aaa77634a7750afc63f65334ae26efc2b38ef822552e77cef456d681cb97 +LANGTOOLS_SHA256SUM = 166a06f7a56b5ae0eeb51d07b634e95e1c9c541875ea7ec3e529b72172cf875b +OPENJDK_SHA256SUM = 237b638ca0a210524ae719c96d18909ab951830081078f842ce3afa5fd20b39d CACAO_VERSION = a567bcb7f589 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9 diff -r b7036fcc4727 -r 788a1e4afb82 hotspot.map --- a/hotspot.map Mon Sep 03 14:06:01 2012 +0100 +++ b/hotspot.map Wed Sep 19 05:17:00 2012 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum -default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 2aad7a18d716 b0328803af53973a5a465ded4a7d8cb4d3862be783604b54e79828cbff5ae548 +default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 08596d5d7dda c88abf4d9ab315e48a790ae184201efcd9b659c292b27570e3e606db585f2073 zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot b41a43560dc8 25d13a4be1c343b620d2a85a47b8b654abaee3541968d205128ca69cf46fc17c diff -r b7036fcc4727 -r 788a1e4afb82 patches/boot/ecj-diamond.patch --- a/patches/boot/ecj-diamond.patch Mon Sep 03 14:06:01 2012 +0100 +++ b/patches/boot/ecj-diamond.patch Wed Sep 19 05:17:00 2012 +0100 @@ -3694,6 +3694,24 @@ for (Locale l : tlocales) { sortedSet.add(l.toString()); } +@@ -532,7 +532,7 @@ + } + + static String[] expandArgs(String[] argArray) { +- List aList = new ArrayList<>(); ++ List aList = new ArrayList(); + for (String x : argArray) { + aList.add(new StdArg(x)); + } +@@ -540,7 +540,7 @@ + } + + static String[] expandArgs(List argList) { +- ArrayList out = new ArrayList<>(); ++ ArrayList out = new ArrayList(); + if (trace) { + System.err.println("Incoming arguments:"); + } diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java openjdk-boot/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java --- openjdk-boot.orig/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java 2012-08-29 13:24:58.000000000 +0100 +++ openjdk-boot/jdk/src/share/classes/sun/management/ManagementFactoryHelper.java 2012-08-29 13:51:21.645694645 +0100 diff -r b7036fcc4727 -r 788a1e4afb82 patches/boot/ecj-trywithresources.patch --- a/patches/boot/ecj-trywithresources.patch Mon Sep 03 14:06:01 2012 +0100 +++ b/patches/boot/ecj-trywithresources.patch Wed Sep 19 05:17:00 2012 +0100 @@ -1056,3 +1056,28 @@ } catch (IOException x) { } return result; +diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/launcher/LauncherHelper.java openjdk-boot/jdk/src/share/classes/sun/launcher/LauncherHelper.java +--- openjdk-boot.orig/jdk/src/share/classes/sun/launcher/LauncherHelper.java 2012-09-19 03:56:50.376373385 +0100 ++++ openjdk-boot/jdk/src/share/classes/sun/launcher/LauncherHelper.java 2012-09-19 04:02:15.841559851 +0100 +@@ -555,8 +555,9 @@ + if (parent == null) { + parent = new File("."); + } +- try (DirectoryStream dstream = +- Files.newDirectoryStream(parent.toPath(), glob)) { ++ DirectoryStream dstream = null; ++ try { ++ dstream = Files.newDirectoryStream(parent.toPath(), glob); + int entries = 0; + for (Path p : dstream) { + out.add(p.normalize().toString()); +@@ -571,6 +572,9 @@ + System.err.println("Warning: passing argument as-is " + a); + System.err.print(e); + } ++ } finally { ++ if (dstream != null) ++ try { dstream.close(); } catch (IOException e) {} + } + } else { + out.add(a.arg); From ptisnovs at icedtea.classpath.org Wed Sep 19 01:16:04 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 19 Sep 2012 08:16:04 +0000 Subject: /hg/rhino-tests: Five new tests & fixed some minor issues in src... Message-ID: changeset be1b5714e3f0 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=be1b5714e3f0 author: Pavel Tisnovsky date: Wed Sep 19 10:18:40 2012 +0200 Five new tests & fixed some minor issues in src/org/RhinoTests/CompilableClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/CompilableClassTest.java | 65 ++++++++++++++++++++++++++-- 2 files changed, 65 insertions(+), 5 deletions(-) diffs (125 lines): diff -r a699d77ef3a5 -r be1b5714e3f0 ChangeLog --- a/ChangeLog Mon Sep 17 12:21:16 2012 +0200 +++ b/ChangeLog Wed Sep 19 10:18:40 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-19 Pavel Tisnovsky + + * src/org/RhinoTests/CompilableClassTest.java: + Five new tests & fixed some minor issues. + 2012-09-17 Pavel Tisnovsky * src/org/RhinoTests/AbstractScriptEngineClassTest.java: diff -r a699d77ef3a5 -r be1b5714e3f0 src/org/RhinoTests/CompilableClassTest.java --- a/src/org/RhinoTests/CompilableClassTest.java Mon Sep 17 12:21:16 2012 +0200 +++ b/src/org/RhinoTests/CompilableClassTest.java Wed Sep 19 10:18:40 2012 +0200 @@ -66,7 +66,7 @@ /** * Object that represents the type of Compilable. */ - Class compilableClass = null; + Class compilableClass = null; @Override protected void setUp(String[] args) { @@ -137,10 +137,64 @@ } /** + * Test for method javax.script.Compilable.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.compilableClass.isAnnotation(), + "Method Compilable.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.Override.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.compilableClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method Compilable.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.compilableClass.isAnonymousClass(), + "Method Compilable.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.compilableClass.isArray(), + "Method Compilable.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.Compilable.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.compilableClass.isEnum(), + "Method Compilable.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.Compilable.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.compilableClass.getInterfaces()); + List> interfaces = Arrays.asList(this.compilableClass.getInterfaces()); assertTrue(interfaces.isEmpty(), "list of implemented interfaces should be empty"); } @@ -208,7 +262,7 @@ * Test for method javax.script.Compilable.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.compilableClass.getSuperclass(); + Class superClass = this.compilableClass.getSuperclass(); assertNull(superClass, "Method Compilable.getClass().getSuperclass() does not return null"); } @@ -217,7 +271,7 @@ * Test for method javax.script.Compilable.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.compilableClass.getConstructors(); + Constructor[] constructors = this.compilableClass.getConstructors(); assertEquals(constructors.length, 0, "no constructors should be set"); } @@ -225,7 +279,7 @@ * Test for method javax.script.Compilable.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.compilableClass.getDeclaredConstructors(); + Constructor[] constructors = this.compilableClass.getDeclaredConstructors(); assertEquals(constructors.length, 0, "no constructors should be set"); } @@ -320,6 +374,7 @@ /** * Test for instanceof operator applied to a class javax.script.Compilable */ + @SuppressWarnings("cast") protected void testInstanceOf() { // tested object Object o = (Compilable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript)); From andrew at icedtea.classpath.org Wed Sep 19 09:08:59 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 19 Sep 2012 16:08:59 +0000 Subject: /hg/icedtea6-hg: Work with latest upstream, post security fixes. Message-ID: changeset 8ad13dc5ad87 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=8ad13dc5ad87 author: Andrew John Hughes date: Wed Sep 19 17:06:14 2012 +0100 Work with latest upstream, post security fixes. 2012-09-19 Andrew John Hughes * patches/openjdk/7185678-xmenuitem_peer_npe.patch, * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: Removed; upstream. * Makefile.am: (SECURITY_PATCHES): Drop patches available upstream. (ICEDTEA_PATCHES): Likewise. * patches/merge_fix.patch, * patches/nomotif-6706121.patch, * patches/openjdk/6633275-shaped_translucent_windows.patch, * patches/openjdk/6797195-hw_lw_mixing.patch: Regenerated against upstream. diffstat: ChangeLog | 15 + Makefile.am | 3 - patches/merge_fix.patch | 288 +- patches/nomotif-6706121.patch | 216 +- patches/openjdk/6633275-shaped_translucent_windows.patch | 396 +- patches/openjdk/6797195-hw_lw_mixing.patch | 128 +- patches/openjdk/7185678-xmenuitem_peer_npe.patch | 21 - patches/security/20120830/7162476-xmldecoder_via_classfinder.patch | 2522 ------ patches/security/20120830/7163201-simplify_toolkit_internal_references.patch | 3713 ---------- 9 files changed, 663 insertions(+), 6639 deletions(-) diffs (truncated from 8809 to 500 lines): diff -r 7f9b1d08b2c5 -r 8ad13dc5ad87 ChangeLog --- a/ChangeLog Mon Sep 10 17:48:48 2012 +0100 +++ b/ChangeLog Wed Sep 19 17:06:14 2012 +0100 @@ -1,3 +1,18 @@ +2012-09-19 Andrew John Hughes + + * patches/openjdk/7185678-xmenuitem_peer_npe.patch, + * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, + * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: + Removed; upstream. + * Makefile.am: + (SECURITY_PATCHES): Drop patches available upstream. + (ICEDTEA_PATCHES): Likewise. + * patches/merge_fix.patch, + * patches/nomotif-6706121.patch, + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Regenerated against upstream. + 2012-09-03 Mark Wielaard * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after diff -r 7f9b1d08b2c5 -r 8ad13dc5ad87 Makefile.am --- a/Makefile.am Mon Sep 10 17:48:48 2012 +0100 +++ b/Makefile.am Wed Sep 19 17:06:14 2012 +0100 @@ -194,8 +194,6 @@ ICEDTEA_FSG_PATCHES = SECURITY_PATCHES = \ - patches/security/20120830/7162476-xmldecoder_via_classfinder.patch \ - patches/security/20120830/7163201-simplify_toolkit_internal_references.patch \ patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch @@ -417,7 +415,6 @@ patches/openjdk/p11cipher-6924489-ckr_operation_not_initialized.patch \ patches/openjdk/p11cipher-6604496-support_ckm_aes_ctr.patch \ patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch \ - patches/openjdk/7185678-xmenuitem_peer_npe.patch \ patches/merge_fix.patch if WITH_RHINO diff -r 7f9b1d08b2c5 -r 8ad13dc5ad87 patches/merge_fix.patch --- a/patches/merge_fix.patch Mon Sep 10 17:48:48 2012 +0100 +++ b/patches/merge_fix.patch Wed Sep 19 17:06:14 2012 +0100 @@ -1,26 +1,280 @@ diff -Nru openjdk.orig/jdk/src/share/classes/java/awt/Window.java openjdk/jdk/src/share/classes/java/awt/Window.java ---- openjdk.orig/jdk/src/share/classes/java/awt/Window.java 2012-08-31 12:37:54.732223754 +0100 -+++ openjdk/jdk/src/share/classes/java/awt/Window.java 2012-08-31 12:40:01.526031381 +0100 -@@ -3516,11 +3516,7 @@ - public void setTrayIconWindow(Window window, boolean state) { - window.isTrayIconWindow = state; +--- openjdk.orig/jdk/src/share/classes/java/awt/Window.java 2012-09-19 14:30:11.949624069 +0100 ++++ openjdk/jdk/src/share/classes/java/awt/Window.java 2012-09-19 14:33:18.101297411 +0100 +@@ -362,6 +362,70 @@ + public void setLWRequestStatus(Window changed, boolean status) { + changed.syncLWRequests = status; } -- }); -- } ++ public float getOpacity(Window window) { ++ return window.opacity; ++ } ++ public void setOpacity(Window window, float opacity) { ++ window.setOpacity(opacity); ++ } ++ public Shape getShape(Window window) { ++ return window.getShape(); ++ } ++ public void setShape(Window window, Shape shape) { ++ window.setShape(shape); ++ } ++ public boolean isOpaque(Window window) { ++ /* ++ return window.getBackground().getAlpha() < 255; ++ */ ++ synchronized (window.getTreeLock()) { ++ return window.opaque; ++ } ++ } ++ public void setOpaque(Window window, boolean opaque) { ++ /* ++ Color bg = window.getBackground(); ++ window.setBackground(new Color(bg.getRed(), bg.getGreen(), bg.getBlue(), ++ opaque ? 255 : 0)); ++ */ ++ window.setOpaque(opaque); ++ } ++ public void updateWindow(Window window, BufferedImage backBuffer) { ++ window.updateWindow(backBuffer); ++ } ++ ++ public Dimension getSecurityWarningSize(Window window) { ++ return new Dimension(window.securityWarningWidth, ++ window.securityWarningHeight); ++ } ++ ++ public void setSecurityWarningSize(Window window, int width, int height) ++ { ++ window.securityWarningWidth = width; ++ window.securityWarningHeight = height; ++ } ++ ++ public void setSecurityWarningPosition(Window window, ++ Point2D point, float alignmentX, float alignmentY) ++ { ++ window.securityWarningPointX = point.getX(); ++ window.securityWarningPointY = point.getY(); ++ window.securityWarningAlignmentX = alignmentX; ++ window.securityWarningAlignmentY = alignmentY; ++ ++ synchronized (window.getTreeLock()) { ++ WindowPeer peer = (WindowPeer)window.getPeer(); ++ if (peer != null) { ++ peer.repositionSecurityWarning(); ++ } ++ } ++ } ++ ++ public Point2D calculateSecurityWarningPosition(Window window, ++ double x, double y, double w, double h) ++ { ++ return window.calculateSecurityWarningPosition(x, y, w, h); ++ } + }); + } + +@@ -3504,75 +3568,6 @@ + y + h * securityWarningAlignmentY + securityWarningPointY); + } - static { - AWTAccessor.setWindowAccessor(new AWTAccessor.WindowAccessor() { - public float getOpacity(Window window) { - return window.opacity; - } +- public float getOpacity(Window window) { +- return window.opacity; +- } +- public void setOpacity(Window window, float opacity) { +- window.setOpacity(opacity); +- } +- public Shape getShape(Window window) { +- return window.getShape(); +- } +- public void setShape(Window window, Shape shape) { +- window.setShape(shape); +- } +- public boolean isOpaque(Window window) { +- /* +- return window.getBackground().getAlpha() < 255; +- */ +- synchronized (window.getTreeLock()) { +- return window.opaque; +- } +- } +- public void setOpaque(Window window, boolean opaque) { +- /* +- Color bg = window.getBackground(); +- window.setBackground(new Color(bg.getRed(), bg.getGreen(), bg.getBlue(), +- opaque ? 255 : 0)); +- */ +- window.setOpaque(opaque); +- } +- public void updateWindow(Window window, BufferedImage backBuffer) { +- window.updateWindow(backBuffer); +- } +- +- public Dimension getSecurityWarningSize(Window window) { +- return new Dimension(window.securityWarningWidth, +- window.securityWarningHeight); +- } +- +- public void setSecurityWarningSize(Window window, int width, int height) +- { +- window.securityWarningWidth = width; +- window.securityWarningHeight = height; +- } +- +- public void setSecurityWarningPosition(Window window, +- Point2D point, float alignmentX, float alignmentY) +- { +- window.securityWarningPointX = point.getX(); +- window.securityWarningPointY = point.getY(); +- window.securityWarningAlignmentX = alignmentX; +- window.securityWarningAlignmentY = alignmentY; +- +- synchronized (window.getTreeLock()) { +- WindowPeer peer = (WindowPeer)window.getPeer(); +- if (peer != null) { +- peer.repositionSecurityWarning(); +- } +- } +- } +- +- public Point2D calculateSecurityWarningPosition(Window window, +- double x, double y, double w, double h) +- { +- return window.calculateSecurityWarningPosition(x, y, w, h); +- } +- }); // WindowAccessor +- } // static +- + } // class Window + + diff -Nru openjdk.orig/jdk/src/share/classes/sun/awt/AWTAccessor.java openjdk/jdk/src/share/classes/sun/awt/AWTAccessor.java ---- openjdk.orig/jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-08-31 12:38:42.276918679 +0100 -+++ openjdk/jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-08-31 12:39:28.277567706 +0100 -@@ -29,6 +29,7 @@ - import java.awt.event.InputEvent; - import java.awt.event.KeyEvent; - import java.awt.geom.Point2D; +--- openjdk.orig/jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-09-19 14:30:11.949624069 +0100 ++++ openjdk/jdk/src/share/classes/sun/awt/AWTAccessor.java 2012-09-19 14:57:03.147675653 +0100 +@@ -26,6 +26,8 @@ + package sun.awt; + + import java.awt.*; ++import java.awt.geom.Point2D; +import java.awt.image.BufferedImage; import sun.misc.Unsafe; - import java.awt.peer.ComponentPeer; + +@@ -63,6 +65,55 @@ + * components in the specified window to the specified value. + */ + void setLWRequestStatus(Window changed, boolean status); ++ /* ++ * Get opacity level of the given window. ++ */ ++ float getOpacity(Window window); ++ /* ++ * Set opacity level to the given window. ++ */ ++ void setOpacity(Window window, float opacity); ++ /* ++ * Get a shape assigned to the given window. ++ */ ++ Shape getShape(Window window); ++ /* ++ * Set a shape to the given window. ++ */ ++ void setShape(Window window, Shape shape); ++ /* ++ * Identify whether the given window is opaque (true) ++ * or translucent (false). ++ */ ++ boolean isOpaque(Window window); ++ /* ++ * Set the opaque preoperty to the given window. ++ */ ++ void setOpaque(Window window, boolean isOpaque); ++ /* ++ * Update the image of a non-opaque (translucent) window. ++ */ ++ void updateWindow(Window window, BufferedImage backBuffer); ++ ++ /** Get the size of the security warning. ++ */ ++ Dimension getSecurityWarningSize(Window w); ++ ++ /** ++ * Set the size of the security warning. ++ */ ++ void setSecurityWarningSize(Window w, int width, int height); ++ ++ /** Set the position of the security warning. ++ */ ++ void setSecurityWarningPosition(Window w, Point2D point, ++ float alignmentX, float alignmentY); ++ ++ /** Request to recalculate the new position of the security warning for ++ * the given window size/location as reported by the native system. ++ */ ++ Point2D calculateSecurityWarningPosition(Window window, ++ double x, double y, double w, double h); + } + + /* +@@ -147,61 +198,6 @@ + } + + /* +- * An interface of accessor for java.awt.Window class. +- */ +- public interface WindowAccessor { +- /* +- * Get opacity level of the given window. +- */ +- float getOpacity(Window window); +- /* +- * Set opacity level to the given window. +- */ +- void setOpacity(Window window, float opacity); +- /* +- * Get a shape assigned to the given window. +- */ +- Shape getShape(Window window); +- /* +- * Set a shape to the given window. +- */ +- void setShape(Window window, Shape shape); +- /* +- * Identify whether the given window is opaque (true) +- * or translucent (false). +- */ +- boolean isOpaque(Window window); +- /* +- * Set the opaque preoperty to the given window. +- */ +- void setOpaque(Window window, boolean isOpaque); +- /* +- * Update the image of a non-opaque (translucent) window. +- */ +- void updateWindow(Window window, BufferedImage backBuffer); +- +- /** Get the size of the security warning. +- */ +- Dimension getSecurityWarningSize(Window w); +- +- /** +- * Set the size of the security warning. +- */ +- void setSecurityWarningSize(Window w, int width, int height); +- +- /** Set the position of the security warning. +- */ +- void setSecurityWarningPosition(Window w, Point2D point, +- float alignmentX, float alignmentY); +- +- /** Request to recalculate the new position of the security warning for +- * the given window size/location as reported by the native system. +- */ +- Point2D calculateSecurityWarningPosition(Window window, +- double x, double y, double w, double h); +- } +- +- /* + * An accessor for the AWTEvent class. + */ + public interface AWTEventAccessor { diff -r 7f9b1d08b2c5 -r 8ad13dc5ad87 patches/nomotif-6706121.patch --- a/patches/nomotif-6706121.patch Mon Sep 10 17:48:48 2012 +0100 +++ b/patches/nomotif-6706121.patch Wed Sep 19 17:06:14 2012 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/sun/awt/FILES_c_unix.gmk openjdk/jdk/make/sun/awt/FILES_c_unix.gmk ---- openjdk.orig/jdk/make/sun/awt/FILES_c_unix.gmk 2011-11-14 22:11:40.000000000 +0000 -+++ openjdk/jdk/make/sun/awt/FILES_c_unix.gmk 2012-08-31 12:03:21.902641410 +0100 +--- openjdk.orig/jdk/make/sun/awt/FILES_c_unix.gmk 2011-01-07 21:32:51.000000000 +0000 ++++ openjdk/jdk/make/sun/awt/FILES_c_unix.gmk 2012-09-19 14:26:46.277536336 +0100 @@ -142,59 +142,59 @@ # These files rely on motif to be built, and should not be included # in a headless build. @@ -115,8 +115,8 @@ # These files are required to be built, with or without motif. Some of diff -Nru openjdk.orig/jdk/make/sun/awt/FILES_export_unix.gmk openjdk/jdk/make/sun/awt/FILES_export_unix.gmk ---- openjdk.orig/jdk/make/sun/awt/FILES_export_unix.gmk 2012-08-31 12:00:37.508379799 +0100 -+++ openjdk/jdk/make/sun/awt/FILES_export_unix.gmk 2012-08-31 12:03:21.918641631 +0100 +--- openjdk.orig/jdk/make/sun/awt/FILES_export_unix.gmk 2012-09-19 14:25:48.912390535 +0100 ++++ openjdk/jdk/make/sun/awt/FILES_export_unix.gmk 2012-09-19 14:26:46.289536573 +0100 @@ -60,48 +60,15 @@ sun/awt/image/DataBufferNative.java \ \ @@ -183,8 +183,8 @@ + sun/awt/CausedFocusEvent.java diff -Nru openjdk.orig/jdk/make/sun/awt/mapfile-mawt-vers openjdk/jdk/make/sun/awt/mapfile-mawt-vers ---- openjdk.orig/jdk/make/sun/awt/mapfile-mawt-vers 2012-08-31 12:00:37.800383804 +0100 -+++ openjdk/jdk/make/sun/awt/mapfile-mawt-vers 2012-08-31 12:03:21.918641631 +0100 +--- openjdk.orig/jdk/make/sun/awt/mapfile-mawt-vers 2012-09-19 14:25:49.104394370 +0100 ++++ openjdk/jdk/make/sun/awt/mapfile-mawt-vers 2012-09-19 14:26:46.293536653 +0100 @@ -31,7 +31,7 @@ global: JNI_OnLoad; @@ -717,8 +717,8 @@ Java_sun_awt_motif_MToolkitThreadBlockedHandler_exit; Java_sun_awt_X11GraphicsConfig_init; diff -Nru openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux openjdk/jdk/make/sun/awt/mapfile-vers-linux ---- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux 2012-08-31 12:00:37.800383804 +0100 -+++ openjdk/jdk/make/sun/awt/mapfile-vers-linux 2012-08-31 12:03:21.918641631 +0100 +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux 2012-09-19 14:25:49.104394370 +0100 ++++ openjdk/jdk/make/sun/awt/mapfile-vers-linux 2012-09-19 14:26:46.293536653 +0100 @@ -169,7 +169,7 @@ GrPrim_Sg2dGetPixel; GrPrim_Sg2dGetLCDTextContrast; @@ -1240,8 +1240,8 @@ awt_lock; awt_Lock; diff -Nru openjdk.orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk ---- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2011-11-14 22:11:40.000000000 +0000 -+++ openjdk/jdk/make/sun/awt/mawt.gmk 2012-08-31 12:03:21.918641631 +0100 +--- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2011-01-07 21:32:51.000000000 +0000 ++++ openjdk/jdk/make/sun/awt/mawt.gmk 2012-09-19 14:26:46.293536653 +0100 @@ -28,14 +28,6 @@ # INIT += $(LIB_LOCATION) @@ -1395,8 +1395,8 @@ endif # !HEADLESS diff -Nru openjdk.orig/jdk/make/sun/jawt/Makefile openjdk/jdk/make/sun/jawt/Makefile ---- openjdk.orig/jdk/make/sun/jawt/Makefile 2011-11-14 22:11:41.000000000 +0000 -+++ openjdk/jdk/make/sun/jawt/Makefile 2012-08-31 12:03:21.922641686 +0100 +--- openjdk.orig/jdk/make/sun/jawt/Makefile 2011-01-07 21:32:51.000000000 +0000 ++++ openjdk/jdk/make/sun/jawt/Makefile 2012-09-19 14:26:46.293536653 +0100 @@ -99,7 +99,6 @@ # Other extra flags needed for compiling. # @@ -1406,7 +1406,7 @@ -I$(SHARE_SRC)/native/$(PKGDIR)/image \ -I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \ diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MButtonPeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MButtonPeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MButtonPeer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MButtonPeer.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MButtonPeer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,97 +0,0 @@ -/* @@ -1507,7 +1507,7 @@ - -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCanvasPeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MCanvasPeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCanvasPeer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCanvasPeer.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MCanvasPeer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,113 +0,0 @@ -/* @@ -1624,7 +1624,7 @@ - } -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MCheckboxMenuItemPeer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,93 +0,0 @@ -/* @@ -1721,7 +1721,7 @@ - } // action() -} // class MCheckboxMenuItemPeer diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCheckboxPeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MCheckboxPeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCheckboxPeer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCheckboxPeer.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MCheckboxPeer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,187 +0,0 @@ -/* @@ -1912,7 +1912,7 @@ - -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MChoicePeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MChoicePeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MChoicePeer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MChoicePeer.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MChoicePeer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,177 +0,0 @@ -/* @@ -2093,9 +2093,9 @@ - private native void freeNativeData(); -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java 2012-08-31 12:00:36.988372667 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java 2012-08-31 11:18:57.975637791 +0100 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MComponentPeer.java 1970-01-01 01:00:00.000000000 +0100 -@@ -1,1171 +0,0 @@ +@@ -1,1173 +0,0 @@ -/* - * Copyright (c) 1995, 2007, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -2495,6 +2495,8 @@ - } - } - +- static Method requestFocusWithCause; +- - static void callRequestFocusInWindow(Component target, CausedFocusEvent.Cause cause) { - AWTAccessor.getComponentAccessor().requestFocusInWindow(target, cause); - } @@ -3268,7 +3270,7 @@ - -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCustomCursor.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MCustomCursor.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCustomCursor.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MCustomCursor.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MCustomCursor.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,68 +0,0 @@ -/* @@ -3340,7 +3342,7 @@ - private native static void cacheInit(); -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MDataTransferer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MDataTransferer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MDataTransferer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MDataTransferer.java 2011-01-07 21:33:04.000000000 +0000 +++ openjdk/jdk/src/solaris/classes/sun/awt/motif/MDataTransferer.java 1970-01-01 01:00:00.000000000 +0100 @@ -1,386 +0,0 @@ -/* @@ -3730,7 +3732,7 @@ - protected native String[] dragQueryFile(byte[] bytes); -} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MDialogPeer.java openjdk/jdk/src/solaris/classes/sun/awt/motif/MDialogPeer.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MDialogPeer.java 2011-11-14 22:12:14.000000000 +0000 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/motif/MDialogPeer.java 2011-01-07 21:33:04.000000000 +0000 From bugzilla-daemon at icedtea.classpath.org Wed Sep 19 11:46:53 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 19 Sep 2012 18:46:53 +0000 Subject: [Bug 685] Plugin crash and data corruption In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=685 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnu.andrew at redhat.com, | |unassigned at icedtea.classpat | |h.org Component|IcedTea |Plugin Version|6-1.9.7 |unspecified Assignee|unassigned at icedtea.classpat |dbhole at redhat.com |h.org | Product|IcedTea |IcedTea-Web -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120919/ff01cd81/attachment.html From bugzilla-daemon at icedtea.classpath.org Wed Sep 19 12:07:26 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 19 Sep 2012 19:07:26 +0000 Subject: [Bug 685] Plugin crash and data corruption In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=685 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Deepak Bhole --- Already fixed in head as while ago. IcedTea-Web 1.3 contains this fix. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120919/c0b7a871/attachment.html From andrew at icedtea.classpath.org Wed Sep 19 13:36:19 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 19 Sep 2012 20:36:19 +0000 Subject: /hg/icedtea7: Update HotSpot tree from IcedTea 2.1, used for Zer... Message-ID: changeset b374a4e01497 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=b374a4e01497 author: Andrew John Hughes date: Wed Sep 19 21:36:08 2012 +0100 Update HotSpot tree from IcedTea 2.1, used for Zero support. 2012-09-19 Andrew John Hughes * hotspot.map: Update zero to head of IcedTea7 2.1 HotSpot tree. diffstat: ChangeLog | 5 +++++ hotspot.map | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diffs (20 lines): diff -r 788a1e4afb82 -r b374a4e01497 ChangeLog --- a/ChangeLog Wed Sep 19 05:17:00 2012 +0100 +++ b/ChangeLog Wed Sep 19 21:36:08 2012 +0100 @@ -1,3 +1,8 @@ +2012-09-19 Andrew John Hughes + + * hotspot.map: + Update zero to head of IcedTea7 2.1 HotSpot tree. + 2012-09-19 Andrew John Hughes * Makefile.am, diff -r 788a1e4afb82 -r b374a4e01497 hotspot.map --- a/hotspot.map Wed Sep 19 05:17:00 2012 +0100 +++ b/hotspot.map Wed Sep 19 21:36:08 2012 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 08596d5d7dda c88abf4d9ab315e48a790ae184201efcd9b659c292b27570e3e606db585f2073 -zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot b41a43560dc8 25d13a4be1c343b620d2a85a47b8b654abaee3541968d205128ca69cf46fc17c +zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot c159737dd826 c1e626ecf4e7118ac269923ef0b83f5f8d36b0e816b293197ffbf8dd5083fa8d From gnu.andrew at redhat.com Wed Sep 19 15:23:28 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Wed, 19 Sep 2012 18:23:28 -0400 (EDT) Subject: FYI: [IcedTea6] PR1119: Only add classes to rt-source-files.txt if needed In-Reply-To: <1034195971.2743503.1348093389563.JavaMail.root@redhat.com> Message-ID: <1381705281.2743520.1348093408882.JavaMail.root@redhat.com> This is the first part of implementing PR1119 in IcedTea6 (already present in IcedTea7). It changes the Makefile.am so that javax.swing.plaf.basic.BasicDirectoryModel is only pre-built if required methods are missing; see: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42003 It also fixes a latent bug I found in the process, whereby the check macros for java/javac/javah/jar/rmic/native2ascii in IcedTea6 use SYSTEM_JDK_DIR but don't depend on the macro that defines it, leading them to instead do a path search for javac and run the method check test against the wrong JDK. 2012-09-19 Andrew John Hughes PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) are actually missing from the boot JDK * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Only include javax.swing.plaf.basic.BasicDirectoryModel if PR42003 is present in the boot JDK. * NEWS: List PR1119. Correct previous use of PR1119 which should be PR1121. * acinclude.m4: (IT_FIND_JAVAC): Add missing requirement of IT_CHECK_FOR_JDK. (IT_FIND_JAVA): Likewise. (IT_FIND_JAVAH): Likewise. (IT_FIND_JAR): Likewise. (IT_FIND_RMIC): Likewise. (IT_FIND_NATIVE2ASCII): Likewise. (IT_CHECK_FOR_METHOD): New macro to check for a method both at build-time and run-time. * configure.ac: Call IT_CHECK_FOR_METHOD for javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 -------------- next part -------------- A non-text attachment was scrubbed... Name: diff Type: text/x-patch Size: 5487 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120919/dc414a0b/diff.bin From andrew at icedtea.classpath.org Wed Sep 19 15:24:40 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 19 Sep 2012 22:24:40 +0000 Subject: /hg/icedtea6: PR1119: Test explicitly if javax.swing.plaf.basic.... Message-ID: changeset c1c7d4617bea in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c1c7d4617bea author: Andrew John Hughes date: Wed Sep 19 23:24:23 2012 +0100 PR1119: Test explicitly if javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener is missing (GCC#42003). 2012-09-19 Andrew John Hughes PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) are actually missing from the boot JDK * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Only include javax.swing.plaf.basic.BasicDirectoryModel if PR42003 is present in the boot JDK. * NEWS: List PR1119. Correct previous use of PR1119 which should be PR1121. * acinclude.m4: (IT_FIND_JAVAC): Add missing requirement of IT_CHECK_FOR_JDK. (IT_FIND_JAVA): Likewise. (IT_FIND_JAVAH): Likewise. (IT_FIND_JAR): Likewise. (IT_FIND_RMIC): Likewise. (IT_FIND_NATIVE2ASCII): Likewise. (IT_CHECK_FOR_METHOD): New macro to check for a method both at build-time and run-time. * configure.ac: Call IT_CHECK_FOR_METHOD for javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener. diffstat: ChangeLog | 23 +++++++++++++++++++++ Makefile.am | 7 +++++- NEWS | 4 ++- acinclude.m4 | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 8 ++++++- 5 files changed, 103 insertions(+), 3 deletions(-) diffs (206 lines): diff -r 7fe15479d719 -r c1c7d4617bea ChangeLog --- a/ChangeLog Mon Sep 03 20:06:53 2012 +0200 +++ b/ChangeLog Wed Sep 19 23:24:23 2012 +0100 @@ -1,3 +1,26 @@ +2012-09-19 Andrew John Hughes + + PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) + are actually missing from the boot JDK + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): Only include + javax.swing.plaf.basic.BasicDirectoryModel if + PR42003 is present in the boot JDK. + * NEWS: List PR1119. Correct previous use of + PR1119 which should be PR1121. + * acinclude.m4: + (IT_FIND_JAVAC): Add missing requirement of + IT_CHECK_FOR_JDK. + (IT_FIND_JAVA): Likewise. + (IT_FIND_JAVAH): Likewise. + (IT_FIND_JAR): Likewise. + (IT_FIND_RMIC): Likewise. + (IT_FIND_NATIVE2ASCII): Likewise. + (IT_CHECK_FOR_METHOD): New macro to check + for a method both at build-time and run-time. + * configure.ac: Call IT_CHECK_FOR_METHOD + for javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener. + 2012-09-03 Mark Wielaard * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after diff -r 7fe15479d719 -r c1c7d4617bea Makefile.am --- a/Makefile.am Mon Sep 03 20:06:53 2012 +0200 +++ b/Makefile.am Wed Sep 19 23:24:23 2012 +0100 @@ -68,7 +68,6 @@ # PR54274 - sun.security.other requires missing X509CRLSelector methods # PR54275 - sun.security.sasl requires missing Sasl.CREDENTIALS field ICEDTEA_BOOTSTRAP_CLASSES = \ - $(SHARE)/javax/swing/plaf/basic/BasicDirectoryModel.java \ $(SHARE)/javax/management/StandardMBean.java \ $(SHARE)/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java \ $(SHARE)/java/security/cert/X509CRLSelector.java \ @@ -76,6 +75,12 @@ $(SHARE)/javax/security/sasl/Sasl.java \ $(SHARE)/javax/security/auth/kerberos/KerberosTicket.java +#PR42003 - Missing javax.swing.plaf.basic.BasicDirectoryModel methods cause OpenJDK build failure +if LACKS_JAVAX_SWING_PLAF_BASIC_BASICDIRECTORYMODEL_ADDPROPERTYCHANGELISTENER +ICEDTEA_BOOTSTRAP_CLASSES += \ + $(SHARE)/javax/swing/plaf/basic/BasicDirectoryModel.java +endif + # Flags MEMORY_LIMIT = -J-Xmx1024m IT_CFLAGS=$(CFLAGS) $(ARCHFLAG) diff -r 7fe15479d719 -r c1c7d4617bea NEWS --- a/NEWS Mon Sep 03 20:06:53 2012 +0200 +++ b/NEWS Wed Sep 19 23:24:23 2012 +0100 @@ -23,7 +23,9 @@ - PR1050: Stream objects not garbage collected - PR1113: Add tapset tests to distribution. - PR1117: IcedTea6 prebuilds far too many classes on bootstrap - - PR1119: Old installs still suffer from GCC PR41686 + - PR1121: Old installs still suffer from GCC PR41686 + - PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) + are actually missing from the boot JDK * JamVM - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) - PPC: Don't use lwsync if it isn't supported diff -r 7fe15479d719 -r c1c7d4617bea acinclude.m4 --- a/acinclude.m4 Mon Sep 03 20:06:53 2012 +0200 +++ b/acinclude.m4 Wed Sep 19 23:24:23 2012 +0100 @@ -187,6 +187,7 @@ AC_DEFUN_ONCE([IT_FIND_JAVAC], [ + AC_REQUIRE([IT_CHECK_FOR_JDK]) JAVAC_DEFAULT=${SYSTEM_JDK_DIR}/bin/javac AC_MSG_CHECKING([if a javac binary was specified]) AC_ARG_WITH([javac], @@ -219,6 +220,7 @@ AC_DEFUN_ONCE([IT_FIND_JAVA], [ + AC_REQUIRE([IT_CHECK_FOR_JDK]) JAVA_DEFAULT=${SYSTEM_JDK_DIR}/bin/java AC_MSG_CHECKING([if a java binary was specified]) AC_ARG_WITH([java], @@ -372,6 +374,7 @@ AC_DEFUN([IT_FIND_JAVAH], [ + AC_REQUIRE([IT_CHECK_FOR_JDK]) JAVAH_DEFAULT=${SYSTEM_JDK_DIR}/bin/javah AC_MSG_CHECKING([if a javah binary was specified]) AC_ARG_WITH([javah], @@ -409,6 +412,7 @@ AC_DEFUN([IT_FIND_JAR], [ + AC_REQUIRE([IT_CHECK_FOR_JDK]) JAR_DEFAULT=${SYSTEM_JDK_DIR}/bin/jar AC_MSG_CHECKING([if a jar binary was specified]) AC_ARG_WITH([jar], @@ -479,6 +483,7 @@ AC_DEFUN([IT_FIND_RMIC], [ + AC_REQUIRE([IT_CHECK_FOR_JDK]) RMIC_DEFAULT=${SYSTEM_JDK_DIR}/bin/rmic AC_MSG_CHECKING([if a rmic binary was specified]) AC_ARG_WITH([rmic], @@ -516,6 +521,7 @@ AC_DEFUN([IT_FIND_NATIVE2ASCII], [ + AC_REQUIRE([IT_CHECK_FOR_JDK]) NATIVE2ASCII_DEFAULT=${SYSTEM_JDK_DIR}/bin/native2ascii AC_MSG_CHECKING([if a native2ascii binary was specified]) AC_ARG_WITH([native2ascii], @@ -1770,3 +1776,61 @@ AM_CONDITIONAL([CP40188_JAVAH], test x"${it_cv_cp40188_javah}" = "xyes") AC_PROVIDE([$0])dnl ]) + +dnl Generic macro to check for a Java method +dnl Takes four arguments: the name of the macro, +dnl the name of the class, the method signature +dnl and an example call to the method. The macro name +dnl is usually the name of the class with '.' +dnl replaced by '_' and all letters capitalised. +dnl e.g. IT_CHECK_FOR_METHOD([JAVA_UTIL_REGEX_MATCHER_QUOTEREPLACEMENT],[java.util.regex.Matcher.quoteReplacement],[java.util.rgex.Matcher],["quoteReplacement",String.class],java.util.regex.Matcher.quoteReplacement("Blah")) +AC_DEFUN([IT_CHECK_FOR_METHOD],[ +AC_REQUIRE([IT_CHECK_JAVA_AND_JAVAC_WORK]) +AC_CACHE_CHECK([if $2 is missing], it_cv_$1, [ +CLASS=Test.java +BYTECODE=$(echo $CLASS|sed 's#\.java##') +mkdir tmp.$$ +cd tmp.$$ +cat << \EOF > $CLASS +[/* [#]line __oline__ "configure" */ +import java.lang.reflect.Method; + +public class Test +{ + public static void main(String[] args) + { + Class cl = $3.class; + try + { + Method m = cl.getDeclaredMethod($4); + } + catch (NoSuchMethodException e) + { + System.exit(-1); + } + } + + public void dontRun() + { + $5; + } + +} +] +EOF +if $JAVAC -cp . $JAVACFLAGS -source 5 -target 5 -nowarn $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then + if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then + it_cv_$1=no; + else + it_cv_$1=yes; + fi +else + it_cv_$1=yes; +fi +]) +rm -f $CLASS *.class +cd .. +rmdir tmp.$$ +AM_CONDITIONAL([LACKS_$1], test x"${it_cv_$1}" = "xyes") +AC_PROVIDE([$0])dnl +]) diff -r 7fe15479d719 -r c1c7d4617bea configure.ac --- a/configure.ac Mon Sep 03 20:06:53 2012 +0200 +++ b/configure.ac Wed Sep 19 23:24:23 2012 +0100 @@ -57,6 +57,13 @@ IT_DISABLE_LANGTOOLS_TESTS IT_DISABLE_JDK_TESTS +IT_CHECK_FOR_METHOD([JAVAX_SWING_PLAF_BASIC_BASICDIRECTORYMODEL_ADDPROPERTYCHANGELISTENER], + [javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener], + [javax.swing.plaf.basic.BasicDirectoryModel], + ["addPropertyChangeListener",java.beans.PropertyChangeListener.class], + [javax.swing.plaf.basic.BasicDirectoryModel model = new javax.swing.plaf.basic.BasicDirectoryModel(new javax.swing.JFileChooser()); model.addPropertyChangeListener(model)] +) + # Use xvfb-run if found to run gui tests (check-jdk). AC_CHECK_PROG(XVFB_RUN_CMD, xvfb-run, [xvfb-run -a -e xvfb-errors], []) AC_SUBST(XVFB_RUN_CMD) @@ -142,7 +149,6 @@ AC_SUBST(OPENJDK_BUILD_DIR) IT_CHECK_IF_BOOTSTRAPPING -IT_CHECK_FOR_JDK IT_FIND_JAVA IT_FIND_COMPILER IT_FIND_JAVAH From ptisnovs at icedtea.classpath.org Thu Sep 20 03:02:56 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 20 Sep 2012 10:02:56 +0000 Subject: /hg/rhino-tests: * src/org/RhinoTests/CompilableTest.java: Message-ID: changeset c07fce915c2b in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=c07fce915c2b author: Pavel Tisnovsky date: Thu Sep 20 12:05:21 2012 +0200 * src/org/RhinoTests/CompilableTest.java: Added two new tests. * src/org/RhinoTests/CompilableClassTest.java: Removed unnecessarry explicit casting. * src/org/RhinoTests/CompiledScriptTest.java: Fixed typo. diffstat: ChangeLog | 9 ++ src/org/RhinoTests/CompilableClassTest.java | 3 +- src/org/RhinoTests/CompilableTest.java | 110 +++++++++++++++++++++++++++- src/org/RhinoTests/CompiledScriptTest.java | 1 + 4 files changed, 118 insertions(+), 5 deletions(-) diffs (176 lines): diff -r be1b5714e3f0 -r c07fce915c2b ChangeLog --- a/ChangeLog Wed Sep 19 10:18:40 2012 +0200 +++ b/ChangeLog Thu Sep 20 12:05:21 2012 +0200 @@ -1,3 +1,12 @@ +2012-09-20 Pavel Tisnovsky + + * src/org/RhinoTests/CompilableTest.java: + Added two new tests. + * src/org/RhinoTests/CompilableClassTest.java: + Removed unnecessarry explicit casting. + * src/org/RhinoTests/CompiledScriptTest.java: + Fixed typo. + 2012-09-19 Pavel Tisnovsky * src/org/RhinoTests/CompilableClassTest.java: diff -r be1b5714e3f0 -r c07fce915c2b src/org/RhinoTests/CompilableClassTest.java --- a/src/org/RhinoTests/CompilableClassTest.java Wed Sep 19 10:18:40 2012 +0200 +++ b/src/org/RhinoTests/CompilableClassTest.java Thu Sep 20 12:05:21 2012 +0200 @@ -51,7 +51,6 @@ import javax.script.Compilable; import javax.script.ScriptEngineManager; -import javax.script.ScriptEngine; @@ -92,7 +91,7 @@ * Test for method javax.script.Compilable.getClass().isInstance() */ protected void testIsInstance() { - assertTrue(this.compilableClass.isInstance((Compilable)(new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))), + assertTrue(this.compilableClass.isInstance((new ScriptEngineManager().getEngineByName(Constants.EngineNames.ENGINE_NAME_JavaScript))), "Method Compilable.getClass().isInstance() returns wrong value"); } diff -r be1b5714e3f0 -r c07fce915c2b src/org/RhinoTests/CompilableTest.java --- a/src/org/RhinoTests/CompilableTest.java Wed Sep 19 10:18:40 2012 +0200 +++ b/src/org/RhinoTests/CompilableTest.java Thu Sep 20 12:05:21 2012 +0200 @@ -40,18 +40,122 @@ package org.RhinoTests; +import javax.script.Compilable; +import javax.script.CompiledScript; +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; + /** - * TODO: not implemented + * This test case check the behaviour of CompiledScript abstract class and it's + * descendents. + * * @author Pavel Tisnovsky - * + * */ -public class CompilableTest { +public class CompilableTest extends BaseRhinoTest { + + /** + * Empty, but still valid script. + */ + private static final String EMPTY_SCRIPT = ""; + + /** + * Instance of ScriptEngineManager which is used by all tests in this test + * case. + */ + ScriptEngineManager engineManager; + + /** + * Instance of ScriptEngine which is used by all tests in this test case. + */ + ScriptEngine scriptEngine; + + @Override + protected void setUp(String[] args) { + // setup attribute used by tests + this.engineManager = new ScriptEngineManager(); + this.scriptEngine = this.engineManager.getEngineByName("JavaScript"); + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Helper method which tries to retrieve an instance of class which + * implements CompiledScript interface for a given script. + * + * @param scriptText + * script source code + * @return instance of CompiledScript class + * @throws AssertionError + * when CompilingEngine cannot be retrieved + * @throws ScriptException + * thrown when script cannot be compiled + */ + private CompiledScript getCompiledScript(String scriptText) throws AssertionError, ScriptException { + // check if retyping could be done + assertTrue(this.scriptEngine instanceof Compilable, "ScriptEngine does not implement Compilable"); + // scriptEngine should be also retyped to Compilable, at least in case of JavaScript. + Compilable compilingEngine = (Compilable) this.scriptEngine; + // should not happen, but... + assertNotNull(compilingEngine, "cannot get compiling engine"); + // try to compile given script + return compileScript(scriptText, compilingEngine); + } + + /** + * Helper method which tries to compile given JavaScript. + * + * @param scriptText script source code + * @param compilingEngine instance of class which implements Compilable interface + * @return compiled script + * @throws ScriptException + * @throws AssertionError + */ + private CompiledScript compileScript(String scriptText, Compilable compilingEngine) throws ScriptException, AssertionError { + CompiledScript script = compilingEngine.compile(scriptText); + assertNotNull(script, "cannot compile script"); + return script; + } + + /** + * Test if it is possible to compile script from a string. + * + * @throws ScriptException + * this exception is thrown when this test case failed. + */ + protected void testCompileScriptStoredInString() throws ScriptException { + Compilable compilingEngine = (Compilable)this.scriptEngine; + assertNotNull(compilingEngine, "cannot get compiling engine"); + if (compilingEngine != null) { + CompiledScript script = compilingEngine.compile(EMPTY_SCRIPT); + assertNotNull(script, "cannot compile script"); + } + } + + /** + * Test if it is possible to compile and then run script from a string. + * + * @throws ScriptException + * this exception is thrown when this test case failed. + */ + protected void testCompileAndRunSimpleScriptStoredInString() throws ScriptException { + CompiledScript script = getCompiledScript(EMPTY_SCRIPT); + Object result = script.eval(); + assertNull(result, "result should be null"); + } + /** * Entry point to this test case. * * @param args parameters passed from command line */ public static void main(String[] args) { + new CompilableTest().doTests(args); } } diff -r be1b5714e3f0 -r c07fce915c2b src/org/RhinoTests/CompiledScriptTest.java --- a/src/org/RhinoTests/CompiledScriptTest.java Wed Sep 19 10:18:40 2012 +0200 +++ b/src/org/RhinoTests/CompiledScriptTest.java Thu Sep 20 12:05:21 2012 +0200 @@ -67,6 +67,7 @@ @Override protected void setUp(String[] args) { + // setup attribute used by tests this.engineManager = new ScriptEngineManager(); this.scriptEngine = this.engineManager.getEngineByName("JavaScript"); } From jvanek at redhat.com Thu Sep 20 03:22:31 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 20 Sep 2012 12:22:31 +0200 Subject: [icedtea-web][rfc] Basic closing listeners implementation and example Message-ID: <505AEE67.8080203@redhat.com> As discussed here: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020293.html this is interface, integration and first and probably most useful implementation (and example) of closing listener idea: * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html: removed unnecessary XslowX * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html: aded missinf XslowX * tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java: added standard closing sentence * tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java: used auto*clsoing listeners * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: interface for identifying closing listeners * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added possibility to set timeout n the fly * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: (executeBrowser) added shortcut for autoclosing listeners, (setUpClosingListener) method for setting properties of ClosingListener (executeBrowser) add logic to handle ClosingListeners * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java: listener closing on "APPLET FINISHED" string * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java: listener closing on "xception" match * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java: listener closing on both xception and finished string. -------------- next part -------------- A non-text attachment was scrubbed... Name: closingListener_4_1.diff Type: text/x-patch Size: 18386 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120920/11e9dac1/closingListener_4_1.diff From jvanek at redhat.com Thu Sep 20 03:30:47 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 20 Sep 2012 12:30:47 +0200 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <5058A308.6050208@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> <1347985272.17468.53.camel@adomurad-desktop> <5058A308.6050208@redhat.com> Message-ID: <505AF057.1000909@redhat.com> On 09/18/2012 06:36 PM, Jiri Vanek wrote: > On 09/18/2012 06:21 PM, Adam Domurad wrote: >> On Tue, 2012-09-18 at 17:35 +0200, Jiri Vanek wrote: >>> On 09/17/2012 08:54 PM, Adam Domurad wrote: >>>> On Fri, 2012-08-17 at 12:19 +0200, Jiri Vanek wrote: >>>>> On 08/15/2012 06:57 PM, Jiri Vanek wrote: >>>>>> On 08/14/2012 05:50 PM, Adam Domurad wrote: >>>>>>> On Tue, 2012-08-14 at 17:06 +0200, Jiri Vanek wrote: >>>>>>>> This idea should speed up browser tests a lot. When all conditions for pass/failure are done, >>>>>>>> browser is terminated and is not waiting for time-out any more. >>>>>>>> It is bringing some more load to tester, but its usage is mandatory. >>>>>>> Thanks very much for the ideas! >>>>>>> >>>>>>> It would have been nice if it were like this from the beginning - but >>>>>>> nevertheless this would be a great improvement. >>>>>>> >>>>>>> I'm 100% for converting all tests to this form, and mandating it for >>>>>>> future applet tests. I'm sure as the most frequent runner of the test >>>>>>> suite you can agree, at least for mandating it for future tests :) >>>>>> >>>>>> Definitely! I will need some helpt to get it to tests in head ;) >>>>>>> >>>>>>>> >>>>>>>> Usage here is demonstrated on simple applet test. >>>>>>>> Any ideas (especially how to avoid doubled "contains" or "matches") welcomed. >>>>>>>> >>>>>>>> J. >>>>>>>> >>>>>>>> * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: Integrated >>>>>>>> ClosingListener >>>>>>>> speed-up. >>>>>>>> * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: New file, interface for all >>>>>>>> ClosingListeners. >>>>>>>> * tests/test-extensions/net/sourceforge/jnlp/CountingClosingListener.java: Implementation of >>>>>>>> ClsoingListeners which is storing copy of complete output of program. >>>>>>>> * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added (setTimeout) method as >>>>>>>> cleanest possibility to terminate process immediately >>>>>>>> * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: new method >>>>>>>> (setUpClosingListener) >>>>>>>> for setting necessary variables in ClosingListener >>>>>>> >>>>>>> This method is nice enough, although is it possible to have a >>>>>>> standardized way to see if an exception has caused the applet to stop ? >>>>>>> >>>>>>> I'm very much in favour of adding a clear end marker to the end of tests >>>>>>> rather than duplicating contains/matches. If you don't like a hardcoded >>>>>>> ending message, then, what if we had a closing listener implementation >>>>>>> that takes a single string as an argument, and a string is printed at >>>>>>> the end of the applet. Custom closing listeners could always also be >>>>>>> created. >>>>>>> >>>>>> >>>>>> I'm little bit against using such a constants (which must be copy pasted into reproducer to >>>>>> complete >>>>>> the evil ) but I admit it canhel a lot. But I would recommend to be careful with such a simple >>>>>> "terminator" - as exception can be thrown "later". >>>>>> >>>>>> Anyway some idea how to integrate this is in this updated patch. >>>>>> >>>>>> I have posted also one more idea to patch, and although it eliminates duplicity, it have quite >>>>>> a lot >>>>>> of code :-/. >>>>>> >>>>>> Both new apporaches shown in AppletTestSigned >>>>>> >>>>>> thanx for discussion, >>>>>> >>>>>> J. >>>>>> >>>>>> >>>>>> Ps - I have not tested this new code due to lack of time today so be patient with it. I will >>>>>> do in >>>>>> friday. I'm posting it for you to get the feedback for more ideas! >>>>> >>>>> No ideas ? Never mind - debugged version of above attached There was serious error in listeners >>>> I had ideas, I had to think them through though :) >>> >>> Good :) >>> >>>> I don't know if I like the verbosity here. Creating a contains-rule for >>> >>> Yap. I was little bit unhappy with it too. >>> >>>> everything separately and then combining them into an array of rules >>>> seems like a lot to simply close the browser at the right time. >>>> >>>> Better would be something like: >>>> RuleSet passingRules = new RuleSet().contains(str1, str2).matches(str3, >>>> str4); >>>> RuleSet failingRules = new RuleSet().contains(str5, str6).matches(str7, >>>> str8); >>> >>> Sure. This make sense. Just except RulesSet i would rather keep the class already in this patch >>> (unless you stroongly disagree with name). So: >> Name was illustrative, as long as its clear I have no preference >> (RulesSet isn't completely clear by itself). >>> >>> rulesFolowingClosingListener.add(rule1).add(rule2)... >>> >>> This is no problem to add and I like this idea. >> I still feel like a simple .contains(String...) and .matches(String...) >> would make this more palatable. 99% of rules are going to be 'contains' > > I agree.and I can include also not/match/not/contains simplifications. > > My main reason for Rules was to gather > > Assert.something("something should contains/match X", s.matches/contains(X)) > someClsongListener{ canClose(){ return s.matches/contains(X)}} > > this s.matches/contains(X) is thre three times. The rule should unify it. > > >> by the looks of it. If not, it would still be worthwhile to have a >> variable-number-of-arguments add function, so you can call eg >> rulesFolowingClosingListener.add(rule1, rule2). I really want think it >> would be most natural for the existing tests if the auto closing >> listener was, in most cases, just a bunch of strings to look for, which >> would typically be named constants anyway. >> >> It's still a little unwieldy, but I see your point about why you prefer >> it, more notes below. >>> >>>> But I'm still not sure. It would be much more ideal if the applet simply >>>> signal when it is completed somehow, independent of the validation >>>> rules. I think simply checking for an ***APPLET FINISHED*** message that >>> >>> I agree. Jana have also used just this simple approach.My only concern here is the magical string. >>> But I think we agre at this aprt, can I post final version of the idea with implemented and used >> Whether the version is final is up to reviewer ;) >>> >>> AutoOkClosingListener and AutoErrorClosingListener (although I believe only to AutoOkClosingListener >>> to be usefull at all) Ok. This basic part posted to review: [icedtea-web][rfc] Basic closing listeners implementation and example >> >>> >>> >>> >>>> was standard for all tests is a good-enough solution. It will cause all >>>> well-behaving applets to speed up, which should be at least the majority >>>> of them. It could also be nice to have some components common to all >>>> applets, (eg common patterns such as Killer thread), that way we could >>>> have something like TestAppletsUtil.printFinishedMessage(); >>> >>> I would like to satisfy your requirement, but I'm afraid of loosing of independence and of >>> simplicity ("one jar") of reprodcuers. But I'm also starting to feel that this becomes necessary. >>> >>> To achieve this, "troubles" will arise and we will have to deal with them: >>> - tools jars must be compiled and deployed to jnlp_test_server (no issue here except setting >>> IDEs) >>> - all reproducers (or some mark that "this particular one" ) have to be compiled with such a tool >>> jar/classes on classapth >>> - the applets/apps which are really using such a code must have this tools jar on classapth by >>> html/jnlp >>> >>> both above are breaking pureness of reproducer. I will be more happy if `some mark that "this >>> particular one"` will be invented but here I'm hesitating too [rfc] :) >> You're right ... I totally overlooked that the applets can't just >> magically access this jar :). That does make it a lot more messy than I >> thought. >> >>> >>>> >>>>> (also was caused your listeners in previous reproducer not working). It is included here but I'm >>>>> going to fix this separately. >>> >>> After posting Auto*ClosingListeners to review for you, I will attach patch or "patch" with rest of >>> listeners and with some "tools jar" to this thread to keep solving this. >>> >>> Please consider the advantages and disadvantages of "tools jar" and of other ClosingListeners >>> >>> I still think that the generalized Rules listeners can bring more advantages then the tools jars. >>> Damn I hate the tools jar. It can bring so much profit [magical string constants, killer and such a >>> stuff..] but I'm really afraid it can bring more unforeseen bad :( [failures due to one more jar on >>> classapth both compile and runtime time] >> I can understand your disdain for the idea... it is somewhat of an >> artificial addition to what are supposed to be simple isolated tests. >> >> There is the dark route of adding more testing based flags, so that eg a >> checkable message is printed whenever an applet destroy() or maybe >> stop() method is called. This has the similar brittleness of a hardcoded >> message however, and escapes the isolation of the test system.... >> Probably bad news. >> >> Your disdain for the tools jar idea is very understandable, and I'm >> inclined to agree. Overall, I'm starting to think that a standard, >> magic, "**APPLET FINISHED**" string copypasted into every applet is the >> best route. There would then be a convenient default closing listener >> provided that checks for "**APPLET FINISHED**". For most uses, this >> would be good enough. Where there are multiple exit scenarios and a >> single magic string isn't good, the other closing listeners could be >> used. >> > > agreed. ok. Here is attached second set of listeners - Ruels one. I still consider them as much more bullet-proof, safer, and in finish also much less verbose. I have added your chaining-add methods, although add/Not/Matches/Contains/ (all except addRule) are in conflict with the double code I wanted to prevent by adding them. If you mind, can you please considered as review of this second part? For now I'm considering the "tools-jar" as abandoned ok? Thanx for ideas, J. > >> Thanks for looking into this, >> - Adam >>> >>>>> >>>>> >>>>> J. >>>>> >>>> >>>> >>> >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: closingListener_4_2.diff Type: text/x-patch Size: 25475 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120920/d6ba2bb4/closingListener_4_2.diff From ptisnovs at icedtea.classpath.org Thu Sep 20 05:02:13 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 20 Sep 2012 12:02:13 +0000 Subject: /hg/gfx-test: * src/org/gfxtest/framework/BitmapCropRegions.java: Message-ID: changeset 9236cf2a422c in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=9236cf2a422c author: Pavel Tisnovsky date: Thu Sep 20 14:04:49 2012 +0200 * src/org/gfxtest/framework/BitmapCropRegions.java: Added new class containing clip regions (static fields) used by BitBlt tests. * src/org/gfxtest/framework/CommonBitmapOperations.java: Minor fix. * Makefile: Added new class to compile. diffstat: ChangeLog | 9 + Makefile | 1 + src/org/gfxtest/framework/BitmapCropRegions.java | 92 +++++++++++++++++++ src/org/gfxtest/framework/CommonBitmapOperations.java | 2 +- 4 files changed, 103 insertions(+), 1 deletions(-) diffs (135 lines): diff -r 69fc6f9b7bb7 -r 9236cf2a422c ChangeLog --- a/ChangeLog Tue Sep 18 14:00:08 2012 +0200 +++ b/ChangeLog Thu Sep 20 14:04:49 2012 +0200 @@ -1,3 +1,12 @@ +2012-09-20 Pavel Tisnovsky + + * src/org/gfxtest/framework/BitmapCropRegions.java: + Added new class containing clip regions (static fields) + used by BitBlt tests. + * src/org/gfxtest/framework/CommonBitmapOperations.java: + Minor fix. + * Makefile: Added new class to compile. + 2012-09-18 Pavel Tisnovsky * src/org/gfxtest/framework/CommonBitmapOperations.java: diff -r 69fc6f9b7bb7 -r 9236cf2a422c Makefile --- a/Makefile Tue Sep 18 14:00:08 2012 +0200 +++ b/Makefile Thu Sep 20 14:04:49 2012 +0200 @@ -97,6 +97,7 @@ $(CLASSES)/$(FRAMEWORK_DIR)/CommonClippingOperations.class \ $(CLASSES)/$(FRAMEWORK_DIR)/CommonPathsGenerator.class \ $(CLASSES)/$(FRAMEWORK_DIR)/CommonBitmapOperations.class \ + $(CLASSES)/$(FRAMEWORK_DIR)/BitmapCropRegions.class \ $(CLASSES)/$(FRAMEWORK_DIR)/EntityRenderingStyle.class \ $(CLASSES)/$(FRAMEWORK_DIR)/TestResult.class \ $(CLASSES)/$(FRAMEWORK_DIR)/ParameterNotFoundException.class \ diff -r 69fc6f9b7bb7 -r 9236cf2a422c src/org/gfxtest/framework/BitmapCropRegions.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/gfxtest/framework/BitmapCropRegions.java Thu Sep 20 14:04:49 2012 +0200 @@ -0,0 +1,92 @@ +/* + Java gfx-test framework + + Copyright (C) 2012 Red Hat + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +package org.gfxtest.framework; + + + +import java.awt.Rectangle; + + + +/** + * Definitions of crop regions used by various BitBlt tests. + * + * @author Pavel Tisnovsky + */ +public class BitmapCropRegions +{ + /** + * North-west part of tested image. + */ + public static Rectangle CROP_REGION_NW = new Rectangle( + 0, + 0, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT >> 1); + + /** + * North-east part of tested image. + */ + public static Rectangle CROP_REGION_NE = new Rectangle( + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH >> 1, + 0, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT >> 1); + + /** + * South-west part of tested image. + */ + public static Rectangle CROP_REGION_SW = new Rectangle( + 0, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT >> 1); + + /** + * South-east part of tested image. + */ + public static Rectangle CROP_REGION_SE = new Rectangle( + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_WIDTH >> 1, + CommonBitmapOperations.DEFAULT_TEST_IMAGE_HEIGHT >> 1); + +} diff -r 69fc6f9b7bb7 -r 9236cf2a422c src/org/gfxtest/framework/CommonBitmapOperations.java --- a/src/org/gfxtest/framework/CommonBitmapOperations.java Tue Sep 18 14:00:08 2012 +0200 +++ b/src/org/gfxtest/framework/CommonBitmapOperations.java Thu Sep 20 14:04:49 2012 +0200 @@ -412,7 +412,7 @@ // BitBlt with 1:1 scaling and cropping return performBitBlt(bufferedImage, image, graphics2d, cropRegion) ? TestResult.PASSED : TestResult.FAILED; } - + /** * Create new buffered image containing diagonal checker pattern and then perform basic BitBlt test. * From adomurad at redhat.com Thu Sep 20 07:21:49 2012 From: adomurad at redhat.com (Adam Domurad) Date: Thu, 20 Sep 2012 10:21:49 -0400 Subject: [icedtea-web][rfc] Basic closing listeners implementation and example In-Reply-To: <505AEE67.8080203@redhat.com> References: <505AEE67.8080203@redhat.com> Message-ID: <1348150909.20946.20.camel@adomurad-desktop> On Thu, 2012-09-20 at 12:22 +0200, Jiri Vanek wrote: > As discussed here: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020293.html > this is interface, integration and first and probably most useful implementation (and example) of > closing listener idea: > > * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html: removed unnecessary XslowX > * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html: aded missinf XslowX > * tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java: added standard closing sentence > * tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java: used auto*clsoing > listeners > * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: interface for identifying closing > listeners > * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: added possibility to set timeout n > the fly > * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: (executeBrowser) added shortcut for > autoclosing listeners, (setUpClosingListener) method for setting properties of ClosingListener > (executeBrowser) add logic to handle ClosingListeners > * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java: listener > closing on "APPLET FINISHED" string > * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java: > listener closing on "xception" match > * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java: > listener closing on both xception and finished string. > > Thanks for exploring so many possibilities! I'm liking what I see, comments inline. > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html > --- > a/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html Thu Sep 20 10:20:52 2012 +0200 > @@ -37,7 +37,7 @@ > --> > >

> - archive="XslowXAppletTestSigned.jar" codebase="." width="100" > height="100"> > + archive="AppletTestSigned.jar" codebase="." width="100" height="100"> > > > > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html Thu Sep 20 10:20:52 2012 +0200 > @@ -0,0 +1,46 @@ > + > + > +

> + archive="XslowXAppletTestSigned.jar" codebase="." width="100" > height="100"> > + > + > + > +

> + > + > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java > --- > a/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java Thu Sep 20 10:20:52 2012 +0200 > @@ -48,6 +48,7 @@ > try { > Thread.sleep(n); > System.out.println("AppletTestSigned killing himself > after " + n + " ms of life"); > + System.out.println("*** APPLET FINISHED ***"); > System.exit(0); > } catch (Exception ex) { > } > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java > --- > a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 10:20:52 2012 +0200 > @@ -84,15 +84,24 @@ > > @Test > @TestInBrowsers(testIn = {Browsers.all}) > - public void AppletTestSignedFirefoxTest() throws Exception { > + public void AppletTestSignedFirefoxTestXslowX() throws Exception > { > ServerAccess.PROCESS_TIMEOUT = 30 * 1000; > try { > - ProcessResult pr = > server.executeBrowser("/AppletTestSigned.html"); > + ProcessResult pr = > server.executeBrowser("/AppletTestSigned2.html"); > evaluateSignedApplet(pr, false); > - Assert.assertTrue(pr.wasTerminated); > + //Assert.assertTrue(pr.wasTerminated); > //Assert.assertEquals((Integer) 0, pr.returnValue); due > to destroy is null > } finally { > ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to > normal > } > } > + > + @Test > + @TestInBrowsers(testIn = {Browsers.all}) > + public void AppletTestSignedFirefoxTest() throws Exception { > + ProcessResult pr = > server.executeBrowser("/AppletTestSigned.html", > ServerAccess.AutoClose.CLOSE_ON_CORRECT_END); > + evaluateSignedApplet(pr, false); > + //Assert.assertTrue(pr.wasTerminated); > + //Assert.assertEquals((Integer) 0, pr.returnValue); due to > destroy is null > + } > } > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java Thu Sep 20 10:20:52 2012 +0200 > @@ -0,0 +1,55 @@ > +/* ClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp; > + > +public abstract class ClosingListener implements > ContentReaderListener { > + > + private ThreadedProcess process; > + private ProcessAssasin assasin; > + > + void setProcess(ThreadedProcess p) { > + this.process = p; > + } > + > + void setAssasin(ProcessAssasin assasin) { > + this.assasin = assasin; > + } > + > + public void terminate() { > + assasin.setTimeout(Long.MIN_VALUE); > + } > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java > --- > a/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java Thu Sep 20 10:20:52 2012 +0200 > @@ -98,6 +98,11 @@ > return skipInstedOfDesroy; > } > > + void setTimeout(long timeout) { > + this.timeout = timeout; > + } > + > + > @Override > public void run() { > long startTime = System.nanoTime() / > ServerAccess.NANO_TIME_DELIMITER; > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java > --- > a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Thu Sep 20 10:20:52 2012 +0200 > @@ -1,5 +1,5 @@ > /* ServerAccess.java > -Copyright (C) 2011 Red Hat, Inc. > +Copyright (C) 2011, 2012 Red Hat, Inc. > > This file is part of IcedTea. > > @@ -58,6 +58,8 @@ > import net.sourceforge.jnlp.browsertesting.Browser; > import net.sourceforge.jnlp.browsertesting.BrowserFactory; > import net.sourceforge.jnlp.browsertesting.Browsers; > +import > net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; > +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; > import org.junit.Assert; > > /** > @@ -77,6 +79,11 @@ > */ > public class ServerAccess { > > + public static enum AutoClose { > + > + CLOSE_ON_EXCEPTION, CLOSE_ON_CORRECT_END, CLOSE_ON_BOTH Maybe I'm being pedantic but CLOSE_ON_BOTH to me isn't as meaningful in isolation as I'd like it to be. Seeing as it's going to be the most common option, I would prefer if it was something like AutoClose.CLOSE_ON_EXIT, CLOSE_ON_EXCEPTION_EXIT, CLOSE_ON_CORRECT_EXIT. It should be readable in isolation, methinks. > + } > + > public static final long NANO_TIME_DELIMITER=1000000l; > /** > * java property which value containing path to default (makefile > by) directory with deployed resources > @@ -545,6 +552,20 @@ > public ProcessResult executeJavaws(String > resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) > throws Exception { > return executeJavaws(null, resource,stdoutl,stderrl); > } > + > + public net.sourceforge.jnlp.ProcessResult executeBrowser(String > string, AutoClose autoClose) throws Exception { Good idea putting the autoclose parameter here, looks convenient. > + ClosingListener errClosing = null; > + ClosingListener outClosing = null; > + if (autoClose == AutoClose.CLOSE_ON_BOTH || autoClose == > AutoClose.CLOSE_ON_EXCEPTION){ > + errClosing=new AutoErrorClosingListener(); > + } > + if (autoClose == AutoClose.CLOSE_ON_BOTH || autoClose == > AutoClose.CLOSE_ON_CORRECT_END){ > + outClosing=new AutoOkClosingListener(); > + } > + return executeBrowser(string, outClosing, errClosing); > + } > + > + > public ProcessResult executeBrowser(String resource) throws > Exception { > return executeBrowser(getBrowserParams(), resource); > } > @@ -797,6 +818,8 @@ > log(connectionMesaage, true, true); > } > ProcessAssasin pa = new ProcessAssasin(t, PROCESS_TIMEOUT); > + setUpClosingListener(stdoutl, pa, t); > + setUpClosingListener(stderrl, pa, t); > pa.start(); > t.start(); > while (t.getP() == null && t.deadlyException == null) { > @@ -834,6 +857,13 @@ > return pr; > } > > + private static void setUpClosingListener(ContentReaderListener > listener, ProcessAssasin pa, ThreadedProcess t) { > + if (listener != null && (listener instanceof > ClosingListener)) { > + ((ClosingListener) listener).setAssasin(pa); > + ((ClosingListener) listener).setProcess(t); > + } > + } > + > /** > * this is temprary solution until refactoring is fully done > * Use net.sourceforge.jnlp.ProcessResult instead > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java Thu Sep 20 10:20:52 2012 +0200 > @@ -0,0 +1,57 @@ > +/* CountingClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import net.sourceforge.jnlp.ClosingListener; > + > +public class AutoAllClosingListener extends ClosingListener { Seems like these 3 classes (Auto*ClosingListener) could be turned into a single class that takes a String[] argument. I would prefer that, but if you have reasons against this its fine. > + > + > + > + @Override > + public void charReaded(char ch) { > + > + } > + > + @Override > + public void lineReaded(String s) { > + if > (s.contains(AutoErrorClosingListener.MAGICAL_ERROR_CLOSING_STRING) || > s.contains(AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING)){ > + terminate(); > + } > + } > + > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java Thu Sep 20 10:20:52 2012 +0200 > @@ -0,0 +1,57 @@ > +/* AutoErrorClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import net.sourceforge.jnlp.ClosingListener; > + > +public class AutoErrorClosingListener extends ClosingListener { > + > + public static final String MAGICAL_ERROR_CLOSING_STRING = > "xception"; > + > + @Override > + public void charReaded(char ch) { > + > + } > + > + @Override > + public void lineReaded(String s) { > + if (s.contains(MAGICAL_ERROR_CLOSING_STRING)){ > + terminate(); > + } > + } > + > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java Thu Sep 20 10:20:52 2012 +0200 > @@ -0,0 +1,57 @@ > +/* CountingClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import net.sourceforge.jnlp.ClosingListener; > + > +public class AutoOkClosingListener extends ClosingListener { > + > + public static final String MAGICAL_OK_CLOSING_STRING = "*** > APPLET FINISHED ***"; > + > + @Override > + public void charReaded(char ch) { > + > + } > + > + @Override > + public void lineReaded(String s) { > + if (s.contains(MAGICAL_OK_CLOSING_STRING)){ > + terminate(); > + } > + } > + > +} > > Good patch! It should allow for a speed up of much of the tests without a terrible amount of effort. Thanks, - Adam From ahughes at redhat.com Thu Sep 20 08:00:21 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Thu, 20 Sep 2012 11:00:21 -0400 (EDT) Subject: [PATCH] fix dependencies for stamps/extract-jamvm.stamp In-Reply-To: <20120917142455.GJ17599@zelva.suse.cz> Message-ID: <1493407311.3352815.1348153221541.JavaMail.root@redhat.com> ----- Original Message ----- > > The stamps/download-jamvm.stamp must be called before extract-jamvm, > otherwise the tar xf $(JAMVM_SRC_ZIP) might get a wrong path. > > diff -r 2eb479d57f25 -r f6ca0873f6b5 ChangeLog > --- a/ChangeLog Wed Sep 05 11:41:19 2012 +0200 > +++ b/ChangeLog Mon Sep 17 16:09:42 2012 +0200 > @@ -1,3 +1,9 @@ > +2012-09-17 Michal Vyskocil > + > + * Makefile.am: > + (stamps/extract-jamvm.stamp): Depends on > stamps/download-jamvm.stamp. > + Fix the dependency problem on JamVM build. > + > 2012-09-05 Matthias Klose > > configure.ac: Remove the Xp header and library checks. > diff -r 2eb479d57f25 -r f6ca0873f6b5 Makefile.am > --- a/Makefile.am Wed Sep 05 11:41:19 2012 +0200 > +++ b/Makefile.am Mon Sep 17 16:09:42 2012 +0200 > @@ -1285,7 +1285,7 @@ > clean-extract-cacao: clean-cacao > rm -f stamps/extract-cacao.stamp > > -stamps/extract-jamvm.stamp: > +stamps/extract-jamvm.stamp: stamps/download-jamvm.stamp > if BUILD_JAMVM > set -e ; \ > if ! test -d jamvm ; \ > Which tree is this? I didn't see an issue in IcedTea6 when I was working on it yesterday. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From andrew at icedtea.classpath.org Thu Sep 20 08:33:50 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 20 Sep 2012 15:33:50 +0000 Subject: /hg/icedtea6: PR1119: Remove com.sun.java.swing.plaf.nimbus.Nimb... Message-ID: changeset 36b093404170 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=36b093404170 author: Andrew John Hughes date: Thu Sep 20 16:33:37 2012 +0100 PR1119: Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel from bootstrap classes. Unneeded. 2012-09-20 Andrew John Hughes * Makefile.am: (ICEDTEA_BOOTSTRAP_CLASSES): Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel. diffstat: ChangeLog | 6 ++++++ Makefile.am | 1 - 2 files changed, 6 insertions(+), 1 deletions(-) diffs (24 lines): diff -r c1c7d4617bea -r 36b093404170 ChangeLog --- a/ChangeLog Wed Sep 19 23:24:23 2012 +0100 +++ b/ChangeLog Thu Sep 20 16:33:37 2012 +0100 @@ -1,3 +1,9 @@ +2012-09-20 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): + Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel. + 2012-09-19 Andrew John Hughes PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) diff -r c1c7d4617bea -r 36b093404170 Makefile.am --- a/Makefile.am Wed Sep 19 23:24:23 2012 +0100 +++ b/Makefile.am Thu Sep 20 16:33:37 2012 +0100 @@ -69,7 +69,6 @@ # PR54275 - sun.security.sasl requires missing Sasl.CREDENTIALS field ICEDTEA_BOOTSTRAP_CLASSES = \ $(SHARE)/javax/management/StandardMBean.java \ - $(SHARE)/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java \ $(SHARE)/java/security/cert/X509CRLSelector.java \ $(SHARE)/java/security/cert/X509CertSelector.java \ $(SHARE)/javax/security/sasl/Sasl.java \ From adomurad at redhat.com Thu Sep 20 07:58:55 2012 From: adomurad at redhat.com (Adam Domurad) Date: Thu, 20 Sep 2012 10:58:55 -0400 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <505AF057.1000909@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> <1347985272.17468.53.camel@adomurad-desktop> <5058A308.6050208@redhat.com> <505AF057.1000909@redhat.com> Message-ID: <1348153135.20946.47.camel@adomurad-desktop> > >> inclined to agree. Overall, I'm starting to think that a standard, > >> magic, "**APPLET FINISHED**" string copypasted into every applet is the > >> best route. There would then be a convenient default closing listener > >> provided that checks for "**APPLET FINISHED**". For most uses, this > >> would be good enough. Where there are multiple exit scenarios and a > >> single magic string isn't good, the other closing listeners could be > >> used. > >> > > > > agreed. > > > ok. Here is attached second set of listeners - Ruels one. I still consider them as much more > bullet-proof, safer, and in finish also much less verbose. > > I have added your chaining-add methods, although add/Not/Matches/Contains/ (all except addRule) are > in conflict with the double code I wanted to prevent by adding them. > > If you mind, can you please considered as review of this second part? > > > For now I'm considering the "tools-jar" as abandoned ok? Yes agreed, sorry if I wasn't clear. Thinking about it further, this isn't as useful as it is hazardous. > > > Thanx for ideas, > J. > > > > >> Thanks for looking into this, > >> - Adam > >>> > >>>>> > >>>>> > >>>>> J. > >>>>> > >>>> > >>>> > >>> > >> > >> > > > > diff -r d23356f8a7a6 > tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java > --- > a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 10:55:16 2012 +0200 > +++ > b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 12:03:40 2012 +0200 > @@ -43,6 +43,8 @@ > import net.sourceforge.jnlp.browsertesting.BrowserTest; > import net.sourceforge.jnlp.browsertesting.Browsers; > import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import net.sourceforge.jnlp.closinglisteners.Rule; > +import > net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; > import org.junit.Assert; > > import org.junit.Test; > @@ -50,8 +52,22 @@ > public class AppletTestSignedTests extends BrowserTest { > > private final List l = > Collections.unmodifiableList(Arrays.asList(new > String[]{"-Xtrustall"})); > + private static final String ss = "xception"; > + private static final String s0 = "AppletTestSigned was started"; > + private static final String s1 = "value1"; > + private static final String s2 = "value2"; > + private static final String s3 = "AppletTestSigned was > initialised"; > + private static final String s7 = "AppletTestSigned killing > himself after 2000 ms of life"; > + private static final RulesFolowingClosingListener.ContainsRule > crss = new RulesFolowingClosingListener.ContainsRule(ss); Still a bit of verbosity here that is just a little off-putting (mainly because of Java requiring type twice to be honest - once in declaration and once in initialization :). The part that's supposed to be the most meaningful (the variable name) has the least verbosity. It would be a bit better I think if the line read something like: private static final Rule exceptionRule = new ContainsRule(ss); Note that this doesn't require you to move the ContainsRule class, but simply import RulesFolowingClosingListener.ContainsRule; > + private static final RulesFolowingClosingListener.ContainsRule > s0ss = new RulesFolowingClosingListener.ContainsRule(s0); > + private static final RulesFolowingClosingListener.ContainsRule > s1ss = new RulesFolowingClosingListener.ContainsRule(s1); > + private static final RulesFolowingClosingListener.ContainsRule > s2ss = new RulesFolowingClosingListener.ContainsRule(s2); > + private static final RulesFolowingClosingListener.ContainsRule > s3ss = new RulesFolowingClosingListener.ContainsRule(s3); > + private static final RulesFolowingClosingListener.ContainsRule > s7ss = new RulesFolowingClosingListener.ContainsRule(s7); > + private static final Rule[] okRules = new Rule[]{s0ss, s1ss, > s2ss, s3ss, s7ss}; > + private static final Rule[] errorRrules = new Rule[]{crss}; Rrules -> Rules > > - @Test > + // @Test > public void AppletTestSignedTest() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(l, > "/AppletTestSigned.jnlp"); > evaluateSignedApplet(pr, true); > @@ -60,18 +76,12 @@ > } > > private void evaluateSignedApplet(ProcessResult pr, boolean > javawsApplet) { > - String s3 = "AppletTestSigned was initialised"; > - Assert.assertTrue("AppletTestSigned stdout should contain " + > s3 + " but didn't", pr.stdout.contains(s3)); > - String s0 = "AppletTestSigned was started"; > - Assert.assertTrue("AppletTestSigned stdout should contain " + > s0 + " but didn't", pr.stdout.contains(s0)); > - String s1 = "value1"; > - Assert.assertTrue("AppletTestSigned stdout should contain " + > s1 + " but didn't", pr.stdout.contains(s1)); > - String s2 = "value2"; > - Assert.assertTrue("AppletTestSigned stdout should contain " + > s2 + " but didn't", pr.stdout.contains(s2)); > - String ss = "xception"; > - Assert.assertFalse("AppletTestSigned stderr should not > contain " + ss + " but did", pr.stderr.contains(ss)); > - String s7 = "AppletTestSigned killing himself after 2000 ms > of life"; > - Assert.assertTrue("AppletTestSigned stdout should contain " + > s7 + " but didn't", pr.stdout.contains(s7)); > + Assert.assertTrue("AppletTestSigned stdout " + > s3ss.toString() + " but didn't", s3ss.evaluate(pr.stdout)); > + Assert.assertTrue("AppletTestSigned stdout " + > s0ss.toString() + " but didn't", s0ss.evaluate(pr.stdout)); > + Assert.assertTrue("AppletTestSigned stdout " + > s1ss.toString() + " but didn't", s1ss.evaluate(pr.stdout)); > + Assert.assertTrue("AppletTestSigned stdout " + > s2ss.toString() + " but didn't", s2ss.evaluate(pr.stdout)); > + Assert.assertFalse("AppletTestSigned stderr " + > crss.toNotString() + " but did", crss.evaluate(pr.stderr)); > + Assert.assertTrue("AppletTestSigned stdout " + > s7ss.toString() + " but didn't", s7ss.evaluate(pr.stdout)); > if (!javawsApplet) { > /*this is working correctly in most browser, but not in > all. temporarily disabling > String s4 = "AppletTestSigned was stopped"; > @@ -87,7 +97,7 @@ > public void AppletTestSignedFirefoxTestXslowX() throws Exception > { > ServerAccess.PROCESS_TIMEOUT = 30 * 1000; > try { > - ProcessResult pr = > server.executeBrowser("/AppletTestSigned2.html"); > + ProcessResult pr = > server.executeBrowser("/AppletTestSigned2.html",new > RulesFolowingClosingListener(okRules),new > RulesFolowingClosingListener(errorRrules)); > evaluateSignedApplet(pr, false); > //Assert.assertTrue(pr.wasTerminated); > //Assert.assertEquals((Integer) 0, pr.returnValue); due > to destroy is null > diff -r d23356f8a7a6 > tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java > --- > a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Sep 20 10:55:16 2012 +0200 > +++ > b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Sep 20 12:03:40 2012 +0200 > @@ -35,6 +35,7 @@ > exception statement from your version. > */ > > +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; > import net.sourceforge.jnlp.ProcessResult; > import net.sourceforge.jnlp.ServerAccess; > import net.sourceforge.jnlp.browsertesting.BrowserTest; > @@ -47,6 +48,24 @@ > > public class AppletTestTests extends BrowserTest { > > + private final String s7 = "Aplet killing himself after 2000 ms of > life"; Aplet -> Applet (Is there another occurence of this typo ?) > + private final String ss = "xception"; I'm wondering what case this covers as opposed to "Exception" ? It's fine though, as there are no other english words that end in xception :) > + private final String s2 = "value2"; > + private final String s1 = "value1"; > + private final String s0 = "applet was started"; > + private final String s3 = "applet was initialised"; > + > + private class CountingClosingListenerImpl extends > CountingClosingListener { > + > + @Override > + protected boolean isAlowedToFinish(String s) { > + if (s.contains(ss)) { > + return true; > + } > + return (s.contains(s0) && s.contains(s1) && > s.contains(s2) && s.contains(s3) && s.contains(s7)); > + } > + } > + > @Test > @TestInBrowsers(testIn = {Browsers.googleChrome}) > @NeedsDisplay > @@ -55,7 +74,7 @@ > try { > //System.out.println("connecting AppletInFirefoxTest > request in " + getBrowser().toString()); > //just verify loging is recording browser > - ProcessResult pr1 = > server.executeBrowser("/appletAutoTests.html"); > + ProcessResult pr1 = > server.executeBrowser("/appletAutoTests2.html", new > CountingClosingListenerImpl(), new CountingClosingListenerImpl()); > if (pr1.process == null) { > Assert.assertTrue("If proces was null here, then > google-chrome had to not exist, and so " > + ServerAccess.UNSET_BROWSER > @@ -64,12 +83,12 @@ > > pr1.deadlyException.getMessage().contains(ServerAccess.UNSET_BROWSER)); > return; > } > - evaluateApplet(pr1,false); > + evaluateApplet(pr1, false); > Assert.assertTrue(pr1.wasTerminated); > //System.out.println("connecting AppletInFirefoxTest > request in " + getBrowser().toString()); > // just verify loging is recording browser > - ServerAccess.ProcessResult pr = > server.executeBrowser("/appletAutoTests.html"); > - evaluateApplet(pr,false); > + ServerAccess.ProcessResult pr = > server.executeBrowser("/appletAutoTests2.html", new > CountingClosingListenerImpl(), new CountingClosingListenerImpl()); > + evaluateApplet(pr, false); > Assert.assertTrue(pr.wasTerminated); > } finally { > ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to > normal > @@ -80,30 +99,24 @@ > @NeedsDisplay > public void AppletTest() throws Exception { > ProcessResult pr = server.executeJavawsHeadless(null, > "/AppletTest.jnlp"); > - evaluateApplet(pr,true); > + evaluateApplet(pr, true); > Assert.assertFalse(pr.wasTerminated); > Assert.assertEquals((Integer) 0, pr.returnValue); > } > > private void evaluateApplet(ProcessResult pr, boolean > javawsApplet) { > - String s3 = "applet was initialised"; > Assert.assertTrue("AppletTest stdout should contains " + s3 + > " bud didn't", pr.stdout.contains(s3)); > - String s0 = "applet was started"; > Assert.assertTrue("AppletTest stdout should contains " + s0 + > " bud didn't", pr.stdout.contains(s0)); > - String s1 = "value1"; > Assert.assertTrue("AppletTest stdout should contains " + s1 + > " bud didn't", pr.stdout.contains(s1)); > - String s2 = "value2"; > Assert.assertTrue("AppletTest stdout should contains " + s2 + > " bud didn't", pr.stdout.contains(s2)); > - String ss = "xception"; > Assert.assertFalse("AppletTest stderr should not contains " + > ss + " but did", pr.stderr.contains(ss)); > - String s7 = "Aplet killing himself after 2000 ms of life"; > Assert.assertTrue("AppletTest stdout should contains " + s7 + > " bud didn't", pr.stdout.contains(s7)); > if (!javawsApplet) { > /*this is working correctly in most browser, but not in > all. temporarily disabling > - String s4 = "applet was stopped"; > - Assert.assertTrue("AppletTest stdout should contains " + s4 + > " bud did't", pr.stdout.contains(s4)); > - String s5 = "applet will be destroyed"; > - Assert.assertTrue("AppletTest stdout should contains " + s5 + > " bud did't", pr.stdout.contains(s5)); > + String s4 = "applet was stopped"; > + Assert.assertTrue("AppletTest stdout should contains " + > s4 + " bud did't", pr.stdout.contains(s4)); > + String s5 = "applet will be destroyed"; > + Assert.assertTrue("AppletTest stdout should contains " + > s5 + " bud did't", pr.stdout.contains(s5)); > */ > } > } > @@ -116,8 +129,8 @@ > //just verify loging is recordingb rowser > ServerAccess.PROCESS_TIMEOUT = 30 * 1000; > try { > - ProcessResult pr = > server.executeBrowser("/appletAutoTests2.html"); > - evaluateApplet(pr,false); > + ProcessResult pr = > server.executeBrowser("/appletAutoTests2.html", new > CountingClosingListenerImpl(), new CountingClosingListenerImpl()); > + evaluateApplet(pr, false); > Assert.assertTrue(pr.wasTerminated); > //Assert.assertEquals((Integer) 0, pr.returnValue); due > to destroy is null > } finally { > @@ -132,9 +145,9 @@ > //just verify loging is recording browser > ServerAccess.PROCESS_TIMEOUT = 30 * 1000; > try { > - ProcessResult pr = > server.executeBrowser("/appletAutoTests.html"); > + ProcessResult pr = > server.executeBrowser("/appletAutoTests.html", new > CountingClosingListenerImpl(), new CountingClosingListenerImpl()); > pr.process.destroy(); > - evaluateApplet(pr,false); > + evaluateApplet(pr, false); > Assert.assertTrue(pr.wasTerminated); > //Assert.assertEquals((Integer) 0, pr.returnValue); due > to destroy is null > } finally { > diff -r d23356f8a7a6 > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java Thu Sep 20 12:03:40 2012 +0200 > @@ -0,0 +1,60 @@ > +/* CountingClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import net.sourceforge.jnlp.ClosingListener; > + > +public abstract class CountingClosingListener extends ClosingListener > { > + > + protected StringBuilder sb = new StringBuilder(); > + > + @Override > + public void charReaded(char ch) { > + sb.append(ch); > + if (isAlowedToFinish(sb.toString())) { > + terminate(); > + } > + > + } > + > + @Override > + public void lineReaded(String s) { > + //nothing to do > + } > + > + protected abstract boolean isAlowedToFinish(String content); > +} > diff -r d23356f8a7a6 > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java Thu Sep 20 12:03:40 2012 +0200 > @@ -0,0 +1,47 @@ > +/* Rule.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > +package net.sourceforge.jnlp.closinglisteners; > + > +public interface Rule { Oh boy this is so generic it reminds me of the Boost C++ library :). (If you're unfamiliar, almost all their types take parameters.) > + > + public void setRule(S rule); > + public boolean evaluate(T upon); > + @Override > + public String toString(); > + public String toNotString(); > + > +} > diff -r d23356f8a7a6 > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java Thu Sep 20 12:03:40 2012 +0200 > @@ -0,0 +1,238 @@ > +/* RulesFolowingClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import java.util.ArrayList; > +import java.util.Arrays; > +import java.util.List; > + > +public class RulesFolowingClosingListener extends > CountingClosingListener { > + > + private List rules = new ArrayList(); > + > + public static class ContainsRule extends StringRule String> { > + > + public ContainsRule(String s) { > + super(s); > + } There's considerable overlap between Contains and NotContains, what do you think about an inversion flag ? > + > + @Override > + public boolean evaluate(String upon) { > + return (upon.contains(rule)); > + } > + > + @Override > + public String toString() { > + return "should contains `" + rule + "`"; > + } 'should contains' -> 'should contain' Although its a tough call, I'm inclined to say this is a bit of an abuse of toString(). It's a built-in that doesn't have a natural 'opposite' like you're giving it. toPassingString() and to toFailingString() might be better, but feel free to leave it if it feels more natural to you. > + > + @Override > + public String toNotString() { > + return "should NOT contains `" + rule + "`"; 'should NOT contains' -> 'should NOT contain', similar cases below > + } > + } > + > + public static class NotContainsRule extends StringRule String> { > + > + public NotContainsRule(String s) { > + super(s); > + } > + > + @Override > + public boolean evaluate(String upon) { > + return !(upon.contains(rule)); > + } > + > + @Override > + public String toString() { > + return "should NOT contains `" + rule + "`"; > + } > + > + @Override > + public String toNotString() { > + return "should contains `" + rule + "`"; > + } > + } > + > + public static class MatchesRule extends StringRule String> { > + > + public MatchesRule(String s) { > + super(s); > + } > + > + @Override > + public boolean evaluate(String upon) { > + return (upon.matches(rule)); > + } > + > + @Override > + public String toString() { > + return "should match `" + rule + "`"; > + } > + > + @Override > + public String toNotString() { > + return "should NOT match `" + rule + "`"; > + } > + } > + > + public static class NotMatchesRule extends StringRule String> { > + > + public NotMatchesRule(String s) { > + super(s); > + } > + > + @Override > + public boolean evaluate(String upon) { > + return !(upon.matches(rule)); > + } > + > + @Override > + public String toString() { > + return "should NOT match`" + rule + "`"; > + } > + > + @Override > + public String toNotString() { > + return "should match`" + rule + "`"; > + } > + } > + > + /** > + * > + * @param rule > + * @return self, to alow chaing add(...).add(..)... > + */ > + public RulesFolowingClosingListener addRule(Rule rule) { > + this.rules.add(rule); > + return this; > + } > + > + /** > + * > + * @param rule > + * @return self, to alow chaing add(...).add(..)... > + */ > + public RulesFolowingClosingListener addMatchingRule(String rule) > { > + this.rules.add(new MatchesRule(rule)); > + return this; > + } > + > + /** > + * > + * @param rule > + * @return self, to alow chaing add(...).add(..)... > + */ > + public RulesFolowingClosingListener addNotMatchingRule(String > rule) { > + this.rules.add(new NotMatchesRule(rule)); > + return this; > + } > + > + /** > + * > + * @param rule > + * @return self, to alow chaing add(...).add(..)... > + */ > + public RulesFolowingClosingListener addContainsRule(String rule) > { > + this.rules.add(new ContainsRule(rule)); > + return this; > + } > + > + /** > + * > + * @param rule > + * @return self, to alow chaing add(...).add(..)... > + */ > + public RulesFolowingClosingListener addNotContainsRule(String > rule) { > + this.rules.add(new NotContainsRule(rule)); > + return this; > + } > + > + public RulesFolowingClosingListener() { > + } > + > + public RulesFolowingClosingListener(List l) { > + addRules(l); > + } > + > + public RulesFolowingClosingListener(Rule[] l) { > + addRules(l); > + } > + > + public void setRules(List rules) { > + if (rules == null) { > + throw new NullPointerException("rules cant be null"); > + } > + this.rules = rules; > + } > + > + public void setRules(Rule[] rules) { > + if (rules == null) { > + throw new NullPointerException("rules cant be null"); > + } > + this.rules = Arrays.asList(rules); > + } > + > + public void addRules(List rules) { > + if (rules == null) { > + throw new NullPointerException("rules cant be null"); > + } > + this.rules.addAll(rules); > + } > + > + public void addRules(Rule[] rules) { Is there a reason you wouldn't want this as Rule... ? This would still allow for passing an array, but allow more convenience than creating an array explicitly. > + if (rules == null) { > + throw new NullPointerException("rules cant be null"); > + } > + this.rules.addAll(Arrays.asList(rules)); > + } > + > + @Override > + protected boolean isAlowedToFinish(String content) { > + if (rules == null || rules.size() < 1) { > + throw new IllegalStateException("No rules specified"); > + } > + for (Rule rule : rules) { > + if (!rule.evaluate(content)) { So all rules have to match for it to close ? > + return false; > + } > + } > + return true; > + > + > + } > +} > diff -r d23356f8a7a6 > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java Thu Sep 20 12:03:40 2012 +0200 > @@ -0,0 +1,57 @@ > +/* StringRule.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > +package net.sourceforge.jnlp.closinglisteners; > + > +public abstract class StringRule implements Rule T>{ I'm confused, why isn't this type simply StringRule ? (Isn't String here being parsed as a generic type ?? I must admit I've never seen concrete types in this location.) > + protected String rule; > + > + public StringRule(String rule) { > + setRule(rule); > + } > + > + public StringRule() { > + } > + > + > + @Override > + public void setRule(String rule){ > + this.rule=rule; > + } > + @Override > + public abstract boolean evaluate(T upon); > + > +} > Thanks for the patch! - Adam From ptisnovs at icedtea.classpath.org Fri Sep 21 02:42:52 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 21 Sep 2012 09:42:52 +0000 Subject: /hg/gfx-test: Added ten new tests to the test suite src/org/gfxt... Message-ID: changeset 9de74cb93444 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=9de74cb93444 author: Pavel Tisnovsky date: Fri Sep 21 11:45:20 2012 +0200 Added ten new tests to the test suite src/org/gfxtest/testsuites/BitBltCropImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltCropImage.java | 176 +++++++++++++++++++++++- 2 files changed, 178 insertions(+), 3 deletions(-) diffs (211 lines): diff -r 9236cf2a422c -r 9de74cb93444 ChangeLog --- a/ChangeLog Thu Sep 20 14:04:49 2012 +0200 +++ b/ChangeLog Fri Sep 21 11:45:20 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-21 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltCropImage.java: + Added ten new tests to this test suite. + 2012-09-20 Pavel Tisnovsky * src/org/gfxtest/framework/BitmapCropRegions.java: diff -r 9236cf2a422c -r 9de74cb93444 src/org/gfxtest/testsuites/BitBltCropImage.java --- a/src/org/gfxtest/testsuites/BitBltCropImage.java Thu Sep 20 14:04:49 2012 +0200 +++ b/src/org/gfxtest/testsuites/BitBltCropImage.java Fri Sep 21 11:45:20 2012 +0200 @@ -36,11 +36,22 @@ this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. -*/ + */ package org.gfxtest.testsuites; + + +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + + + +import org.gfxtest.framework.BitmapCropRegions; +import org.gfxtest.framework.CommonBitmapOperations; import org.gfxtest.framework.GfxTest; +import org.gfxtest.framework.TestImage; +import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.BitBltOperation; import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; @@ -70,10 +81,169 @@ @Zoom(1) public class BitBltCropImage extends GfxTest { + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. No crop is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryNoCrop(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropNW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropNE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropSW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropSE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_SE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * No crop is performed to that image. + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBNoCrop(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropNW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropNE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropSW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropSE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_SE); + } + /** * Entry point to the test suite. - * - * @param args not used in this case + * + * @param args + * not used in this case */ public static void main(String[] args) { From ptisnovs at icedtea.classpath.org Fri Sep 21 04:01:56 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 21 Sep 2012 11:01:56 +0000 Subject: /hg/rhino-tests: Five new tests & fixed some minor issues in the... Message-ID: changeset 0c41d28346b9 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=0c41d28346b9 author: Pavel Tisnovsky date: Fri Sep 21 13:04:34 2012 +0200 Five new tests & fixed some minor issues in the test case src/org/RhinoTests/CompiledScriptClassTest.java. diffstat: ChangeLog | 5 ++ src/org/RhinoTests/CompiledScriptClassTest.java | 62 +++++++++++++++++++++++- 2 files changed, 63 insertions(+), 4 deletions(-) diffs (108 lines): diff -r c07fce915c2b -r 0c41d28346b9 ChangeLog --- a/ChangeLog Thu Sep 20 12:05:21 2012 +0200 +++ b/ChangeLog Fri Sep 21 13:04:34 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-21 Pavel Tisnovsky + + * src/org/RhinoTests/CompiledScriptClassTest.java: + Five new tests & fixed some minor issues. + 2012-09-20 Pavel Tisnovsky * src/org/RhinoTests/CompilableTest.java: diff -r c07fce915c2b -r 0c41d28346b9 src/org/RhinoTests/CompiledScriptClassTest.java --- a/src/org/RhinoTests/CompiledScriptClassTest.java Thu Sep 20 12:05:21 2012 +0200 +++ b/src/org/RhinoTests/CompiledScriptClassTest.java Fri Sep 21 13:04:34 2012 +0200 @@ -190,10 +190,64 @@ } /** + * Test for method javax.script.CompiledScript.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.compiledScriptClass.isAnnotation(), + "Method CompiledScript.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.CompiledScript.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.Override.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.compiledScriptClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method CompiledScript.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.CompiledScript.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.compiledScriptClass.isAnonymousClass(), + "Method CompiledScript.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.CompiledScript.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.compiledScriptClass.isArray(), + "Method CompiledScript.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.CompiledScript.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.compiledScriptClass.isEnum(), + "Method CompiledScript.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.CompiledScript.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.compiledScriptClass.getInterfaces()); + List> interfaces = Arrays.asList(this.compiledScriptClass.getInterfaces()); assertTrue(interfaces.isEmpty(), "list of implemented interfaces should be empty"); } @@ -261,7 +315,7 @@ * Test for method javax.script.CompiledScript.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.compiledScriptClass.getSuperclass(); + Class superClass = this.compiledScriptClass.getSuperclass(); String superClassName = superClass.getName(); assertEquals(superClassName, "java.lang.Object", "Method CompiledScript.getClass().getSuperclass() returns wrong value " + superClassName); @@ -271,7 +325,7 @@ * Test for method javax.script.CompiledScript.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.compiledScriptClass.getConstructors(); + Constructor[] constructors = this.compiledScriptClass.getConstructors(); assertEquals(constructors.length, 1, "only one constructor should be set"); String constructorName; String constructorString; @@ -287,7 +341,7 @@ * Test for method javax.script.CompiledScript.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.compiledScriptClass.getDeclaredConstructors(); + Constructor[] constructors = this.compiledScriptClass.getDeclaredConstructors(); assertEquals(constructors.length, 1, "only one constructor should be set"); String constructorName; String constructorString; From fw at deneb.enyo.de Sun Sep 23 02:05:55 2012 From: fw at deneb.enyo.de (Florian Weimer) Date: Sun, 23 Sep 2012 11:05:55 +0200 Subject: Status of non-Hotspot VMs and Shark Message-ID: <877grlf6rw.fsf@mid.deneb.enyo.de> What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? Are they officially released/supported? What about the zero port? I'm wondering which of these VMs should be part of the upcoming Debian stable release. From mvyskocil at suse.cz Mon Sep 24 03:55:21 2012 From: mvyskocil at suse.cz (Michal Vyskocil) Date: Mon, 24 Sep 2012 12:55:21 +0200 Subject: [PATCH] fix dependencies for stamps/extract-jamvm.stamp In-Reply-To: <1493407311.3352815.1348153221541.JavaMail.root@redhat.com> References: <20120917142455.GJ17599@zelva.suse.cz> <1493407311.3352815.1348153221541.JavaMail.root@redhat.com> Message-ID: <20120924105521.GA17599@zelva.suse.cz> On Thu, Sep 20, 2012 at 11:00:21AM -0400, Andrew Hughes wrote: > ----- Original Message ----- > > > > The stamps/download-jamvm.stamp must be called before extract-jamvm, > > otherwise the tar xf $(JAMVM_SRC_ZIP) might get a wrong path. > > > > diff -r 2eb479d57f25 -r f6ca0873f6b5 ChangeLog > > --- a/ChangeLog Wed Sep 05 11:41:19 2012 +0200 > > +++ b/ChangeLog Mon Sep 17 16:09:42 2012 +0200 > > @@ -1,3 +1,9 @@ > > +2012-09-17 Michal Vyskocil > > + > > + * Makefile.am: > > + (stamps/extract-jamvm.stamp): Depends on > > stamps/download-jamvm.stamp. > > + Fix the dependency problem on JamVM build. > > + > > 2012-09-05 Matthias Klose > > > > configure.ac: Remove the Xp header and library checks. > > diff -r 2eb479d57f25 -r f6ca0873f6b5 Makefile.am > > --- a/Makefile.am Wed Sep 05 11:41:19 2012 +0200 > > +++ b/Makefile.am Mon Sep 17 16:09:42 2012 +0200 > > @@ -1285,7 +1285,7 @@ > > clean-extract-cacao: clean-cacao > > rm -f stamps/extract-cacao.stamp > > > > -stamps/extract-jamvm.stamp: > > +stamps/extract-jamvm.stamp: stamps/download-jamvm.stamp > > if BUILD_JAMVM > > set -e ; \ > > if ! test -d jamvm ; \ > > > > Which tree is this? I didn't see an issue in IcedTea6 when I was working > on it yesterday. Hallo Andrew, sorry I did not post the repo name - the patch is against icedtea7 Looking at web interface, it's still here http://icedtea.classpath.org/hg/icedtea7/file/b374a4e01497/Makefile.am Regards Michal Vyskocil From jfabriko at redhat.com Mon Sep 24 05:29:28 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 24 Sep 2012 14:29:28 +0200 Subject: [rfc][icedtea-web] fixing classpath for reproducers compilation Message-ID: <50605228.7060809@redhat.com> 2012-09-24 Jana Fabrikova Newly created reproducers for JavaScript<->Java communication need package netscape.javascript on classpath. * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) added one more dependency: stamps/liveconnect-dist.stamp and one more directory on cp: $(abs_top_builddir)/liveconnect -------------- next part -------------- A non-text attachment was scrubbed... Name: pluginTestClasspath.patch Type: text/x-patch Size: 1141 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/c349500e/pluginTestClasspath.patch From jvanek at redhat.com Mon Sep 24 05:40:29 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 24 Sep 2012 14:40:29 +0200 Subject: [icedtea-web][rfc] Basic closing listeners implementation and example In-Reply-To: <1348150909.20946.20.camel@adomurad-desktop> References: <505AEE67.8080203@redhat.com> <1348150909.20946.20.camel@adomurad-desktop> Message-ID: <506054BD.3010903@redhat.com> On 09/20/2012 04:21 PM, Adam Domurad wrote: > On Thu, 2012-09-20 at 12:22 +0200, Jiri Vanek wrote: > .... >> + public static enum AutoClose { >> + >> + CLOSE_ON_EXCEPTION, CLOSE_ON_CORRECT_END, CLOSE_ON_BOTH > Maybe I'm being pedantic but CLOSE_ON_BOTH to me isn't as meaningful in > isolation as I'd like it to be. > Seeing as it's going to be the most common option, I would prefer if it > was something like AutoClose.CLOSE_ON_EXIT, CLOSE_ON_EXCEPTION_EXIT, > CLOSE_ON_CORRECT_EXIT. It should be readable in isolation, methinks. If you can survive original naming, I would like to stay with old names. They looks clearer to me. However - if you can not - you are native speaker and feel free to force me:) > >> + } >> + ... >> +import net.sourceforge.jnlp.ClosingListener; >> + >> +public class AutoAllClosingListener extends ClosingListener { > Seems like these 3 classes (Auto*ClosingListener) could be turned into a > single class that takes a String[] argument. I would prefer that, but if > you have reasons against this its fine. >> + Sure! Thanx for catch, it is much better now with common forefather! >> + >> +} >> >> > Good patch! It should allow for a speed up of much of the tests without > a terrible amount of effort. > > Thanks, > - Adam > -------------- next part -------------- A non-text attachment was scrubbed... Name: closingListener_5_1.diff Type: text/x-patch Size: 23020 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/98238f30/closingListener_5_1.diff From jvanek at redhat.com Mon Sep 24 05:42:07 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 24 Sep 2012 14:42:07 +0200 Subject: [rfc][icedtea-web] fixing classpath for reproducers compilation In-Reply-To: <50605228.7060809@redhat.com> References: <50605228.7060809@redhat.com> Message-ID: <5060551F.5080509@redhat.com> On 09/24/2012 02:29 PM, Jana Fabrikova wrote: > 2012-09-24 Jana Fabrikova > > Newly created reproducers for JavaScript<->Java communication > need package netscape.javascript on classpath. > * Makefile.am: > (stamps/netx-dist-tests-prepare-reproducers.stamp) > added one more dependency: stamps/liveconnect-dist.stamp > and one more directory on cp: $(abs_top_builddir)/liveconnect > Hi! Thanx for patch. This is actually fixing incorect behaviour. The patch itself looks correct. I would commit this for you if you do not mind. I will just would like to chnge an changelog a bit: 2012-09-24 Jana Fabrikova Reproducers are now correctly compiled against liveconect(plugin.jar) * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) added one more dependency: stamps/liveconnect-dist.stamp added one more directory on cp: $(abs_top_builddir)/liveconnect From jfabriko at redhat.com Mon Sep 24 06:42:17 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Mon, 24 Sep 2012 15:42:17 +0200 Subject: [rfc][icedtea-web] fixing classpath for reproducers compilation In-Reply-To: <5060551F.5080509@redhat.com> References: <50605228.7060809@redhat.com> <5060551F.5080509@redhat.com> Message-ID: <50606339.3030307@redhat.com> Ok, thank you. On 09/24/2012 02:42 PM, Jiri Vanek wrote: > On 09/24/2012 02:29 PM, Jana Fabrikova wrote: >> 2012-09-24 Jana Fabrikova >> >> Newly created reproducers for JavaScript<->Java communication >> need package netscape.javascript on classpath. >> * Makefile.am: >> (stamps/netx-dist-tests-prepare-reproducers.stamp) >> added one more dependency: stamps/liveconnect-dist.stamp >> and one more directory on cp: $(abs_top_builddir)/liveconnect >> > > > > Hi! Thanx for patch. This is actually fixing incorect behaviour. The > patch itself looks correct. I would commit this for you if you do not > mind. I will just would like to chnge an changelog a bit: > > 2012-09-24 Jana Fabrikova > > Reproducers are now correctly compiled against liveconect(plugin.jar) > * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) > added one more dependency: stamps/liveconnect-dist.stamp > added one more directory on cp: $(abs_top_builddir)/liveconnect From xerxes at zafena.se Mon Sep 24 07:03:21 2012 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 24 Sep 2012 16:03:21 +0200 Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <877grlf6rw.fsf@mid.deneb.enyo.de> References: <877grlf6rw.fsf@mid.deneb.enyo.de> Message-ID: <50606829.1040208@zafena.se> 2012-09-23 11:05, Florian Weimer skrev: > What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? Are > they officially released/supported? What about the zero port? > > I'm wondering which of these VMs should be part of the upcoming Debian > stable release. > ### Zero Zero is actively maintained and all around stable. Zero includes an assembler optimized interpreter for ARM and a thumb2 jit for armv7. Zero + OpenJDK 6 Icedtea 1.11.4 = OK Zero + OpenJDK 7 Icedtea 2.3.2 = OK tested configure flags: --enable-zero and --with-additional-vms=zero ### Shark Shark (zero+shark) is unmaintained and considered broken. Do not package. ### JamVM JamVM is actively maintained and all around stable. JamVM + OpenJDK 6 Icedtea 1.11.4 = OK, a more stable upstream release exist to be released with 1.12. use this patch http://icedtea.classpath.org/hg/icedtea6/rev/fb1137cef484 to use the latest JamVM in combination with IcedTea6 1.11.x before the next IcedTea 6 1.12 hits the streets. JamVM + OpenJDK 7 Icedtea 2.3.2 = OK tested configure flags: --enable-jamvm and --with-additional-vms=jamvm * This --with-additional-vms=jamvm combination require a SONAME patch on top of JamVM. This jamvm-avoid-version-soname.patch SONAME patch is currently only in use by ubuntu. http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch Sent and waiting for review upstream. http://sourceforge.net/mailarchive/message.php?msg_id=29763831 ### CACAO Cacao is actively maintained and stable in combination with OpenJDK 6. Cacao + OpenJDK 6 Icedtea 1.11.4 = OK --enable-cacao and --with-additional-vms=cacao There is a new upstream cacao 1.6.0 release that should be merged and used by IcedTea6. http://www.cacaojvm.org/ Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable The CACAO OpenJDK 7 port is immature, it can run HelloWorld and some numerical simple benchmarks but refuses to run real world applications that access file IO. Do not package. ### Avian Avian is actively maintained and rapidly approaching stable. Avian + OpenJDK 7 IcedTea 2.3.2 = OK Avian is preferably built separately from src after the main OpenJDK 7 build. Avian is packaged in Ubuntu 12.10 and show great performance on embeded devices. Latest deb source and merge request: https://code.launchpad.net/~xranby/ubuntu/quantal/avian/avian_0.6+20120924/+merge/126005 http://oss.readytalk.com/avian/ Cheers Xerxes From adomurad at redhat.com Mon Sep 24 07:24:09 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 24 Sep 2012 10:24:09 -0400 Subject: [icedtea-web][rfc] Basic closing listeners implementation and example In-Reply-To: <506054BD.3010903@redhat.com> References: <505AEE67.8080203@redhat.com> <1348150909.20946.20.camel@adomurad-desktop> <506054BD.3010903@redhat.com> Message-ID: <1348496649.1134.10.camel@adomurad-desktop> On Mon, 2012-09-24 at 14:40 +0200, Jiri Vanek wrote: > On 09/20/2012 04:21 PM, Adam Domurad wrote: > > On Thu, 2012-09-20 at 12:22 +0200, Jiri Vanek wrote: > > > .... > >> + public static enum AutoClose { > >> + > >> + CLOSE_ON_EXCEPTION, CLOSE_ON_CORRECT_END, CLOSE_ON_BOTH > > Maybe I'm being pedantic but CLOSE_ON_BOTH to me isn't as meaningful in > > isolation as I'd like it to be. > > Seeing as it's going to be the most common option, I would prefer if it > > was something like AutoClose.CLOSE_ON_EXIT, CLOSE_ON_EXCEPTION_EXIT, > > CLOSE_ON_CORRECT_EXIT. It should be readable in isolation, methinks. > > If you can survive original naming, I would like to stay with old names. They looks clearer to me. > However - if you can not - you are native speaker and feel free to force me:) CLOSE_ON_BOTH is the only one I have issues with, because it doesn't by itself imply what ON_BOTH means -- but thinking about it my version isn't that clear either. As it's just one click away on a good IDE to see what the related enums are I suppose you're correct :). > > > > >> + } > >> + > ... > >> +import net.sourceforge.jnlp.ClosingListener; > >> + > >> +public class AutoAllClosingListener extends ClosingListener { > > Seems like these 3 classes (Auto*ClosingListener) could be turned into a > > single class that takes a String[] argument. I would prefer that, but if > > you have reasons against this its fine. > >> + > > Sure! Thanx for catch, it is much better now with common forefather! > > >> + > >> +} > >> > >> > > Good patch! It should allow for a speed up of much of the tests without > > a terrible amount of effort. > > > > Thanks, > > - Adam > > > > On 09/20/2012 04:21 PM, Adam Domurad wrote: > > On Thu, 2012-09-20 at 12:22 +0200, Jiri Vanek wrote: > > > .... > >> + public static enum AutoClose { > >> + > >> + CLOSE_ON_EXCEPTION, CLOSE_ON_CORRECT_END, CLOSE_ON_BOTH > > Maybe I'm being pedantic but CLOSE_ON_BOTH to me isn't as meaningful > in > > isolation as I'd like it to be. > > Seeing as it's going to be the most common option, I would prefer if > it > > was something like AutoClose.CLOSE_ON_EXIT, CLOSE_ON_EXCEPTION_EXIT, > > CLOSE_ON_CORRECT_EXIT. It should be readable in isolation, methinks. > > If you can survive original naming, I would like to stay with old > names. They looks clearer to me. > However - if you can not - you are native speaker and feel free to > force me:) > > > > >> + } > >> + > ... > >> +import net.sourceforge.jnlp.ClosingListener; > >> + > >> +public class AutoAllClosingListener extends ClosingListener { > > Seems like these 3 classes (Auto*ClosingListener) could be turned > into a > > single class that takes a String[] argument. I would prefer that, > but if > > you have reasons against this its fine. > >> + > > Sure! Thanx for catch, it is much better now with common forefather! > > >> + > >> +} > >> > >> > > Good patch! It should allow for a speed up of much of the tests > without > > a terrible amount of effort. > > > > Thanks, > > - Adam > > > > > > > > > > > differences > between files > attachment > (closingListener_5_1.diff) > > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html > --- > a/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html Mon Sep 24 14:32:55 2012 +0200 > @@ -37,7 +37,7 @@ > --> > >

> - archive="XslowXAppletTestSigned.jar" codebase="." width="100" > height="100"> > + archive="AppletTestSigned.jar" codebase="." width="100" height="100"> > > > > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,46 @@ > + > + > +

> + archive="XslowXAppletTestSigned.jar" codebase="." width="100" > height="100"> > + > + > + > +

> + > + > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java > --- > a/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java Mon Sep 24 14:32:55 2012 +0200 > @@ -48,6 +48,7 @@ > try { > Thread.sleep(n); > System.out.println("AppletTestSigned killing himself > after " + n + " ms of life"); > + System.out.println("*** APPLET FINISHED ***"); > System.exit(0); > } catch (Exception ex) { > } > diff -r 9d46cc3428eb > tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java > --- > a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 24 14:32:55 2012 +0200 > @@ -84,15 +84,24 @@ > > @Test > @TestInBrowsers(testIn = {Browsers.all}) > - public void AppletTestSignedFirefoxTest() throws Exception { > + public void AppletTestSignedFirefoxTestXslowX() throws Exception > { > ServerAccess.PROCESS_TIMEOUT = 30 * 1000; > try { > - ProcessResult pr = > server.executeBrowser("/AppletTestSigned.html"); > + ProcessResult pr = > server.executeBrowser("/AppletTestSigned2.html"); > evaluateSignedApplet(pr, false); > - Assert.assertTrue(pr.wasTerminated); > + //Assert.assertTrue(pr.wasTerminated); > //Assert.assertEquals((Integer) 0, pr.returnValue); due > to destroy is null > } finally { > ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to > normal > } > } > + > + @Test > + @TestInBrowsers(testIn = {Browsers.all}) > + public void AppletTestSignedFirefoxTest() throws Exception { > + ProcessResult pr = > server.executeBrowser("/AppletTestSigned.html", > ServerAccess.AutoClose.CLOSE_ON_BOTH); > + evaluateSignedApplet(pr, false); > + //Assert.assertTrue(pr.wasTerminated); > + //Assert.assertEquals((Integer) 0, pr.returnValue); due to > destroy is null > + } > } > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,55 @@ > +/* ClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp; > + > +public abstract class ClosingListener implements > ContentReaderListener { > + > + private ThreadedProcess process; > + private ProcessAssasin assasin; > + > + void setProcess(ThreadedProcess p) { > + this.process = p; > + } > + > + void setAssasin(ProcessAssasin assasin) { > + this.assasin = assasin; > + } > + > + public void terminate() { > + assasin.setTimeout(Long.MIN_VALUE); > + } > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java > --- > a/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java Mon Sep 24 14:32:55 2012 +0200 > @@ -98,6 +98,11 @@ > return skipInstedOfDesroy; > } > > + void setTimeout(long timeout) { > + this.timeout = timeout; > + } > + > + > @Override > public void run() { > long startTime = System.nanoTime() / > ServerAccess.NANO_TIME_DELIMITER; > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java > --- > a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Mon Sep 17 16:40:25 2012 -0400 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Mon Sep 24 14:32:55 2012 +0200 > @@ -1,5 +1,5 @@ > /* ServerAccess.java > -Copyright (C) 2011 Red Hat, Inc. > +Copyright (C) 2011, 2012 Red Hat, Inc. > > This file is part of IcedTea. > > @@ -58,6 +58,8 @@ > import net.sourceforge.jnlp.browsertesting.Browser; > import net.sourceforge.jnlp.browsertesting.BrowserFactory; > import net.sourceforge.jnlp.browsertesting.Browsers; > +import > net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; > +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; > import org.junit.Assert; > > /** > @@ -77,6 +79,11 @@ > */ > public class ServerAccess { > > + public static enum AutoClose { > + > + CLOSE_ON_EXCEPTION, CLOSE_ON_CORRECT_END, CLOSE_ON_BOTH > + } > + > public static final long NANO_TIME_DELIMITER=1000000l; > /** > * java property which value containing path to default (makefile > by) directory with deployed resources > @@ -545,6 +552,20 @@ > public ProcessResult executeJavaws(String > resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) > throws Exception { > return executeJavaws(null, resource,stdoutl,stderrl); > } > + > + public net.sourceforge.jnlp.ProcessResult executeBrowser(String > string, AutoClose autoClose) throws Exception { > + ClosingListener errClosing = null; > + ClosingListener outClosing = null; > + if (autoClose == AutoClose.CLOSE_ON_BOTH || autoClose == > AutoClose.CLOSE_ON_EXCEPTION){ > + errClosing=new AutoErrorClosingListener(); > + } > + if (autoClose == AutoClose.CLOSE_ON_BOTH || autoClose == > AutoClose.CLOSE_ON_CORRECT_END){ > + outClosing=new AutoOkClosingListener(); > + } > + return executeBrowser(string, outClosing, errClosing); > + } > + > + > public ProcessResult executeBrowser(String resource) throws > Exception { > return executeBrowser(getBrowserParams(), resource); > } > @@ -797,6 +818,8 @@ > log(connectionMesaage, true, true); > } > ProcessAssasin pa = new ProcessAssasin(t, PROCESS_TIMEOUT); > + setUpClosingListener(stdoutl, pa, t); > + setUpClosingListener(stderrl, pa, t); > pa.start(); > t.start(); > while (t.getP() == null && t.deadlyException == null) { > @@ -834,6 +857,13 @@ > return pr; > } > > + private static void setUpClosingListener(ContentReaderListener > listener, ProcessAssasin pa, ThreadedProcess t) { > + if (listener != null && (listener instanceof > ClosingListener)) { > + ((ClosingListener) listener).setAssasin(pa); > + ((ClosingListener) listener).setProcess(t); > + } > + } > + > /** > * this is temprary solution until refactoring is fully done > * Use net.sourceforge.jnlp.ProcessResult instead > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,57 @@ > +/* CountingClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import net.sourceforge.jnlp.ClosingListener; > + > +public class AutoAllClosingListener extends ClosingListener { I still think this should be an instance of a class that takes a String[] set and not its own class. A function could be used to return a correct initialized instance. But if you like having a concrete class around then I suppose that's a matter of taste, I personally don't like making classes unless absolutely necessary :). > + > + > + > + @Override > + public void charReaded(char ch) { > + > + } > + > + @Override > + public void lineReaded(String s) { > + if > (s.contains(AutoErrorClosingListener.MAGICAL_ERROR_CLOSING_STRING) || > s.contains(AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING)){ > + terminate(); > + } > + } > + > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,46 @@ > +/* AutoErrorClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +public class AutoErrorClosingListener extends > StringBasedClosingListener { Again it is to my taste for all these to be an instance of a String[] taking class, take it as you will though. > + > + public static final String MAGICAL_ERROR_CLOSING_STRING = > "xception"; > + > + public AutoErrorClosingListener() { > + super(MAGICAL_ERROR_CLOSING_STRING); > + } > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,48 @@ > +/* CountingClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > + > +public class AutoOkClosingListener extends > StringBasedClosingListener { > + > + public static final String MAGICAL_OK_CLOSING_STRING = "*** > APPLET FINISHED ***"; > + > + public AutoOkClosingListener() { > + super(MAGICAL_OK_CLOSING_STRING); > + } > + > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringBasedClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringBasedClosingListener.java Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,67 @@ > +/* StringBasedClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > +package net.sourceforge.jnlp.closinglisteners; > + > +import net.sourceforge.jnlp.ClosingListener; > + > +public class StringBasedClosingListener extends ClosingListener { > + > + private final String condition; > + > + public StringBasedClosingListener(String condition) { > + this.condition = condition; > + } > + > + @Override > + public void charReaded(char ch) { > + > + } > + > + @Override > + public void lineReaded(String s) { > + if (s.contains(condition)){ > + terminate(); > + } > + } > + > + > + public String getCondition() { > + return condition; > + } > + > + > +} > diff -r 9d46cc3428eb > tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ > b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java Mon Sep 24 14:32:55 2012 +0200 > @@ -0,0 +1,53 @@ > +/* StringMatchClosingListener.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as > published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, > Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give > you > +permission to link this library with independent modules to produce > an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > + */ > + > +import > net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; > + > + > +public class StringMatchClosingListener extends > StringBasedClosingListener { > + > + public StringMatchClosingListener(String s) { > + super(s); > + } > + > + @Override > + public void lineReaded(String s) { > + if (s.matches(getCondition())) { > + terminate(); > + } > + } > +} Thanks! I will forgive you if you aren't particularly compelled to refactor the Auto*ClosingListener classes into a single String[]-taking class and 3 functions that return correctly initialized instances (I can't claim it to be better, only more to my taste :). If you think the current way is better you can go ahead and push. - Adam From jvanek at redhat.com Mon Sep 24 07:24:18 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 24 Sep 2012 16:24:18 +0200 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <1348153135.20946.47.camel@adomurad-desktop> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> <1347985272.17468.53.camel@adomurad-desktop> <5058A308.6050208@redhat.com> <505AF057.1000909@redhat.com> <1348153135.20946.47.camel@adomurad-desktop> Message-ID: <50606D12.8060400@redhat.com> On 09/20/2012 04:58 PM, Adam Domurad wrote: > >>>> inclined to agree. Overall, I'm starting to think that a standard, >>>> magic, "**APPLET FINISHED**" string copypasted into every applet is the ... > > >> diff -r d23356f8a7a6 >> tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java >> --- >> a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 10:55:16 2012 +0200 >> +++ >> b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 12:03:40 2012 +0200 >> @@ -43,6 +43,8 @@ >> import net.sourceforge.jnlp.browsertesting.BrowserTest; >> import net.sourceforge.jnlp.browsertesting.Browsers; >> import net.sourceforge.jnlp.annotations.TestInBrowsers; >> +import net.sourceforge.jnlp.closinglisteners.Rule; >> +import >> net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; >> import org.junit.Assert; >> >> import org.junit.Test; >> @@ -50,8 +52,22 @@ >> public class AppletTestSignedTests extends BrowserTest { >> >> private final List l = >> Collections.unmodifiableList(Arrays.asList(new >> String[]{"-Xtrustall"})); >> + private static final String ss = "xception"; >> + private static final String s0 = "AppletTestSigned was started"; >> + private static final String s1 = "value1"; >> + private static final String s2 = "value2"; >> + private static final String s3 = "AppletTestSigned was >> initialised"; >> + private static final String s7 = "AppletTestSigned killing >> himself after 2000 ms of life"; >> + private static final RulesFolowingClosingListener.ContainsRule >> crss = new RulesFolowingClosingListener.ContainsRule(ss); > Still a bit of verbosity here that is just a little off-putting (mainly > because of Java requiring type twice to be honest - once in declaration > and once in initialization :). I would rather stay off renaming of old variables in this patch (not reefactoring one), although I agree with ... > The part that's supposed to be the most > meaningful (the variable name) has the least verbosity. ... ^this :) So I have refactored ruels name. > It would be a > bit better I think if the line read something like: > private static final Rule exceptionRule = new ContainsRule(ss); > > Note that this doesn't require you to move the ContainsRule class, but > simply import RulesFolowingClosingListener.ContainsRule; sure, done > >> + private static final RulesFolowingClosingListener.ContainsRule >> s0ss = new RulesFolowingClosingListener.ContainsRule(s0); >> + private static final RulesFolowingClosingListener.ContainsRule >> s1ss = new RulesFolowingClosingListener.ContainsRule(s1); >> + private static final RulesFolowingClosingListener.ContainsRule >> s2ss = new RulesFolowingClosingListener.ContainsRule(s2); >> + private static final RulesFolowingClosingListener.ContainsRule >> s3ss = new RulesFolowingClosingListener.ContainsRule(s3); >> + private static final RulesFolowingClosingListener.ContainsRule >> s7ss = new RulesFolowingClosingListener.ContainsRule(s7); >> + private static final Rule[] okRules = new Rule[]{s0ss, s1ss, >> s2ss, s3ss, s7ss}; >> + private static final Rule[] errorRrules = new Rule[]{crss}; > Rrules -> Rules >> >> - @Test >> + // @Test >> public void AppletTestSignedTest() throws Exception { >> ProcessResult pr = server.executeJavawsHeadless(l, >> "/AppletTestSigned.jnlp"); >> evaluateSignedApplet(pr, true); >> @@ -60,18 +76,12 @@ >> } >> >> private void evaluateSignedApplet(ProcessResult pr, boolean >> javawsApplet) { >> - String s3 = "AppletTestSigned was initialised"; >> - Assert.assertTrue("AppletTestSigned stdout should contain " + >> s3 + " but didn't", pr.stdout.contains(s3)); >> - String s0 = "AppletTestSigned was started"; >> - Assert.assertTrue("AppletTestSigned stdout should contain " + >> s0 + " but didn't", pr.stdout.contains(s0)); >> - String s1 = "value1"; >> - Assert.assertTrue("AppletTestSigned stdout should contain " + >> s1 + " but didn't", pr.stdout.contains(s1)); >> - String s2 = "value2"; >> - Assert.assertTrue("AppletTestSigned stdout should contain " + >> s2 + " but didn't", pr.stdout.contains(s2)); >> - String ss = "xception"; >> - Assert.assertFalse("AppletTestSigned stderr should not >> contain " + ss + " but did", pr.stderr.contains(ss)); >> - String s7 = "AppletTestSigned killing himself after 2000 ms >> of life"; >> - Assert.assertTrue("AppletTestSigned stdout should contain " + >> s7 + " but didn't", pr.stdout.contains(s7)); >> + Assert.assertTrue("AppletTestSigned stdout " + >> s3ss.toString() + " but didn't", s3ss.evaluate(pr.stdout)); >> + Assert.assertTrue("AppletTestSigned stdout " + >> s0ss.toString() + " but didn't", s0ss.evaluate(pr.stdout)); >> + Assert.assertTrue("AppletTestSigned stdout " + >> s1ss.toString() + " but didn't", s1ss.evaluate(pr.stdout)); >> + Assert.assertTrue("AppletTestSigned stdout " + >> s2ss.toString() + " but didn't", s2ss.evaluate(pr.stdout)); >> + Assert.assertFalse("AppletTestSigned stderr " + >> crss.toNotString() + " but did", crss.evaluate(pr.stderr)); >> + Assert.assertTrue("AppletTestSigned stdout " + >> s7ss.toString() + " but didn't", s7ss.evaluate(pr.stdout)); >> if (!javawsApplet) { >> /*this is working correctly in most browser, but not in >> all. temporarily disabling >> String s4 = "AppletTestSigned was stopped"; >> @@ -87,7 +97,7 @@ >> public void AppletTestSignedFirefoxTestXslowX() throws Exception >> { >> ServerAccess.PROCESS_TIMEOUT = 30 * 1000; >> try { >> - ProcessResult pr = >> server.executeBrowser("/AppletTestSigned2.html"); >> + ProcessResult pr = >> server.executeBrowser("/AppletTestSigned2.html",new >> RulesFolowingClosingListener(okRules),new >> RulesFolowingClosingListener(errorRrules)); >> evaluateSignedApplet(pr, false); >> //Assert.assertTrue(pr.wasTerminated); >> //Assert.assertEquals((Integer) 0, pr.returnValue); due >> to destroy is null >> diff -r d23356f8a7a6 >> tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java >> --- >> a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Sep 20 10:55:16 2012 +0200 >> +++ >> b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Sep 20 12:03:40 2012 +0200 >> @@ -35,6 +35,7 @@ >> exception statement from your version. >> */ >> >> +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; >> import net.sourceforge.jnlp.ProcessResult; >> import net.sourceforge.jnlp.ServerAccess; >> import net.sourceforge.jnlp.browsertesting.BrowserTest; >> @@ -47,6 +48,24 @@ >> >> public class AppletTestTests extends BrowserTest { >> >> + private final String s7 = "Aplet killing himself after 2000 ms of >> life"; > Aplet -> Applet (Is there another occurence of this typo ?) I let it be intentionally, it is also in src and more tests depend on it. >> + private final String ss = "xception"; > I'm wondering what case this covers as opposed to "Exception" ? It's > fine though, as there are no other english words that end in xception :) >> + private final String s2 = "value2"; >> + private final String s1 = "value1"; >> + private final String s0 = "applet was started"; >> + private final String s3 = "applet was initialised"; >> + >> + private class CountingClosingListenerImpl extends >> CountingClosingListener { >> + >> + @Override >> + protected boolean isAlowedToFinish(String s) { >> + if (s.contains(ss)) { >> + return true; >> + } >> + return (s.contains(s0) && s.contains(s1) && >> s.contains(s2) && s.contains(s3) && s.contains(s7)); >> + } >> + } >> + >> @Test >> @TestInBrowsers(testIn = {Browsers.googleChrome}) >> @NeedsDisplay >> @@ -55,7 +74,7 @@ >> try { >> //System.out.println("connecting AppletInFirefoxTest >> request in " + getBrowser().toString()); >> //just verify loging is recording browser >> - ProcessResult pr1 = >> server.executeBrowser("/appletAutoTests.html"); >> + ProcessResult pr1 = >> server.executeBrowser("/appletAutoTests2.html", new >> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >> if (pr1.process == null) { >> Assert.assertTrue("If proces was null here, then >> google-chrome had to not exist, and so " >> + ServerAccess.UNSET_BROWSER >> @@ -64,12 +83,12 @@ >> >> pr1.deadlyException.getMessage().contains(ServerAccess.UNSET_BROWSER)); >> return; >> } >> - evaluateApplet(pr1,false); >> + evaluateApplet(pr1, false); >> Assert.assertTrue(pr1.wasTerminated); >> //System.out.println("connecting AppletInFirefoxTest >> request in " + getBrowser().toString()); >> // just verify loging is recording browser >> - ServerAccess.ProcessResult pr = >> server.executeBrowser("/appletAutoTests.html"); >> - evaluateApplet(pr,false); >> + ServerAccess.ProcessResult pr = >> server.executeBrowser("/appletAutoTests2.html", new >> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >> + evaluateApplet(pr, false); >> Assert.assertTrue(pr.wasTerminated); >> } finally { >> ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to >> normal >> @@ -80,30 +99,24 @@ >> @NeedsDisplay >> public void AppletTest() throws Exception { >> ProcessResult pr = server.executeJavawsHeadless(null, >> "/AppletTest.jnlp"); >> - evaluateApplet(pr,true); >> + evaluateApplet(pr, true); >> Assert.assertFalse(pr.wasTerminated); >> Assert.assertEquals((Integer) 0, pr.returnValue); >> } >> >> private void evaluateApplet(ProcessResult pr, boolean >> javawsApplet) { >> - String s3 = "applet was initialised"; >> Assert.assertTrue("AppletTest stdout should contains " + s3 + >> " bud didn't", pr.stdout.contains(s3)); >> - String s0 = "applet was started"; >> Assert.assertTrue("AppletTest stdout should contains " + s0 + >> " bud didn't", pr.stdout.contains(s0)); >> - String s1 = "value1"; >> Assert.assertTrue("AppletTest stdout should contains " + s1 + >> " bud didn't", pr.stdout.contains(s1)); >> - String s2 = "value2"; >> Assert.assertTrue("AppletTest stdout should contains " + s2 + >> " bud didn't", pr.stdout.contains(s2)); >> - String ss = "xception"; >> Assert.assertFalse("AppletTest stderr should not contains " + >> ss + " but did", pr.stderr.contains(ss)); >> - String s7 = "Aplet killing himself after 2000 ms of life"; >> Assert.assertTrue("AppletTest stdout should contains " + s7 + >> " bud didn't", pr.stdout.contains(s7)); >> if (!javawsApplet) { >> /*this is working correctly in most browser, but not in >> all. temporarily disabling >> - String s4 = "applet was stopped"; >> - Assert.assertTrue("AppletTest stdout should contains " + s4 + >> " bud did't", pr.stdout.contains(s4)); >> - String s5 = "applet will be destroyed"; >> - Assert.assertTrue("AppletTest stdout should contains " + s5 + >> " bud did't", pr.stdout.contains(s5)); >> + String s4 = "applet was stopped"; >> + Assert.assertTrue("AppletTest stdout should contains " + >> s4 + " bud did't", pr.stdout.contains(s4)); >> + String s5 = "applet will be destroyed"; >> + Assert.assertTrue("AppletTest stdout should contains " + >> s5 + " bud did't", pr.stdout.contains(s5)); >> */ >> } >> } >> @@ -116,8 +129,8 @@ >> //just verify loging is recordingb rowser >> ServerAccess.PROCESS_TIMEOUT = 30 * 1000; >> try { >> - ProcessResult pr = >> server.executeBrowser("/appletAutoTests2.html"); >> - evaluateApplet(pr,false); >> + ProcessResult pr = >> server.executeBrowser("/appletAutoTests2.html", new >> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >> + evaluateApplet(pr, false); >> Assert.assertTrue(pr.wasTerminated); >> //Assert.assertEquals((Integer) 0, pr.returnValue); due >> to destroy is null >> } finally { >> @@ -132,9 +145,9 @@ >> //just verify loging is recording browser >> ServerAccess.PROCESS_TIMEOUT = 30 * 1000; >> try { >> - ProcessResult pr = >> server.executeBrowser("/appletAutoTests.html"); >> + ProcessResult pr = >> server.executeBrowser("/appletAutoTests.html", new >> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >> pr.process.destroy(); >> - evaluateApplet(pr,false); >> + evaluateApplet(pr, false); >> Assert.assertTrue(pr.wasTerminated); >> //Assert.assertEquals((Integer) 0, pr.returnValue); due >> to destroy is null >> } finally { >> diff -r d23356f8a7a6 >> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ >> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java Thu Sep 20 12:03:40 2012 +0200 >> @@ -0,0 +1,60 @@ >> +/* CountingClosingListener.java >> +Copyright (C) 2012 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as >> published by >> +the Free Software Foundation, version 2. >> + >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >> Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give >> you >> +permission to link this library with independent modules to produce >> an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> + */ >> +package net.sourceforge.jnlp.closinglisteners; >> + >> +import net.sourceforge.jnlp.ClosingListener; >> + >> +public abstract class CountingClosingListener extends ClosingListener >> { >> + >> + protected StringBuilder sb = new StringBuilder(); >> + >> + @Override >> + public void charReaded(char ch) { >> + sb.append(ch); >> + if (isAlowedToFinish(sb.toString())) { >> + terminate(); >> + } >> + >> + } >> + >> + @Override >> + public void lineReaded(String s) { >> + //nothing to do >> + } >> + >> + protected abstract boolean isAlowedToFinish(String content); >> +} >> diff -r d23356f8a7a6 >> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ >> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java Thu Sep 20 12:03:40 2012 +0200 >> @@ -0,0 +1,47 @@ >> +/* Rule.java >> +Copyright (C) 2012 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as >> published by >> +the Free Software Foundation, version 2. >> + >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >> Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give >> you >> +permission to link this library with independent modules to produce >> an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> +*/ >> +package net.sourceforge.jnlp.closinglisteners; >> + >> +public interface Rule { > Oh boy this is so generic it reminds me of the Boost C++ library :). (If > you're unfamiliar, almost all their types take parameters.) Yap, I'm familiar, and I don like it :) However here it seemed to me useful - kept. >> + >> + public void setRule(S rule); >> + public boolean evaluate(T upon); >> + @Override >> + public String toString(); >> + public String toNotString(); >> + >> +} >> diff -r d23356f8a7a6 >> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ >> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java Thu Sep 20 12:03:40 2012 +0200 >> @@ -0,0 +1,238 @@ >> +/* RulesFolowingClosingListener.java >> +Copyright (C) 2012 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as >> published by >> +the Free Software Foundation, version 2. >> + >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >> Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give >> you >> +permission to link this library with independent modules to produce >> an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> + */ >> +package net.sourceforge.jnlp.closinglisteners; >> + >> +import java.util.ArrayList; >> +import java.util.Arrays; >> +import java.util.List; >> + >> +public class RulesFolowingClosingListener extends >> CountingClosingListener { >> + >> + private List rules = new ArrayList(); >> + >> + public static class ContainsRule extends StringRule> String> { >> + >> + public ContainsRule(String s) { >> + super(s); >> + } > There's considerable overlap between Contains and NotContains, what do > you think about an inversion flag ? >> + >> + @Override >> + public boolean evaluate(String upon) { >> + return (upon.contains(rule)); >> + } >> + >> + @Override >> + public String toString() { >> + return "should contains `" + rule + "`"; >> + } > 'should contains' -> 'should contain' fixed in all new code > Although its a tough call, I'm inclined to say this is a bit of an abuse > of toString(). It's a built-in that doesn't have a natural 'opposite' > like you're giving it. toPassingString() and to toFailingString() might > be better, but feel free to leave it if it feels more natural to you. I compeltely agree. Refactored as sugested >> + >> + @Override >> + public String toNotString() { >> + return "should NOT contains `" + rule + "`"; > 'should NOT contains' -> 'should NOT contain', similar cases below fixed in all new code >> + } >> + } >> + >> + public static class NotContainsRule extends StringRule> String> { >> + >> + public NotContainsRule(String s) { >> + super(s); >> + } >> + >> + @Override >> + public boolean evaluate(String upon) { >> + return !(upon.contains(rule)); >> + } >> + >> + @Override >> + public String toString() { >> + return "should NOT contains `" + rule + "`"; >> + } >> + >> + @Override >> + public String toNotString() { >> + return "should contains `" + rule + "`"; >> + } >> + } >> + >> + public static class MatchesRule extends StringRule> String> { >> + >> + public MatchesRule(String s) { >> + super(s); >> + } >> + >> + @Override >> + public boolean evaluate(String upon) { >> + return (upon.matches(rule)); >> + } >> + >> + @Override >> + public String toString() { >> + return "should match `" + rule + "`"; >> + } >> + >> + @Override >> + public String toNotString() { >> + return "should NOT match `" + rule + "`"; >> + } >> + } >> + >> + public static class NotMatchesRule extends StringRule> String> { >> + >> + public NotMatchesRule(String s) { >> + super(s); >> + } >> + >> + @Override >> + public boolean evaluate(String upon) { >> + return !(upon.matches(rule)); >> + } >> + >> + @Override >> + public String toString() { >> + return "should NOT match`" + rule + "`"; >> + } >> + >> + @Override >> + public String toNotString() { >> + return "should match`" + rule + "`"; >> + } >> + } >> + >> + /** >> + * >> + * @param rule >> + * @return self, to alow chaing add(...).add(..)... >> + */ >> + public RulesFolowingClosingListener addRule(Rule rule) { >> + this.rules.add(rule); >> + return this; >> + } >> + >> + /** >> + * >> + * @param rule >> + * @return self, to alow chaing add(...).add(..)... >> + */ >> + public RulesFolowingClosingListener addMatchingRule(String rule) >> { >> + this.rules.add(new MatchesRule(rule)); >> + return this; >> + } >> + >> + /** >> + * >> + * @param rule >> + * @return self, to alow chaing add(...).add(..)... >> + */ >> + public RulesFolowingClosingListener addNotMatchingRule(String >> rule) { >> + this.rules.add(new NotMatchesRule(rule)); >> + return this; >> + } >> + >> + /** >> + * >> + * @param rule >> + * @return self, to alow chaing add(...).add(..)... >> + */ >> + public RulesFolowingClosingListener addContainsRule(String rule) >> { >> + this.rules.add(new ContainsRule(rule)); >> + return this; >> + } >> + >> + /** >> + * >> + * @param rule >> + * @return self, to alow chaing add(...).add(..)... >> + */ >> + public RulesFolowingClosingListener addNotContainsRule(String >> rule) { >> + this.rules.add(new NotContainsRule(rule)); >> + return this; >> + } >> + >> + public RulesFolowingClosingListener() { >> + } >> + >> + public RulesFolowingClosingListener(List l) { >> + addRules(l); >> + } >> + >> + public RulesFolowingClosingListener(Rule[] l) { >> + addRules(l); >> + } >> + >> + public void setRules(List rules) { >> + if (rules == null) { >> + throw new NullPointerException("rules cant be null"); >> + } >> + this.rules = rules; >> + } >> + >> + public void setRules(Rule[] rules) { >> + if (rules == null) { >> + throw new NullPointerException("rules cant be null"); >> + } >> + this.rules = Arrays.asList(rules); >> + } >> + >> + public void addRules(List rules) { >> + if (rules == null) { >> + throw new NullPointerException("rules cant be null"); >> + } >> + this.rules.addAll(rules); >> + } >> + >> + public void addRules(Rule[] rules) { > Is there a reason you wouldn't want this as Rule... ? This would still > allow for passing an array, but allow more convenience than creating an > array explicitly. >> + if (rules == null) { >> + throw new NullPointerException("rules cant be null"); >> + } >> + this.rules.addAll(Arrays.asList(rules)); >> + } >> + >> + @Override >> + protected boolean isAlowedToFinish(String content) { >> + if (rules == null || rules.size() < 1) { >> + throw new IllegalStateException("No rules specified"); >> + } >> + for (Rule rule : rules) { >> + if (!rule.evaluate(content)) { > So all rules have to match for it to close ? Yes! And Imho it is the only correct thing to do (and reason why I'm not 100% for Auto*ClsoingListener) In case of multithread applet this will become absolutely necessary. (or to make some additional sync in applet, which is unnecessary overhead) >> + return false; >> + } >> + } >> + return true; >> + >> + >> + } >> +} >> diff -r d23356f8a7a6 >> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ >> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java Thu Sep 20 12:03:40 2012 +0200 >> @@ -0,0 +1,57 @@ >> +/* StringRule.java >> +Copyright (C) 2012 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as >> published by >> +the Free Software Foundation, version 2. >> + >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >> Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give >> you >> +permission to link this library with independent modules to produce >> an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> +*/ >> +package net.sourceforge.jnlp.closinglisteners; >> + >> +public abstract class StringRule implements Rule> T>{ > I'm confused, why isn't this type simply StringRule ? (Isn't String > here being parsed as a generic type ?? I must admit I've never seen > concrete types in this location.) Sure. Fixed >> + protected String rule; >> + >> + public StringRule(String rule) { >> + setRule(rule); >> + } >> + >> + public StringRule() { >> + } >> + >> + >> + @Override >> + public void setRule(String rule){ >> + this.rule=rule; >> + } >> + @Override >> + public abstract boolean evaluate(T upon); >> + >> +} >> > Thanks for the patch! Tahnk yo for review :) > - Adam > -------------- next part -------------- A non-text attachment was scrubbed... Name: closingListener_5_2.diff Type: text/x-patch Size: 25446 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/a137ab6a/closingListener_5_2.diff From ChPhilli at redhat.com Mon Sep 24 07:46:40 2012 From: ChPhilli at redhat.com (Chris Phillips) Date: Mon, 24 Sep 2012 10:46:40 -0400 Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <50606829.1040208@zafena.se> References: <877grlf6rw.fsf@mid.deneb.enyo.de> <50606829.1040208@zafena.se> Message-ID: <50607250.7080008@redhat.com> Hi Florian, Mostly in complete agreement with Xerxes here, On 24/09/12 10:03 AM, Xerxes R?nby wrote: > 2012-09-23 11:05, Florian Weimer skrev: >> What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? Are >> they officially released/supported? What about the zero port? >> >> I'm wondering which of these VMs should be part of the upcoming Debian >> stable release. >> > ### Zero > Zero is actively maintained and all around stable. > Zero includes an assembler optimized interpreter for ARM and a thumb2 jit for armv7. > Zero + OpenJDK 6 Icedtea 1.11.4 = OK > Zero + OpenJDK 7 Icedtea 2.3.2 = OK At least as far as I know the asm jit for arm is not yet working in 2.3 will be fixed after I get last bits of jsr 292 for zero pasted back together. > tested configure flags: > --enable-zero > and > --with-additional-vms=zero > > ### Shark > Shark (zero+shark) is unmaintained and considered broken. > Do not package. Long term goal but dead at the moment. > > ### JamVM > JamVM is actively maintained and all around stable. > JamVM + OpenJDK 6 Icedtea 1.11.4 = OK, a more stable upstream release exist to be released with 1.12. > use this patch > http://icedtea.classpath.org/hg/icedtea6/rev/fb1137cef484 > to use the latest JamVM in combination with IcedTea6 1.11.x before the next IcedTea 6 1.12 hits the streets. > > JamVM + OpenJDK 7 Icedtea 2.3.2 = OK > tested configure flags: > --enable-jamvm > and > --with-additional-vms=jamvm > * This --with-additional-vms=jamvm combination require a SONAME patch on top of JamVM. > This jamvm-avoid-version-soname.patch SONAME patch is currently only in use by ubuntu. > http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch > Sent and waiting for review upstream. > http://sourceforge.net/mailarchive/message.php?msg_id=29763831 > > ### CACAO > Cacao is actively maintained and stable in combination with OpenJDK 6. > Cacao + OpenJDK 6 Icedtea 1.11.4 = OK > --enable-cacao > and > --with-additional-vms=cacao > There is a new upstream cacao 1.6.0 release that should be merged and used by IcedTea6. > http://www.cacaojvm.org/ > > Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable > The CACAO OpenJDK 7 port is immature, it can run HelloWorld and some numerical simple benchmarks > but refuses to run real world applications that access file IO. > Do not package. > > ### Avian > Avian is actively maintained and rapidly approaching stable. > Avian + OpenJDK 7 IcedTea 2.3.2 = OK > Avian is preferably built separately from src after the main OpenJDK 7 build. > Avian is packaged in Ubuntu 12.10 and show great performance on embeded devices. > Latest deb source and merge request: > https://code.launchpad.net/~xranby/ubuntu/quantal/avian/avian_0.6+20120924/+merge/126005 > http://oss.readytalk.com/avian/ > > Cheers > Xerxes Thanks Xerxes! Cheers! Chris PS The definition of support I am using here is "mostly working will try to fix bugs on best effort basis". -- -- -- Woda: "Java: write once, debug anywhere" Hong Zhang http://thehenrys.ca | Chris Phillips @ T.O. Red Hat OpenJDK JVM Engineer, | | mailto:ChrisPhi at RedHat.Com (416)483-3768 | | http://LGonQn.Org/www/Chris.Phillips cell: (416)505-3610 | "EPIC stands for Expects Perfectly Intuitive Compilers" P. Bannon http://www.hazmatmodine.com NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. "blah blah blah - Ginger!" -- -- From jvanek at icedtea.classpath.org Mon Sep 24 07:57:04 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Mon, 24 Sep 2012 14:57:04 +0000 Subject: /hg/icedtea-web: Reproducers are now correctly compiled against ... Message-ID: changeset 97280ecda136 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=97280ecda136 author: Jiri Vanek date: Mon Sep 24 16:57:08 2012 +0200 Reproducers are now correctly compiled against liveconect(plugin.jar) diffstat: ChangeLog | 8 ++++++++ Makefile.am | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diffs (36 lines): diff -r 9d46cc3428eb -r 97280ecda136 ChangeLog --- a/ChangeLog Mon Sep 17 16:40:25 2012 -0400 +++ b/ChangeLog Mon Sep 24 16:57:08 2012 +0200 @@ -1,3 +1,11 @@ +2012-09-24 Jiri Vanek + Jana Fabrikova + + Reproducers are now correctly compiled against liveconect(plugin.jar) + * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) + added one more dependency: stamps/liveconnect-dist.stamp + added one more directory on cp: $(abs_top_builddir)/liveconnect + 2012-09-17 Deepak Bhole PR1161: X509VariableTrustManager does not work correctly with OpenJDK7 diff -r 9d46cc3428eb -r 97280ecda136 Makefile.am --- a/Makefile.am Mon Sep 17 16:40:25 2012 -0400 +++ b/Makefile.am Mon Sep 24 16:57:08 2012 +0200 @@ -535,7 +535,7 @@ mkdir -p stamps && \ touch $@ -stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs +stamps/netx-dist-tests-prepare-reproducers.stamp: stamps/junit-jnlp-dist-dirs stamps/liveconnect-dist.stamp types=($(ALL_NONCUSTOM_REPRODUCERS)); \ for which in "$${types[@]}" ; do \ . $(abs_top_srcdir)/NEW_LINE_IFS ; \ @@ -549,7 +549,7 @@ cd "$(JNLP_TESTS_SRCDIR)/$$which/$$dir/srcs/" ; \ srcFiles=`find . -mindepth 1 -type f -name "*.java" | sed "s/.\/*//"` ; \ notSrcFiles=`find . -mindepth 1 -type f \! -name "*.java" | sed "s/.\/*//"` ; \ - $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \ + $(BOOT_DIR)/bin/javac -cp $(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect -d "$(JNLP_TESTS_DIR)/$$dir/" $$srcFiles ; \ if [ -n "$$notSrcFiles" ] ; then \ cp -R --parents $$notSrcFiles "$(JNLP_TESTS_DIR)/$$dir/" ; \ fi ; \ From jvanek at redhat.com Mon Sep 24 07:58:03 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 24 Sep 2012 16:58:03 +0200 Subject: [rfc][icedtea-web] fixing classpath for reproducers compilation In-Reply-To: <50606339.3030307@redhat.com> References: <50605228.7060809@redhat.com> <5060551F.5080509@redhat.com> <50606339.3030307@redhat.com> Message-ID: <506074FB.7070903@redhat.com> On 09/24/2012 03:42 PM, Jana Fabrikova wrote: > 2012-09-24 Jana Fabrikova > > Reproducers are now correctly compiled against liveconect(plugin.jar) > * Makefile.am: (stamps/netx-dist-tests-prepare-reproducers.stamp) > added one more dependency: stamps/liveconnect-dist.stamp > added one more directory on cp: $(abs_top_builddir)/liveconnect So it is pushed. Pleas do you mind to check if it was done correctly? J. From ChrisPhi at redhat.com Mon Sep 24 07:58:03 2012 From: ChrisPhi at redhat.com (Chris Phillips) Date: Mon, 24 Sep 2012 10:58:03 -0400 Subject: Status of non-Hotspot VMs and Shark [Re send list only used wrong email addr.] In-Reply-To: <50606829.1040208@zafena.se> References: <877grlf6rw.fsf@mid.deneb.enyo.de> <50606829.1040208@zafena.se> Message-ID: <506074FB.5000800@RedHat.Com> Hi Florian, Mostly in complete agreement with Xerxes here, On 24/09/12 10:03 AM, Xerxes R?nby wrote: > 2012-09-23 11:05, Florian Weimer skrev: >> What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? Are >> they officially released/supported? What about the zero port? >> >> I'm wondering which of these VMs should be part of the upcoming Debian >> stable release. >> > ### Zero > Zero is actively maintained and all around stable. > Zero includes an assembler optimized interpreter for ARM and a thumb2 jit for armv7. > Zero + OpenJDK 6 Icedtea 1.11.4 = OK > Zero + OpenJDK 7 Icedtea 2.3.2 = OK At least as far as I know the asm jit for arm is not yet working in 2.3 will be fixed after I get last bits of jsr 292 for zero pasted back together. > tested configure flags: > --enable-zero > and > --with-additional-vms=zero > > ### Shark > Shark (zero+shark) is unmaintained and considered broken. > Do not package. Long term goal but dead at the moment. > > ### JamVM > JamVM is actively maintained and all around stable. > JamVM + OpenJDK 6 Icedtea 1.11.4 = OK, a more stable upstream release exist to be released with 1.12. > use this patch > http://icedtea.classpath.org/hg/icedtea6/rev/fb1137cef484 > to use the latest JamVM in combination with IcedTea6 1.11.x before the next IcedTea 6 1.12 hits the streets. > > JamVM + OpenJDK 7 Icedtea 2.3.2 = OK > tested configure flags: > --enable-jamvm > and > --with-additional-vms=jamvm > * This --with-additional-vms=jamvm combination require a SONAME patch on top of JamVM. > This jamvm-avoid-version-soname.patch SONAME patch is currently only in use by ubuntu. > http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch > Sent and waiting for review upstream. > http://sourceforge.net/mailarchive/message.php?msg_id=29763831 > > ### CACAO > Cacao is actively maintained and stable in combination with OpenJDK 6. > Cacao + OpenJDK 6 Icedtea 1.11.4 = OK > --enable-cacao > and > --with-additional-vms=cacao > There is a new upstream cacao 1.6.0 release that should be merged and used by IcedTea6. > http://www.cacaojvm.org/ > > Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable > The CACAO OpenJDK 7 port is immature, it can run HelloWorld and some numerical simple benchmarks > but refuses to run real world applications that access file IO. > Do not package. > > ### Avian > Avian is actively maintained and rapidly approaching stable. > Avian + OpenJDK 7 IcedTea 2.3.2 = OK > Avian is preferably built separately from src after the main OpenJDK 7 build. > Avian is packaged in Ubuntu 12.10 and show great performance on embeded devices. > Latest deb source and merge request: > https://code.launchpad.net/~xranby/ubuntu/quantal/avian/avian_0.6+20120924/+merge/126005 > http://oss.readytalk.com/avian/ > > Cheers > Xerxes Thanks Xerxes! Cheers! Chris PS The definition of support I am using here is "mostly working will try to fix bugs on best effort basis". -- -- -- Woda: "Java: write once, debug anywhere" Hong Zhang http://thehenrys.ca | Chris Phillips @ T.O. Red Hat OpenJDK JVM Engineer, | | mailto:ChrisPhi at RedHat.Com (416)483-3768 | | http://LGonQn.Org/www/Chris.Phillips cell: (416)505-3610 | "EPIC stands for Expects Perfectly Intuitive Compilers" P. Bannon http://www.hazmatmodine.com NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. "blah blah blah - Ginger!" -- -- From jvanek at icedtea.classpath.org Mon Sep 24 08:05:15 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Mon, 24 Sep 2012 15:05:15 +0000 Subject: /hg/icedtea-web: Added basic ClosingLIstener support, implementa... Message-ID: changeset 17900f4ca4a6 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=17900f4ca4a6 author: Jiri Vanek date: Mon Sep 24 17:05:41 2012 +0200 Added basic ClosingLIstener support, implementation and example diffstat: ChangeLog | 27 ++++ tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html | 2 +- tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html | 46 ++++++ tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java | 1 + tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java | 15 +- tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java | 55 ++++++++ tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java | 5 + tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 32 ++++- tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java | 57 ++++++++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java | 46 ++++++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java | 48 +++++++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringBasedClosingListener.java | 67 ++++++++++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java | 53 +++++++ 13 files changed, 449 insertions(+), 5 deletions(-) diffs (truncated from 578 to 500 lines): diff -r 97280ecda136 -r 17900f4ca4a6 ChangeLog --- a/ChangeLog Mon Sep 24 16:57:08 2012 +0200 +++ b/ChangeLog Mon Sep 24 17:05:41 2012 +0200 @@ -1,3 +1,30 @@ +2012-09-24 Jiri Vanek + + * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html: + removed unnecessary XslowX + * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html: + aded missing XslowX + * tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java: + added standard closing sentence + * tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java: + used auto*clsoing listeners + * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: + interface for identifying closing listeners + * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: + added possibility to set timeout n the fly + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: + (executeBrowser) added shortcut for autoclosing listeners, + (setUpClosingListener) method for setting properties of ClosingListener + (executeBrowser) add logic to handle ClosingListeners + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java: + listener closing on "APPLET FINISHED" string + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java: + listener closing on "xception" match + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java: + listener closing on both xception and finished string. + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringBasedClosingListener.java: + Base forefather for Auto*ClosingListener + 2012-09-24 Jiri Vanek Jana Fabrikova diff -r 97280ecda136 -r 17900f4ca4a6 tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html --- a/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html Mon Sep 24 16:57:08 2012 +0200 +++ b/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html Mon Sep 24 17:05:41 2012 +0200 @@ -37,7 +37,7 @@ -->

- + diff -r 97280ecda136 -r 17900f4ca4a6 tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html Mon Sep 24 17:05:41 2012 +0200 @@ -0,0 +1,46 @@ + + +

+ + + + +

+ + diff -r 97280ecda136 -r 17900f4ca4a6 tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java --- a/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java Mon Sep 24 16:57:08 2012 +0200 +++ b/tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java Mon Sep 24 17:05:41 2012 +0200 @@ -48,6 +48,7 @@ try { Thread.sleep(n); System.out.println("AppletTestSigned killing himself after " + n + " ms of life"); + System.out.println("*** APPLET FINISHED ***"); System.exit(0); } catch (Exception ex) { } diff -r 97280ecda136 -r 17900f4ca4a6 tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java --- a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 24 16:57:08 2012 +0200 +++ b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 24 17:05:41 2012 +0200 @@ -84,15 +84,24 @@ @Test @TestInBrowsers(testIn = {Browsers.all}) - public void AppletTestSignedFirefoxTest() throws Exception { + public void AppletTestSignedFirefoxTestXslowX() throws Exception { ServerAccess.PROCESS_TIMEOUT = 30 * 1000; try { - ProcessResult pr = server.executeBrowser("/AppletTestSigned.html"); + ProcessResult pr = server.executeBrowser("/AppletTestSigned2.html"); evaluateSignedApplet(pr, false); - Assert.assertTrue(pr.wasTerminated); + //Assert.assertTrue(pr.wasTerminated); //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null } finally { ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal } } + + @Test + @TestInBrowsers(testIn = {Browsers.all}) + public void AppletTestSignedFirefoxTest() throws Exception { + ProcessResult pr = server.executeBrowser("/AppletTestSigned.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + evaluateSignedApplet(pr, false); + //Assert.assertTrue(pr.wasTerminated); + //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null + } } diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java Mon Sep 24 17:05:41 2012 +0200 @@ -0,0 +1,55 @@ +/* ClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp; + +public abstract class ClosingListener implements ContentReaderListener { + + private ThreadedProcess process; + private ProcessAssasin assasin; + + void setProcess(ThreadedProcess p) { + this.process = p; + } + + void setAssasin(ProcessAssasin assasin) { + this.assasin = assasin; + } + + public void terminate() { + assasin.setTimeout(Long.MIN_VALUE); + } +} diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java --- a/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java Mon Sep 24 16:57:08 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java Mon Sep 24 17:05:41 2012 +0200 @@ -98,6 +98,11 @@ return skipInstedOfDesroy; } + void setTimeout(long timeout) { + this.timeout = timeout; + } + + @Override public void run() { long startTime = System.nanoTime() / ServerAccess.NANO_TIME_DELIMITER; diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Mon Sep 24 16:57:08 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Mon Sep 24 17:05:41 2012 +0200 @@ -1,5 +1,5 @@ /* ServerAccess.java -Copyright (C) 2011 Red Hat, Inc. +Copyright (C) 2011, 2012 Red Hat, Inc. This file is part of IcedTea. @@ -58,6 +58,8 @@ import net.sourceforge.jnlp.browsertesting.Browser; import net.sourceforge.jnlp.browsertesting.BrowserFactory; import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; import org.junit.Assert; /** @@ -77,6 +79,11 @@ */ public class ServerAccess { + public static enum AutoClose { + + CLOSE_ON_EXCEPTION, CLOSE_ON_CORRECT_END, CLOSE_ON_BOTH + } + public static final long NANO_TIME_DELIMITER=1000000l; /** * java property which value containing path to default (makefile by) directory with deployed resources @@ -545,6 +552,20 @@ public ProcessResult executeJavaws(String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception { return executeJavaws(null, resource,stdoutl,stderrl); } + + public net.sourceforge.jnlp.ProcessResult executeBrowser(String string, AutoClose autoClose) throws Exception { + ClosingListener errClosing = null; + ClosingListener outClosing = null; + if (autoClose == AutoClose.CLOSE_ON_BOTH || autoClose == AutoClose.CLOSE_ON_EXCEPTION){ + errClosing=new AutoErrorClosingListener(); + } + if (autoClose == AutoClose.CLOSE_ON_BOTH || autoClose == AutoClose.CLOSE_ON_CORRECT_END){ + outClosing=new AutoOkClosingListener(); + } + return executeBrowser(string, outClosing, errClosing); + } + + public ProcessResult executeBrowser(String resource) throws Exception { return executeBrowser(getBrowserParams(), resource); } @@ -797,6 +818,8 @@ log(connectionMesaage, true, true); } ProcessAssasin pa = new ProcessAssasin(t, PROCESS_TIMEOUT); + setUpClosingListener(stdoutl, pa, t); + setUpClosingListener(stderrl, pa, t); pa.start(); t.start(); while (t.getP() == null && t.deadlyException == null) { @@ -834,6 +857,13 @@ return pr; } + private static void setUpClosingListener(ContentReaderListener listener, ProcessAssasin pa, ThreadedProcess t) { + if (listener != null && (listener instanceof ClosingListener)) { + ((ClosingListener) listener).setAssasin(pa); + ((ClosingListener) listener).setProcess(t); + } + } + /** * this is temprary solution until refactoring is fully done * Use net.sourceforge.jnlp.ProcessResult instead diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoAllClosingListener.java Mon Sep 24 17:05:41 2012 +0200 @@ -0,0 +1,57 @@ +/* CountingClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp.closinglisteners; + +import net.sourceforge.jnlp.ClosingListener; + +public class AutoAllClosingListener extends ClosingListener { + + + + @Override + public void charReaded(char ch) { + + } + + @Override + public void lineReaded(String s) { + if (s.contains(AutoErrorClosingListener.MAGICAL_ERROR_CLOSING_STRING) || s.contains(AutoOkClosingListener.MAGICAL_OK_CLOSING_STRING)){ + terminate(); + } + } + +} diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoErrorClosingListener.java Mon Sep 24 17:05:41 2012 +0200 @@ -0,0 +1,46 @@ +/* AutoErrorClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp.closinglisteners; + +public class AutoErrorClosingListener extends StringBasedClosingListener { + + public static final String MAGICAL_ERROR_CLOSING_STRING = "xception"; + + public AutoErrorClosingListener() { + super(MAGICAL_ERROR_CLOSING_STRING); + } +} diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/AutoOkClosingListener.java Mon Sep 24 17:05:41 2012 +0200 @@ -0,0 +1,48 @@ +/* CountingClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp.closinglisteners; + + +public class AutoOkClosingListener extends StringBasedClosingListener { + + public static final String MAGICAL_OK_CLOSING_STRING = "*** APPLET FINISHED ***"; + + public AutoOkClosingListener() { + super(MAGICAL_OK_CLOSING_STRING); + } + +} diff -r 97280ecda136 -r 17900f4ca4a6 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringBasedClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringBasedClosingListener.java Mon Sep 24 17:05:41 2012 +0200 @@ -0,0 +1,67 @@ +/* StringBasedClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp.closinglisteners; + +import net.sourceforge.jnlp.ClosingListener; + +public class StringBasedClosingListener extends ClosingListener { + + private final String condition; + + public StringBasedClosingListener(String condition) { + this.condition = condition; From jvanek at redhat.com Mon Sep 24 08:20:35 2012 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 24 Sep 2012 17:20:35 +0200 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <50606D12.8060400@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> <1347985272.17468.53.camel@adomurad-desktop> <5058A308.6050208@redhat.com> <505AF057.1000909@redhat.com> <1348153135.20946.47.camel@adomurad-desktop> <50606D12.8060400@redhat.com> Message-ID: <50607A43.60205@redhat.com> On 09/24/2012 04:24 PM, Jiri Vanek wrote: > On 09/20/2012 04:58 PM, Adam Domurad wrote: >> >>>>> inclined to agree. Overall, I'm starting to think that a standard, >>>>> magic, "**APPLET FINISHED**" string copypasted into every applet is the > ... >> >> >>> diff -r d23356f8a7a6 >>> tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java >>> --- >>> a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 >>> 10:55:16 2012 +0200 >>> +++ >>> b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Thu Sep 20 >>> 12:03:40 2012 +0200 >>> @@ -43,6 +43,8 @@ >>> import net.sourceforge.jnlp.browsertesting.BrowserTest; >>> import net.sourceforge.jnlp.browsertesting.Browsers; >>> import net.sourceforge.jnlp.annotations.TestInBrowsers; >>> +import net.sourceforge.jnlp.closinglisteners.Rule; >>> +import >>> net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; >>> import org.junit.Assert; >>> >>> import org.junit.Test; >>> @@ -50,8 +52,22 @@ >>> public class AppletTestSignedTests extends BrowserTest { >>> >>> private final List l = >>> Collections.unmodifiableList(Arrays.asList(new >>> String[]{"-Xtrustall"})); >>> + private static final String ss = "xception"; >>> + private static final String s0 = "AppletTestSigned was started"; >>> + private static final String s1 = "value1"; >>> + private static final String s2 = "value2"; >>> + private static final String s3 = "AppletTestSigned was >>> initialised"; >>> + private static final String s7 = "AppletTestSigned killing >>> himself after 2000 ms of life"; >>> + private static final RulesFolowingClosingListener.ContainsRule >>> crss = new RulesFolowingClosingListener.ContainsRule(ss); >> Still a bit of verbosity here that is just a little off-putting (mainly >> because of Java requiring type twice to be honest - once in declaration >> and once in initialization :). > > I would rather stay off renaming of old variables in this patch (not reefactoring one), although I > agree with ... > >> The part that's supposed to be the most >> meaningful (the variable name) has the least verbosity. > > ... ^this :) > > So I have refactored ruels name. > >> It would be a >> bit better I think if the line read something like: >> private static final Rule exceptionRule = new ContainsRule(ss); >> >> Note that this doesn't require you to move the ContainsRule class, but >> simply import RulesFolowingClosingListener.ContainsRule; > > sure, done > >> >>> + private static final RulesFolowingClosingListener.ContainsRule >>> s0ss = new RulesFolowingClosingListener.ContainsRule(s0); >>> + private static final RulesFolowingClosingListener.ContainsRule >>> s1ss = new RulesFolowingClosingListener.ContainsRule(s1); >>> + private static final RulesFolowingClosingListener.ContainsRule >>> s2ss = new RulesFolowingClosingListener.ContainsRule(s2); >>> + private static final RulesFolowingClosingListener.ContainsRule >>> s3ss = new RulesFolowingClosingListener.ContainsRule(s3); >>> + private static final RulesFolowingClosingListener.ContainsRule >>> s7ss = new RulesFolowingClosingListener.ContainsRule(s7); >>> + private static final Rule[] okRules = new Rule[]{s0ss, s1ss, >>> s2ss, s3ss, s7ss}; >>> + private static final Rule[] errorRrules = new Rule[]{crss}; >> Rrules -> Rules >>> >>> - @Test >>> + // @Test >>> public void AppletTestSignedTest() throws Exception { >>> ProcessResult pr = server.executeJavawsHeadless(l, >>> "/AppletTestSigned.jnlp"); >>> evaluateSignedApplet(pr, true); >>> @@ -60,18 +76,12 @@ >>> } >>> >>> private void evaluateSignedApplet(ProcessResult pr, boolean >>> javawsApplet) { >>> - String s3 = "AppletTestSigned was initialised"; >>> - Assert.assertTrue("AppletTestSigned stdout should contain " + >>> s3 + " but didn't", pr.stdout.contains(s3)); >>> - String s0 = "AppletTestSigned was started"; >>> - Assert.assertTrue("AppletTestSigned stdout should contain " + >>> s0 + " but didn't", pr.stdout.contains(s0)); >>> - String s1 = "value1"; >>> - Assert.assertTrue("AppletTestSigned stdout should contain " + >>> s1 + " but didn't", pr.stdout.contains(s1)); >>> - String s2 = "value2"; >>> - Assert.assertTrue("AppletTestSigned stdout should contain " + >>> s2 + " but didn't", pr.stdout.contains(s2)); >>> - String ss = "xception"; >>> - Assert.assertFalse("AppletTestSigned stderr should not >>> contain " + ss + " but did", pr.stderr.contains(ss)); >>> - String s7 = "AppletTestSigned killing himself after 2000 ms >>> of life"; >>> - Assert.assertTrue("AppletTestSigned stdout should contain " + >>> s7 + " but didn't", pr.stdout.contains(s7)); >>> + Assert.assertTrue("AppletTestSigned stdout " + >>> s3ss.toString() + " but didn't", s3ss.evaluate(pr.stdout)); >>> + Assert.assertTrue("AppletTestSigned stdout " + >>> s0ss.toString() + " but didn't", s0ss.evaluate(pr.stdout)); >>> + Assert.assertTrue("AppletTestSigned stdout " + >>> s1ss.toString() + " but didn't", s1ss.evaluate(pr.stdout)); >>> + Assert.assertTrue("AppletTestSigned stdout " + >>> s2ss.toString() + " but didn't", s2ss.evaluate(pr.stdout)); >>> + Assert.assertFalse("AppletTestSigned stderr " + >>> crss.toNotString() + " but did", crss.evaluate(pr.stderr)); >>> + Assert.assertTrue("AppletTestSigned stdout " + >>> s7ss.toString() + " but didn't", s7ss.evaluate(pr.stdout)); >>> if (!javawsApplet) { >>> /*this is working correctly in most browser, but not in >>> all. temporarily disabling >>> String s4 = "AppletTestSigned was stopped"; >>> @@ -87,7 +97,7 @@ >>> public void AppletTestSignedFirefoxTestXslowX() throws Exception >>> { >>> ServerAccess.PROCESS_TIMEOUT = 30 * 1000; >>> try { >>> - ProcessResult pr = >>> server.executeBrowser("/AppletTestSigned2.html"); >>> + ProcessResult pr = >>> server.executeBrowser("/AppletTestSigned2.html",new >>> RulesFolowingClosingListener(okRules),new >>> RulesFolowingClosingListener(errorRrules)); >>> evaluateSignedApplet(pr, false); >>> //Assert.assertTrue(pr.wasTerminated); >>> //Assert.assertEquals((Integer) 0, pr.returnValue); due >>> to destroy is null >>> diff -r d23356f8a7a6 >>> tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java >>> --- >>> a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Sep 20 10:55:16 >>> 2012 +0200 >>> +++ >>> b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Thu Sep 20 12:03:40 >>> 2012 +0200 >>> @@ -35,6 +35,7 @@ >>> exception statement from your version. >>> */ >>> >>> +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; >>> import net.sourceforge.jnlp.ProcessResult; >>> import net.sourceforge.jnlp.ServerAccess; >>> import net.sourceforge.jnlp.browsertesting.BrowserTest; >>> @@ -47,6 +48,24 @@ >>> >>> public class AppletTestTests extends BrowserTest { >>> >>> + private final String s7 = "Aplet killing himself after 2000 ms of >>> life"; >> Aplet -> Applet (Is there another occurence of this typo ?) > > I let it be intentionally, it is also in src and more tests depend on it. > >>> + private final String ss = "xception"; >> I'm wondering what case this covers as opposed to "Exception" ? It's >> fine though, as there are no other english words that end in xception :) >>> + private final String s2 = "value2"; >>> + private final String s1 = "value1"; >>> + private final String s0 = "applet was started"; >>> + private final String s3 = "applet was initialised"; >>> + >>> + private class CountingClosingListenerImpl extends >>> CountingClosingListener { >>> + >>> + @Override >>> + protected boolean isAlowedToFinish(String s) { >>> + if (s.contains(ss)) { >>> + return true; >>> + } >>> + return (s.contains(s0) && s.contains(s1) && >>> s.contains(s2) && s.contains(s3) && s.contains(s7)); >>> + } >>> + } >>> + >>> @Test >>> @TestInBrowsers(testIn = {Browsers.googleChrome}) >>> @NeedsDisplay >>> @@ -55,7 +74,7 @@ >>> try { >>> //System.out.println("connecting AppletInFirefoxTest >>> request in " + getBrowser().toString()); >>> //just verify loging is recording browser >>> - ProcessResult pr1 = >>> server.executeBrowser("/appletAutoTests.html"); >>> + ProcessResult pr1 = >>> server.executeBrowser("/appletAutoTests2.html", new >>> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >>> if (pr1.process == null) { >>> Assert.assertTrue("If proces was null here, then >>> google-chrome had to not exist, and so " >>> + ServerAccess.UNSET_BROWSER >>> @@ -64,12 +83,12 @@ >>> >>> pr1.deadlyException.getMessage().contains(ServerAccess.UNSET_BROWSER)); >>> return; >>> } >>> - evaluateApplet(pr1,false); >>> + evaluateApplet(pr1, false); >>> Assert.assertTrue(pr1.wasTerminated); >>> //System.out.println("connecting AppletInFirefoxTest >>> request in " + getBrowser().toString()); >>> // just verify loging is recording browser >>> - ServerAccess.ProcessResult pr = >>> server.executeBrowser("/appletAutoTests.html"); >>> - evaluateApplet(pr,false); >>> + ServerAccess.ProcessResult pr = >>> server.executeBrowser("/appletAutoTests2.html", new >>> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >>> + evaluateApplet(pr, false); >>> Assert.assertTrue(pr.wasTerminated); >>> } finally { >>> ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to >>> normal >>> @@ -80,30 +99,24 @@ >>> @NeedsDisplay >>> public void AppletTest() throws Exception { >>> ProcessResult pr = server.executeJavawsHeadless(null, >>> "/AppletTest.jnlp"); >>> - evaluateApplet(pr,true); >>> + evaluateApplet(pr, true); >>> Assert.assertFalse(pr.wasTerminated); >>> Assert.assertEquals((Integer) 0, pr.returnValue); >>> } >>> >>> private void evaluateApplet(ProcessResult pr, boolean >>> javawsApplet) { >>> - String s3 = "applet was initialised"; >>> Assert.assertTrue("AppletTest stdout should contains " + s3 + >>> " bud didn't", pr.stdout.contains(s3)); >>> - String s0 = "applet was started"; >>> Assert.assertTrue("AppletTest stdout should contains " + s0 + >>> " bud didn't", pr.stdout.contains(s0)); >>> - String s1 = "value1"; >>> Assert.assertTrue("AppletTest stdout should contains " + s1 + >>> " bud didn't", pr.stdout.contains(s1)); >>> - String s2 = "value2"; >>> Assert.assertTrue("AppletTest stdout should contains " + s2 + >>> " bud didn't", pr.stdout.contains(s2)); >>> - String ss = "xception"; >>> Assert.assertFalse("AppletTest stderr should not contains " + >>> ss + " but did", pr.stderr.contains(ss)); >>> - String s7 = "Aplet killing himself after 2000 ms of life"; >>> Assert.assertTrue("AppletTest stdout should contains " + s7 + >>> " bud didn't", pr.stdout.contains(s7)); >>> if (!javawsApplet) { >>> /*this is working correctly in most browser, but not in >>> all. temporarily disabling >>> - String s4 = "applet was stopped"; >>> - Assert.assertTrue("AppletTest stdout should contains " + s4 + >>> " bud did't", pr.stdout.contains(s4)); >>> - String s5 = "applet will be destroyed"; >>> - Assert.assertTrue("AppletTest stdout should contains " + s5 + >>> " bud did't", pr.stdout.contains(s5)); >>> + String s4 = "applet was stopped"; >>> + Assert.assertTrue("AppletTest stdout should contains " + >>> s4 + " bud did't", pr.stdout.contains(s4)); >>> + String s5 = "applet will be destroyed"; >>> + Assert.assertTrue("AppletTest stdout should contains " + >>> s5 + " bud did't", pr.stdout.contains(s5)); >>> */ >>> } >>> } >>> @@ -116,8 +129,8 @@ >>> //just verify loging is recordingb rowser >>> ServerAccess.PROCESS_TIMEOUT = 30 * 1000; >>> try { >>> - ProcessResult pr = >>> server.executeBrowser("/appletAutoTests2.html"); >>> - evaluateApplet(pr,false); >>> + ProcessResult pr = >>> server.executeBrowser("/appletAutoTests2.html", new >>> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >>> + evaluateApplet(pr, false); >>> Assert.assertTrue(pr.wasTerminated); >>> //Assert.assertEquals((Integer) 0, pr.returnValue); due >>> to destroy is null >>> } finally { >>> @@ -132,9 +145,9 @@ >>> //just verify loging is recording browser >>> ServerAccess.PROCESS_TIMEOUT = 30 * 1000; >>> try { >>> - ProcessResult pr = >>> server.executeBrowser("/appletAutoTests.html"); >>> + ProcessResult pr = >>> server.executeBrowser("/appletAutoTests.html", new >>> CountingClosingListenerImpl(), new CountingClosingListenerImpl()); >>> pr.process.destroy(); >>> - evaluateApplet(pr,false); >>> + evaluateApplet(pr, false); >>> Assert.assertTrue(pr.wasTerminated); >>> //Assert.assertEquals((Integer) 0, pr.returnValue); due >>> to destroy is null >>> } finally { >>> diff -r d23356f8a7a6 >>> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java >>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >>> +++ >>> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java Thu >>> Sep 20 12:03:40 2012 +0200 >>> @@ -0,0 +1,60 @@ >>> +/* CountingClosingListener.java >>> +Copyright (C) 2012 Red Hat, Inc. >>> + >>> +This file is part of IcedTea. >>> + >>> +IcedTea is free software; you can redistribute it and/or >>> +modify it under the terms of the GNU General Public License as >>> published by >>> +the Free Software Foundation, version 2. >>> + >>> +IcedTea is distributed in the hope that it will be useful, >>> +but WITHOUT ANY WARRANTY; without even the implied warranty of >>> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >>> +General Public License for more details. >>> + >>> +You should have received a copy of the GNU General Public License >>> +along with IcedTea; see the file COPYING. If not, write to >>> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >>> Boston, MA >>> +02110-1301 USA. >>> + >>> +Linking this library statically or dynamically with other modules is >>> +making a combined work based on this library. Thus, the terms and >>> +conditions of the GNU General Public License cover the whole >>> +combination. >>> + >>> +As a special exception, the copyright holders of this library give >>> you >>> +permission to link this library with independent modules to produce >>> an >>> +executable, regardless of the license terms of these independent >>> +modules, and to copy and distribute the resulting executable under >>> +terms of your choice, provided that you also meet, for each linked >>> +independent module, the terms and conditions of the license of that >>> +module. An independent module is a module which is not derived from >>> +or based on this library. If you modify this library, you may extend >>> +this exception to your version of the library, but you are not >>> +obligated to do so. If you do not wish to do so, delete this >>> +exception statement from your version. >>> + */ >>> +package net.sourceforge.jnlp.closinglisteners; >>> + >>> +import net.sourceforge.jnlp.ClosingListener; >>> + >>> +public abstract class CountingClosingListener extends ClosingListener >>> { >>> + >>> + protected StringBuilder sb = new StringBuilder(); >>> + >>> + @Override >>> + public void charReaded(char ch) { >>> + sb.append(ch); >>> + if (isAlowedToFinish(sb.toString())) { >>> + terminate(); >>> + } >>> + >>> + } >>> + >>> + @Override >>> + public void lineReaded(String s) { >>> + //nothing to do >>> + } >>> + >>> + protected abstract boolean isAlowedToFinish(String content); >>> +} >>> diff -r d23356f8a7a6 >>> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java >>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >>> +++ >>> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java Thu Sep 20 12:03:40 >>> 2012 +0200 >>> @@ -0,0 +1,47 @@ >>> +/* Rule.java >>> +Copyright (C) 2012 Red Hat, Inc. >>> + >>> +This file is part of IcedTea. >>> + >>> +IcedTea is free software; you can redistribute it and/or >>> +modify it under the terms of the GNU General Public License as >>> published by >>> +the Free Software Foundation, version 2. >>> + >>> +IcedTea is distributed in the hope that it will be useful, >>> +but WITHOUT ANY WARRANTY; without even the implied warranty of >>> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >>> +General Public License for more details. >>> + >>> +You should have received a copy of the GNU General Public License >>> +along with IcedTea; see the file COPYING. If not, write to >>> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >>> Boston, MA >>> +02110-1301 USA. >>> + >>> +Linking this library statically or dynamically with other modules is >>> +making a combined work based on this library. Thus, the terms and >>> +conditions of the GNU General Public License cover the whole >>> +combination. >>> + >>> +As a special exception, the copyright holders of this library give >>> you >>> +permission to link this library with independent modules to produce >>> an >>> +executable, regardless of the license terms of these independent >>> +modules, and to copy and distribute the resulting executable under >>> +terms of your choice, provided that you also meet, for each linked >>> +independent module, the terms and conditions of the license of that >>> +module. An independent module is a module which is not derived from >>> +or based on this library. If you modify this library, you may extend >>> +this exception to your version of the library, but you are not >>> +obligated to do so. If you do not wish to do so, delete this >>> +exception statement from your version. >>> +*/ >>> +package net.sourceforge.jnlp.closinglisteners; >>> + >>> +public interface Rule { >> Oh boy this is so generic it reminds me of the Boost C++ library :). (If >> you're unfamiliar, almost all their types take parameters.) > > Yap, I'm familiar, and I don like it :) > > However here it seemed to me useful - kept. > >>> + >>> + public void setRule(S rule); >>> + public boolean evaluate(T upon); >>> + @Override >>> + public String toString(); >>> + public String toNotString(); >>> + >>> +} >>> diff -r d23356f8a7a6 >>> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java >>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >>> +++ >>> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java >>> Thu Sep 20 12:03:40 2012 +0200 >>> @@ -0,0 +1,238 @@ >>> +/* RulesFolowingClosingListener.java >>> +Copyright (C) 2012 Red Hat, Inc. >>> + >>> +This file is part of IcedTea. >>> + >>> +IcedTea is free software; you can redistribute it and/or >>> +modify it under the terms of the GNU General Public License as >>> published by >>> +the Free Software Foundation, version 2. >>> + >>> +IcedTea is distributed in the hope that it will be useful, >>> +but WITHOUT ANY WARRANTY; without even the implied warranty of >>> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >>> +General Public License for more details. >>> + >>> +You should have received a copy of the GNU General Public License >>> +along with IcedTea; see the file COPYING. If not, write to >>> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >>> Boston, MA >>> +02110-1301 USA. >>> + >>> +Linking this library statically or dynamically with other modules is >>> +making a combined work based on this library. Thus, the terms and >>> +conditions of the GNU General Public License cover the whole >>> +combination. >>> + >>> +As a special exception, the copyright holders of this library give >>> you >>> +permission to link this library with independent modules to produce >>> an >>> +executable, regardless of the license terms of these independent >>> +modules, and to copy and distribute the resulting executable under >>> +terms of your choice, provided that you also meet, for each linked >>> +independent module, the terms and conditions of the license of that >>> +module. An independent module is a module which is not derived from >>> +or based on this library. If you modify this library, you may extend >>> +this exception to your version of the library, but you are not >>> +obligated to do so. If you do not wish to do so, delete this >>> +exception statement from your version. >>> + */ >>> +package net.sourceforge.jnlp.closinglisteners; >>> + >>> +import java.util.ArrayList; >>> +import java.util.Arrays; >>> +import java.util.List; >>> + >>> +public class RulesFolowingClosingListener extends >>> CountingClosingListener { >>> + >>> + private List rules = new ArrayList(); >>> + >>> + public static class ContainsRule extends StringRule>> String> { >>> + >>> + public ContainsRule(String s) { >>> + super(s); >>> + } >> There's considerable overlap between Contains and NotContains, what do >> you think about an inversion flag ? >>> + >>> + @Override >>> + public boolean evaluate(String upon) { >>> + return (upon.contains(rule)); >>> + } >>> + >>> + @Override >>> + public String toString() { >>> + return "should contains `" + rule + "`"; >>> + } >> 'should contains' -> 'should contain' > fixed in all new code > >> Although its a tough call, I'm inclined to say this is a bit of an abuse >> of toString(). It's a built-in that doesn't have a natural 'opposite' >> like you're giving it. toPassingString() and to toFailingString() might >> be better, but feel free to leave it if it feels more natural to you. > > I compeltely agree. Refactored as sugested >>> + >>> + @Override >>> + public String toNotString() { >>> + return "should NOT contains `" + rule + "`"; >> 'should NOT contains' -> 'should NOT contain', similar cases below > fixed in all new code >>> + } >>> + } >>> + >>> + public static class NotContainsRule extends StringRule>> String> { >>> + >>> + public NotContainsRule(String s) { >>> + super(s); >>> + } >>> + >>> + @Override >>> + public boolean evaluate(String upon) { >>> + return !(upon.contains(rule)); >>> + } >>> + >>> + @Override >>> + public String toString() { >>> + return "should NOT contains `" + rule + "`"; >>> + } >>> + >>> + @Override >>> + public String toNotString() { >>> + return "should contains `" + rule + "`"; >>> + } >>> + } >>> + >>> + public static class MatchesRule extends StringRule>> String> { >>> + >>> + public MatchesRule(String s) { >>> + super(s); >>> + } >>> + >>> + @Override >>> + public boolean evaluate(String upon) { >>> + return (upon.matches(rule)); >>> + } >>> + >>> + @Override >>> + public String toString() { >>> + return "should match `" + rule + "`"; >>> + } >>> + >>> + @Override >>> + public String toNotString() { >>> + return "should NOT match `" + rule + "`"; >>> + } >>> + } >>> + >>> + public static class NotMatchesRule extends StringRule>> String> { >>> + >>> + public NotMatchesRule(String s) { >>> + super(s); >>> + } >>> + >>> + @Override >>> + public boolean evaluate(String upon) { >>> + return !(upon.matches(rule)); >>> + } >>> + >>> + @Override >>> + public String toString() { >>> + return "should NOT match`" + rule + "`"; >>> + } >>> + >>> + @Override >>> + public String toNotString() { >>> + return "should match`" + rule + "`"; >>> + } >>> + } >>> + >>> + /** >>> + * >>> + * @param rule >>> + * @return self, to alow chaing add(...).add(..)... >>> + */ >>> + public RulesFolowingClosingListener addRule(Rule rule) { >>> + this.rules.add(rule); >>> + return this; >>> + } >>> + >>> + /** >>> + * >>> + * @param rule >>> + * @return self, to alow chaing add(...).add(..)... >>> + */ >>> + public RulesFolowingClosingListener addMatchingRule(String rule) >>> { >>> + this.rules.add(new MatchesRule(rule)); >>> + return this; >>> + } >>> + >>> + /** >>> + * >>> + * @param rule >>> + * @return self, to alow chaing add(...).add(..)... >>> + */ >>> + public RulesFolowingClosingListener addNotMatchingRule(String >>> rule) { >>> + this.rules.add(new NotMatchesRule(rule)); >>> + return this; >>> + } >>> + >>> + /** >>> + * >>> + * @param rule >>> + * @return self, to alow chaing add(...).add(..)... >>> + */ >>> + public RulesFolowingClosingListener addContainsRule(String rule) >>> { >>> + this.rules.add(new ContainsRule(rule)); >>> + return this; >>> + } >>> + >>> + /** >>> + * >>> + * @param rule >>> + * @return self, to alow chaing add(...).add(..)... >>> + */ >>> + public RulesFolowingClosingListener addNotContainsRule(String >>> rule) { >>> + this.rules.add(new NotContainsRule(rule)); >>> + return this; >>> + } >>> + >>> + public RulesFolowingClosingListener() { >>> + } >>> + >>> + public RulesFolowingClosingListener(List l) { >>> + addRules(l); >>> + } >>> + >>> + public RulesFolowingClosingListener(Rule[] l) { >>> + addRules(l); >>> + } >>> + >>> + public void setRules(List rules) { >>> + if (rules == null) { >>> + throw new NullPointerException("rules cant be null"); >>> + } >>> + this.rules = rules; >>> + } >>> + >>> + public void setRules(Rule[] rules) { >>> + if (rules == null) { >>> + throw new NullPointerException("rules cant be null"); >>> + } >>> + this.rules = Arrays.asList(rules); >>> + } >>> + >>> + public void addRules(List rules) { >>> + if (rules == null) { >>> + throw new NullPointerException("rules cant be null"); >>> + } >>> + this.rules.addAll(rules); >>> + } >>> + >>> + public void addRules(Rule[] rules) { >> Is there a reason you wouldn't want this as Rule... ? This would still >> allow for passing an array, but allow more convenience than creating an >> array explicitly. >>> + if (rules == null) { >>> + throw new NullPointerException("rules cant be null"); >>> + } >>> + this.rules.addAll(Arrays.asList(rules)); >>> + } >>> + >>> + @Override >>> + protected boolean isAlowedToFinish(String content) { >>> + if (rules == null || rules.size() < 1) { >>> + throw new IllegalStateException("No rules specified"); >>> + } >>> + for (Rule rule : rules) { >>> + if (!rule.evaluate(content)) { >> So all rules have to match for it to close ? > > Yes! And Imho it is the only correct thing to do (and reason why I'm not 100% for > Auto*ClsoingListener) > In case of multithread applet this will become absolutely necessary. (or to make some additional > sync in applet, which is unnecessary overhead) > >>> + return false; >>> + } >>> + } >>> + return true; >>> + >>> + >>> + } >>> +} >>> diff -r d23356f8a7a6 >>> tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java >>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >>> +++ >>> b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java Thu Sep 20 >>> 12:03:40 2012 +0200 >>> @@ -0,0 +1,57 @@ >>> +/* StringRule.java >>> +Copyright (C) 2012 Red Hat, Inc. >>> + >>> +This file is part of IcedTea. >>> + >>> +IcedTea is free software; you can redistribute it and/or >>> +modify it under the terms of the GNU General Public License as >>> published by >>> +the Free Software Foundation, version 2. >>> + >>> +IcedTea is distributed in the hope that it will be useful, >>> +but WITHOUT ANY WARRANTY; without even the implied warranty of >>> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >>> +General Public License for more details. >>> + >>> +You should have received a copy of the GNU General Public License >>> +along with IcedTea; see the file COPYING. If not, write to >>> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >>> Boston, MA >>> +02110-1301 USA. >>> + >>> +Linking this library statically or dynamically with other modules is >>> +making a combined work based on this library. Thus, the terms and >>> +conditions of the GNU General Public License cover the whole >>> +combination. >>> + >>> +As a special exception, the copyright holders of this library give >>> you >>> +permission to link this library with independent modules to produce >>> an >>> +executable, regardless of the license terms of these independent >>> +modules, and to copy and distribute the resulting executable under >>> +terms of your choice, provided that you also meet, for each linked >>> +independent module, the terms and conditions of the license of that >>> +module. An independent module is a module which is not derived from >>> +or based on this library. If you modify this library, you may extend >>> +this exception to your version of the library, but you are not >>> +obligated to do so. If you do not wish to do so, delete this >>> +exception statement from your version. >>> +*/ >>> +package net.sourceforge.jnlp.closinglisteners; >>> + >>> +public abstract class StringRule implements Rule>> T>{ >> I'm confused, why isn't this type simply StringRule ? (Isn't String >> here being parsed as a generic type ?? I must admit I've never seen >> concrete types in this location.) > > Sure. Fixed >>> + protected String rule; >>> + >>> + public StringRule(String rule) { >>> + setRule(rule); >>> + } >>> + >>> + public StringRule() { >>> + } >>> + >>> + >>> + @Override >>> + public void setRule(String rule){ >>> + this.rule=rule; >>> + } >>> + @Override >>> + public abstract boolean evaluate(T upon); >>> + >>> +} >>> > >> Thanks for the patch! > > Tahnk yo for review :) > >> - Adam >> > Added missing Rule... type support J. -------------- next part -------------- A non-text attachment was scrubbed... Name: closingListener_6_2.diff Type: text/x-patch Size: 25416 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/c6872bbd/closingListener_6_2.diff From adomurad at redhat.com Mon Sep 24 08:37:33 2012 From: adomurad at redhat.com (Adam Domurad) Date: Mon, 24 Sep 2012 11:37:33 -0400 Subject: [rfc][icedtea-web] closing listener idea In-Reply-To: <50607A43.60205@redhat.com> References: <502A6993.7060205@redhat.com> <1344959442.19536.49.camel@voip-10-15-18-79.yyz.redhat.com> <502BD50F.1050201@redhat.com> <502E1A9E.4000503@redhat.com> <1347908087.17468.33.camel@adomurad-desktop> <505894D0.1020904@redhat.com> <1347985272.17468.53.camel@adomurad-desktop> <5058A308.6050208@redhat.com> <505AF057.1000909@redhat.com> <1348153135.20946.47.camel@adomurad-desktop> <50606D12.8060400@redhat.com> <50607A43.60205@redhat.com> Message-ID: <1348501053.1134.29.camel@adomurad-desktop> >>> public class AppletTestTests extends BrowserTest { > >> > >> + private final String s7 = "Aplet killing himself after 2000 ms > of > >> life"; > > Aplet -> Applet (Is there another occurence of this typo ?) > > I let it be intentionally, it is also in src and more tests depend on > it. OK. Although it is unfortunate when such things creep. > > Oh boy this is so generic it reminds me of the Boost C++ library :). > (If > > you're unfamiliar, almost all their types take parameters.) > > Yap, I'm familiar, and I don like it :) > > However here it seemed to me useful - kept. Yes, I wasn't saying it was necessarily bad. Also Boost can be wonderful, it is a huge library with many parts :). Latest patch comments: > diff -r faae12ea6f3c tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java > --- a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 24 15:41:02 2012 +0200 > +++ b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 24 16:23:19 2012 +0200 > @@ -43,6 +43,9 @@ > import net.sourceforge.jnlp.browsertesting.BrowserTest; > import net.sourceforge.jnlp.browsertesting.Browsers; > import net.sourceforge.jnlp.annotations.TestInBrowsers; > +import net.sourceforge.jnlp.closinglisteners.Rule; > +import net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; > +import static net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener.*; > import org.junit.Assert; > > import org.junit.Test; > @@ -50,8 +53,22 @@ > public class AppletTestSignedTests extends BrowserTest { > > private final List l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"})); > + private static final String ss = "xception"; > + private static final String s0 = "AppletTestSigned was started"; > + private static final String s1 = "value1"; > + private static final String s2 = "value2"; > + private static final String s3 = "AppletTestSigned was initialised"; > + private static final String s7 = "AppletTestSigned killing himself after 2000 ms of life"; > + private static final ContainsRule exceptionRule = new ContainsRule(ss); > + private static final ContainsRule startedRule = new ContainsRule(s0); > + private static final ContainsRule variable1Rule = new ContainsRule(s1); > + private static final ContainsRule variable2Rule = new ContainsRule(s2); > + private static final ContainsRule initialisedRule = new ContainsRule(s3); > + private static final ContainsRule killedRule = new ContainsRule(s7); > + private static final Rule[] okRules = new Rule[]{startedRule, variable1Rule, variable2Rule, initialisedRule, killedRule}; Thanks for changing names. Originals can be left alone I suppose, I don't want to go digging in the past too much :) > [..snip..] > + } > + > + public void addRules(Rule[] rules) { > + if (rules == null) { > + throw new NullPointerException("rules cant be null"); > + } > + this.rules.addAll(Arrays.asList(rules)); > + } This could take Rule... for consistency. Feel free to change without new patch. > + > + @Override > + protected boolean isAlowedToFinish(String content) { > + if (rules == null || rules.size() < 1) { > + throw new IllegalStateException("No rules specified"); > + } > + for (Rule rule : rules) { > + if (!rule.evaluate(content)) { > + return false; > + } > + } > + return true; > + > + > + } > +} > diff -r faae12ea6f3c tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java Mon Sep 24 16:23:19 2012 +0200 > @@ -0,0 +1,57 @@ > +/* StringRule.java > +Copyright (C) 2012 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > +package net.sourceforge.jnlp.closinglisteners; > + > +public abstract class StringRule implements Rule{ > + protected String rule; > + > + public StringRule(String rule) { > + setRule(rule); > + } > + > + public StringRule() { > + } > + > + > + @Override > + public void setRule(String rule){ > + this.rule=rule; > + } > + @Override > + public abstract boolean evaluate(T upon); > + > +} Thanks! OK for HEAD. - Adam From smohammad at redhat.com Mon Sep 24 10:58:28 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Mon, 24 Sep 2012 13:58:28 -0400 Subject: [RFC][icedtea-web]: DownloadService implementation In-Reply-To: <50411B4E.8080308@redhat.com> References: <50411B4E.8080308@redhat.com> Message-ID: <50609F44.2040102@redhat.com> Hello, I found a little bug while writing the reproducer for this implementation. I have fixed this issue and attached the updated patch with a Changelog entry (sorry, I somehow missed adding the Changelog entry in the previous email). Thanks. Changelog: 2012-09-07 Saad Mohammad Core implementation of DownloadService. * netx/net/sourceforge/jnlp/cache/CacheUtil.java (getCacheParentDirectory): Returns the parent directory of the cached resource. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (addNewJar): Adds a new jar to the classloader with specified UpdatePolicy. (getLoaderByJnlpUrl): Returns the classloader of the jnlp file specified. (getLoaderByResourceUrl): Returns the classloader that contains the specified jar. (getJars): Returns jars from the JNLP file with the specified partname. (removeCachedJars): Removes jar from cache. (removeJars): Help removeCachedJars() remove jars from the filesystem. (downloadJars): Downloads jars identified by part name. (initializeNewJarDownload): Downloads and initializes jars into the current loader. (manageExternalJars): Manages jars that are not mentioned in the JNLP file. (loadExternalResouceToCache): Used by DownloadService to download and initalize resources that are not mentioned in the jnlp file. (removeExternalCachedResource): Used by DownloadService to remove resources from cache that are not mentioned in the jnlp file. (isExternalResourceCached): Determines if the resource that is not mentioned in the jnlp file is cached and returns a boolean with the result. * netx/net/sourceforge/jnlp/services/XDownloadService.java: Core implementation of DownloadService. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: changelog0-1.patch Type: text/x-patch Size: 1687 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/3d37d5f5/changelog0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: implementation6.patch Type: text/x-patch Size: 18394 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/3d37d5f5/implementation6.patch From smohammad at redhat.com Mon Sep 24 11:00:03 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Mon, 24 Sep 2012 14:00:03 -0400 Subject: [RFC][icedtea-web]: Reproducer for DownloadService Message-ID: <50609FA3.8040701@redhat.com> Hi, The patch attached is the reproducer for DownloadService. The implementation patch is still under review and can be found at: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-September/020330.html Thanks. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: Changelog0-1.patch Type: text/x-patch Size: 901 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/31268355/Changelog0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: reproducers_ds0-7.patch Type: text/x-patch Size: 34069 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120924/31268355/reproducers_ds0-7.patch From jvanalte at redhat.com Mon Sep 24 11:16:38 2012 From: jvanalte at redhat.com (Jon VanAlten) Date: Mon, 24 Sep 2012 14:16:38 -0400 (EDT) Subject: [RFC] Enhanced Garbage Collection Probe Points In-Reply-To: <20120831200639.GA3000@redhat.com> Message-ID: <2117489537.1010362.1348510598749.JavaMail.root@redhat.com> > > > > Is this ok to commit? > > > > > > > With caveats noted above, I say yes :) > > > > Thanks! Please let me know if there is anything else you'd like to > know, > updated patch is attached. > Hi, This has been in my TODO for some time, so I am very sorry not to have responded earlier. From looking at the patch, it seems okay now. I intend to push this to HEAD on your behalf, unless someone else has some reason why not. (Now is your chance to speak up about that, if you have such a reason!). But, I do feel responsible to build with it myself and verify that things seem to be working as intended. Various other things have been jumping my work queue, but I may have time this week to give this a sanity check and finally get it into hg. Thanks for persisting! cheers, jon From ahughes at redhat.com Mon Sep 24 11:24:32 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Mon, 24 Sep 2012 14:24:32 -0400 (EDT) Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <50607250.7080008@redhat.com> Message-ID: <1861102037.817861.1348511072683.JavaMail.root@redhat.com> ----- Original Message ----- > Hi Florian, > > Mostly in complete agreement with Xerxes here, > > On 24/09/12 10:03 AM, Xerxes R?nby wrote: > > 2012-09-23 11:05, Florian Weimer skrev: > >> What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? > >> Are > >> they officially released/supported? What about the zero port? > >> > >> I'm wondering which of these VMs should be part of the upcoming > >> Debian > >> stable release. > >> > > ### Zero > > Zero is actively maintained and all around stable. > > Zero includes an assembler optimized interpreter for ARM and a > > thumb2 jit for armv7. > > Zero + OpenJDK 6 Icedtea 1.11.4 = OK > > Zero + OpenJDK 7 Icedtea 2.3.2 = OK > At least as far as I know the asm jit for arm is not yet working in > 2.3 > will be fixed after I get last bits of jsr 292 for zero pasted back > together. > > tested configure flags: > > --enable-zero > > and > > --with-additional-vms=zero As far as I'm aware, the ARM port is only present in the 2.1 branch. This needs rectifying. The supported way of building is with --enable-zero. > > > > ### Shark > > Shark (zero+shark) is unmaintained and considered broken. > > Do not package. > > Long term goal but dead at the moment. > > > > ### JamVM > > JamVM is actively maintained and all around stable. > > JamVM + OpenJDK 6 Icedtea 1.11.4 = OK, a more stable upstream > > release exist to be released with 1.12. > > use this patch > > http://icedtea.classpath.org/hg/icedtea6/rev/fb1137cef484 > > to use the latest JamVM in combination with IcedTea6 1.11.x before > > the next IcedTea 6 1.12 hits the streets. > > > > JamVM + OpenJDK 7 Icedtea 2.3.2 = OK > > tested configure flags: > > --enable-jamvm --enable-jamvm is the support way of building. Is the same JamVM used by 6, 7 & 8? > > and > > --with-additional-vms=jamvm > > * This --with-additional-vms=jamvm combination require a SONAME > > patch on top of JamVM. > > This jamvm-avoid-version-soname.patch SONAME patch is currently > > only in use by ubuntu. > > http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch > > Sent and waiting for review upstream. > > http://sourceforge.net/mailarchive/message.php?msg_id=29763831 > > Why is this patch not in IcedTea or JamVM itself? > > ### CACAO > > Cacao is actively maintained and stable in combination with OpenJDK > > 6. > > Cacao + OpenJDK 6 Icedtea 1.11.4 = OK > > --enable-cacao > > and > > --with-additional-vms=cacao Again, --enable-cacao is the supported way of building. > > There is a new upstream cacao 1.6.0 release that should be merged > > and used by IcedTea6. > > http://www.cacaojvm.org/ > > Is anyone working on this? > > Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable > > The CACAO OpenJDK 7 port is immature, it can run HelloWorld and > > some numerical simple benchmarks > > but refuses to run real world applications that access file IO. > > Do not package. > > Ok, should this also be upgraded to 1.6? Are there CACAO bugs for these issues? > > ### Avian > > Avian is actively maintained and rapidly approaching stable. > > Avian + OpenJDK 7 IcedTea 2.3.2 = OK > > Avian is preferably built separately from src after the main > > OpenJDK 7 build. > > Avian is packaged in Ubuntu 12.10 and show great performance on > > embeded devices. > > Latest deb source and merge request: > > https://code.launchpad.net/~xranby/ubuntu/quantal/avian/avian_0.6+20120924/+merge/126005 > > http://oss.readytalk.com/avian/ > > This is the first I've heard of this. Any reason support wasn't added to IcedTea? > > Cheers > > Xerxes > Thanks Xerxes! > > Cheers! > Chris > PS > The definition of support I am using here is > "mostly working will try to fix bugs on best effort basis". > > -- > -- > -- Woda: "Java: write once, debug anywhere" Hong Zhang > http://thehenrys.ca > | Chris Phillips @ T.O. Red Hat OpenJDK JVM Engineer, | > | mailto:ChrisPhi at RedHat.Com (416)483-3768 | > | http://LGonQn.Org/www/Chris.Phillips cell: (416)505-3610 | > "EPIC stands for Expects Perfectly Intuitive Compilers" P. Bannon > http://www.hazmatmodine.com > NOTICE: > This email message is for the sole use of the intended recipient(s) > and may contain confidential and privileged information. Any > unauthorized review, use, disclosure or distribution is prohibited. > If you are not the intended recipient, please contact the sender by > reply email and destroy all copies of the original message. > "blah blah blah - Ginger!" > -- > -- > > Cheers, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From stefan at complang.tuwien.ac.at Mon Sep 24 12:54:10 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 21:54:10 +0200 Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 Message-ID: Now that I've read PR1120 again, I'm getting the feeling that you had something different in mind, but I guess this is still worthwhile. I tried to align icedtea 6 and 7 for now. Regarding the ability to use the same upstream version for all branches, I know that David wanted to work on this. I'm trying to find out about his status on the CACAO mailing list. diff -r 36b093404170 -r 84d34cd092c6 Makefile.am --- a/Makefile.am Thu Sep 20 16:33:37 2012 +0100 +++ b/Makefile.am Mon Sep 24 21:02:32 2012 +0200 @@ -453,12 +453,6 @@ patches/cacao/memory.patch endif -if ENABLE_CACAO -ICEDTEA_PATCHES += \ - patches/cacao/ignore-jdi-tests.patch \ - patches/cacao/ignore-tests.patch -endif - if ENABLE_PULSE_JAVA ICEDTEA_PATCHES += \ patches/pulse-soundproperties.patch @@ -591,11 +585,6 @@ VERBOSE="$(VERBOSE)" \ ALT_OUTPUTDIR="$(BUILD_OUTPUT_DIR)" -if ENABLE_CACAO -ICEDTEA_ENV += \ - ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" -endif - if ENABLE_JAMVM ICEDTEA_ENV += \ ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" @@ -1036,14 +1025,14 @@ if !USE_SYSTEM_CACAO if USE_ALT_CACAO_SRC_DIR set -e ; \ - if ! test -d cacao ; \ + if ! test -d cacao/cacao ; \ then \ mkdir cacao ; \ cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \ fi else set -e ; \ - if ! test -d cacao ; \ + if ! test -d cacao/cacao ; \ then \ mkdir cacao ; \ $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ @@ -1054,7 +1043,7 @@ endif endif mkdir -p stamps - touch stamps/extract-cacao.stamp + touch $@ stamps/extract-jamvm.stamp: if BUILD_JAMVM @@ -2112,8 +2101,8 @@ --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ --with-java-runtime-library-classes=$(RUNTIME) \ --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ - $(ARCH_PREFIX) $(MAKE) install - ln -s server $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install + ln -sf server $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client endif endif mkdir -p stamps From stefan at complang.tuwien.ac.at Mon Sep 24 13:05:35 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 22:05:35 +0200 Subject: [RFC] PR1120: Synchronize CACAO sections with icedtea7 Message-ID: Arghh, subject should have said PR1120. The patch is for icedtea6. > -if ENABLE_CACAO > -ICEDTEA_PATCHES += \ > - patches/cacao/ignore-jdi-tests.patch \ > - patches/cacao/ignore-tests.patch > -endif The jdi-tests patch is not present in icedtea7, and since I'm touching this anyway, I think it's time to get rid of it entirely since CACAO has gained support for park/unpark a long time ago. From stefan at complang.tuwien.ac.at Mon Sep 24 13:35:01 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 22:35:01 +0200 Subject: [PATCH 0 of 2] PR1120: Synchronize CACAO sections with icedtea6 Message-ID: This time for icedtea7, still missing changelog entries. I'm also leaving out the file deletions for clarity. From stefan at complang.tuwien.ac.at Mon Sep 24 13:35:02 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 22:35:02 +0200 Subject: [PATCH 1 of 2] PR1120: Added --with-cacao-src-dir option In-Reply-To: References: Message-ID: # HG changeset patch # User sr # Date 1346570315 -7200 # Node ID df433f22394fccfedf8853e17e29cd66ebc0dc37 # Parent b374a4e01497602745d1ff4adf89a47c347f30e5 PR1120: Added --with-cacao-src-dir option 2012-09-02 Stefan Ring * configure.ac: Added --with-cacao-src-dir option, along the lines of Mercurial rev 66ad418c7b91 from icedtea6. * acinclude: New macro IT_WITH_CACAO_SRC_DIR. * Makefile.am: Copy CACAO sources when USE_ALT_CACAO_SRC_DIR is used. diff -r b374a4e01497 -r df433f22394f Makefile.am --- a/Makefile.am Wed Sep 19 21:36:08 2012 +0100 +++ b/Makefile.am Sun Sep 02 09:18:35 2012 +0200 @@ -1068,6 +1068,8 @@ stamps/download-cacao.stamp: if BUILD_CACAO if !USE_SYSTEM_CACAO +if USE_ALT_CACAO_SRC_DIR +else if USE_ALT_CACAO_SRC_ZIP ln -sf $(ALT_CACAO_SRC_ZIP) $(CACAO_SRC_ZIP) endif @@ -1089,6 +1091,7 @@ fi endif endif +endif mkdir -p stamps touch $@ @@ -1268,6 +1271,14 @@ stamps/extract-cacao.stamp: stamps/download-cacao.stamp if BUILD_CACAO if !USE_SYSTEM_CACAO +if USE_ALT_CACAO_SRC_DIR + set -e ; \ + if ! test -d cacao/cacao ; \ + then \ + mkdir cacao ; \ + cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \ + fi +else set -e ; \ if ! test -d cacao/cacao ; \ then \ @@ -1280,6 +1291,7 @@ fi endif endif +endif mkdir -p stamps touch $@ diff -r b374a4e01497 -r df433f22394f acinclude.m4 --- a/acinclude.m4 Wed Sep 19 21:36:08 2012 +0100 +++ b/acinclude.m4 Sun Sep 02 09:18:35 2012 +0200 @@ -805,7 +805,7 @@ AC_MSG_ERROR([Invalid CACAO source zip specified: ${ALT_CACAO_SRC_ZIP}]) fi ], - [ + [ ALT_CACAO_SRC_ZIP="not specified" ]) AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x${ALT_CACAO_SRC_ZIP}" != "xnot specified") @@ -813,6 +813,27 @@ AC_SUBST(ALT_CACAO_SRC_ZIP) ]) +AC_DEFUN([IT_WITH_CACAO_SRC_DIR], +[ + AC_MSG_CHECKING(for a CACAO source directory) + AC_ARG_WITH([cacao-src-dir], + [AS_HELP_STRING(--with-cacao-src-dir,specify the location of the CACAO sources)], + [ + ALT_CACAO_SRC_DIR=${withval} + if test "x${ALT_CACAO_SRC_DIR}" = "xno"; then + ALT_CACAO_SRC_DIR="not specified" + elif ! test -d ${ALT_CACAO_SRC_DIR} ; then + AC_MSG_ERROR([Invalid CACAO source dir specified: ${ALT_CACAO_SRC_DIR}]) + fi + ], + [ + ALT_CACAO_SRC_DIR="not specified" + ]) + AM_CONDITIONAL(USE_ALT_CACAO_SRC_DIR, test "x${ALT_CACAO_SRC_DIR}" != "xnot specified") + AC_MSG_RESULT(${ALT_CACAO_SRC_DIR}) + AC_SUBST(ALT_CACAO_SRC_DIR) +]) + AC_DEFUN([IT_ENABLE_HG], [ AC_REQUIRE([IT_WITH_PROJECT]) diff -r b374a4e01497 -r df433f22394f configure.ac --- a/configure.ac Wed Sep 19 21:36:08 2012 +0100 +++ b/configure.ac Sun Sep 02 09:18:35 2012 +0200 @@ -148,6 +148,7 @@ IT_ENABLE_CACAO IT_WITH_CACAO_HOME IT_WITH_CACAO_SRC_ZIP +IT_WITH_CACAO_SRC_DIR IT_ENABLE_JAMVM IT_WITH_JAMVM_SRC_ZIP From stefan at complang.tuwien.ac.at Mon Sep 24 13:35:03 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 22:35:03 +0200 Subject: [PATCH 2 of 2] PR1120: Synchronize CACAO sections with icedtea6 In-Reply-To: References: Message-ID: # HG changeset patch # User sr # Date 1348514527 -7200 # Node ID e7c6c340dedeab1fbf677f5c7c9780596bd5f764 # Parent df433f22394fccfedf8853e17e29cd66ebc0dc37 PR1120: Synchronize CACAO sections with icedtea6 diff -r df433f22394f -r e7c6c340dede Makefile.am --- a/Makefile.am Sun Sep 02 09:18:35 2012 +0200 +++ b/Makefile.am Mon Sep 24 21:22:07 2012 +0200 @@ -270,11 +270,6 @@ endif endif -if ENABLE_CACAO -ICEDTEA_PATCHES += \ - patches/cacao/ignore-tests.patch -endif - if BUILD_JAMVM ICEDTEA_PATCHES += \ patches/jamvm/remove-sun.misc.Perf-debug-code.patch @@ -377,16 +372,8 @@ if JAVAC_LACKS_DIAMOND ICEDTEA_BOOT_PATCHES += patches/boot/ecj-diamond.patch else -if USING_CACAO -ICEDTEA_BOOT_PATCHES += patches/boot/compile-for-7-cacao-mem.patch -else -if BUILD_CACAO -ICEDTEA_BOOT_PATCHES += patches/boot/compile-for-7-cacao-mem.patch -else ICEDTEA_BOOT_PATCHES += patches/boot/compile-for-7.patch endif -endif -endif if DTDTYPE_QNAME ICEDTEA_BOOT_PATCHES += patches/boot/jaxws-getdtdtype.patch @@ -473,11 +460,6 @@ JAVAC_WARNINGS_FATAL="$(WERROR_STATUS)" \ COMPILER_WARNINGS_FATAL="$(WERROR_STATUS)" -if ENABLE_CACAO -ICEDTEA_ENV += \ - ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" -endif - if ENABLE_JAMVM ICEDTEA_ENV += \ ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" @@ -1268,7 +1250,7 @@ clean-sanitise-openjdk: rm -f stamps/sanitise-openjdk.stamp -stamps/extract-cacao.stamp: stamps/download-cacao.stamp +stamps/extract-cacao.stamp: if BUILD_CACAO if !USE_SYSTEM_CACAO if USE_ALT_CACAO_SRC_DIR @@ -1283,11 +1265,9 @@ if ! test -d cacao/cacao ; \ then \ mkdir cacao ; \ - $(TAR) xzf $(CACAO_SRC_ZIP) -C cacao ; \ + $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ dir=$$(basename cacao/cacao-*) ; \ ln -s $$dir cacao/cacao ; \ - cd cacao/cacao ; \ - cd .. ; \ fi endif endif @@ -2096,8 +2076,6 @@ --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install ln -sf server $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client - touch $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt - ln -sf client/libjvm.so $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so endif endif mkdir -p stamps From stefan at complang.tuwien.ac.at Mon Sep 24 13:39:17 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 22:39:17 +0200 Subject: [PATCH 1 of 2] PR1120: Added --with-cacao-src-dir option In-Reply-To: References: Message-ID: Somehow the patchbomb extension is not the best I could think of? From stefan at complang.tuwien.ac.at Mon Sep 24 13:49:27 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 22:49:27 +0200 Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <1861102037.817861.1348511072683.JavaMail.root@redhat.com> References: <50607250.7080008@redhat.com> <1861102037.817861.1348511072683.JavaMail.root@redhat.com> Message-ID: >> > There is a new upstream cacao 1.6.0 release that should be merged >> > and used by IcedTea6. >> > http://www.cacaojvm.org/ >> > > > Is anyone working on this? I can do this. It should be completely trivial, though. Especially since I'd really like icedtea to stick to building from hg. >> > Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable >> > The CACAO OpenJDK 7 port is immature, it can run HelloWorld and >> > some numerical simple benchmarks >> > but refuses to run real world applications that access file IO. >> > Do not package. >> > > > Ok, should this also be upgraded to 1.6? Are there CACAO bugs for these issues? Should what be upgraded? I'll file and triage this soon. From ahughes at redhat.com Mon Sep 24 14:16:32 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Mon, 24 Sep 2012 17:16:32 -0400 (EDT) Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: Message-ID: <1148481311.896966.1348521392677.JavaMail.root@redhat.com> ----- Original Message ----- > Now that I've read PR1120 again, I'm getting the feeling that you had > something different in mind, but I guess this is still worthwhile. I > tried to align icedtea 6 and 7 for now. > > Regarding the ability to use the same upstream version for all > branches, I know that David wanted to work on this. I'm trying to > find > out about his status on the CACAO mailing list. > Is this for 6? 7? 8? > > diff -r 36b093404170 -r 84d34cd092c6 Makefile.am > --- a/Makefile.am Thu Sep 20 16:33:37 2012 +0100 > +++ b/Makefile.am Mon Sep 24 21:02:32 2012 +0200 > @@ -453,12 +453,6 @@ > patches/cacao/memory.patch > endif > > -if ENABLE_CACAO > -ICEDTEA_PATCHES += \ > - patches/cacao/ignore-jdi-tests.patch \ > - patches/cacao/ignore-tests.patch > -endif > - I see you explained this in the other patch. > if ENABLE_PULSE_JAVA > ICEDTEA_PATCHES += \ > patches/pulse-soundproperties.patch > @@ -591,11 +585,6 @@ > VERBOSE="$(VERBOSE)" \ > ALT_OUTPUTDIR="$(BUILD_OUTPUT_DIR)" > > -if ENABLE_CACAO > -ICEDTEA_ENV += \ > - ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" > -endif > - Why is this being removed? > if ENABLE_JAMVM > ICEDTEA_ENV += \ > ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" > @@ -1036,14 +1025,14 @@ > if !USE_SYSTEM_CACAO > if USE_ALT_CACAO_SRC_DIR > set -e ; \ > - if ! test -d cacao ; \ > + if ! test -d cacao/cacao ; \ I seem to remember this is a previous fix. I'd prefer direct backports of existing fixes. > then \ > mkdir cacao ; \ > cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \ > fi > else > set -e ; \ > - if ! test -d cacao ; \ > + if ! test -d cacao/cacao ; \ > then \ > mkdir cacao ; \ > $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ > @@ -1054,7 +1043,7 @@ > endif > endif > mkdir -p stamps > - touch stamps/extract-cacao.stamp > + touch $@ > > stamps/extract-jamvm.stamp: > if BUILD_JAMVM > @@ -2112,8 +2101,8 @@ > --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ > --with-java-runtime-library-classes=$(RUNTIME) \ > --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ > - $(ARCH_PREFIX) $(MAKE) install > - ln -s server > $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client > + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install > + ln -sf server > $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client Has CACAO always supported parallel make or is this a recent fix? > endif > endif > mkdir -p stamps > > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From stefan at complang.tuwien.ac.at Mon Sep 24 14:28:20 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Mon, 24 Sep 2012 23:28:20 +0200 Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: <1148481311.896966.1348521392677.JavaMail.root@redhat.com> References: <1148481311.896966.1348521392677.JavaMail.root@redhat.com> Message-ID: > Is this for 6? 7? 8? I seem to have messed up the threading... It's for 6. >> if ENABLE_PULSE_JAVA >> ICEDTEA_PATCHES += \ >> patches/pulse-soundproperties.patch >> @@ -591,11 +585,6 @@ >> VERBOSE="$(VERBOSE)" \ >> ALT_OUTPUTDIR="$(BUILD_OUTPUT_DIR)" >> >> -if ENABLE_CACAO >> -ICEDTEA_ENV += \ >> - ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" >> -endif >> - > > Why is this being removed? I'm not sure what it is for, and I hoped someone would comment on it ;). I thought it was not there in 7, but it seems I was mistaken. Will need to reconsider. >> if ENABLE_JAMVM >> ICEDTEA_ENV += \ >> ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" >> @@ -1036,14 +1025,14 @@ >> if !USE_SYSTEM_CACAO >> if USE_ALT_CACAO_SRC_DIR >> set -e ; \ >> - if ! test -d cacao ; \ >> + if ! test -d cacao/cacao ; \ > > I seem to remember this is a previous fix. I'd prefer direct backports of existing fixes. Ok, I'll try to track this down. >> @@ -2112,8 +2101,8 @@ >> --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ >> --with-java-runtime-library-classes=$(RUNTIME) \ >> --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ >> - $(ARCH_PREFIX) $(MAKE) install >> - ln -s server >> $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client >> + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install >> + ln -sf server >> $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client > > Has CACAO always supported parallel make or is this a recent fix? Always been supported. It always bugged me that the icedtea build was not using it. If I had only known how easy it was to add... From gnu.andrew at redhat.com Mon Sep 24 14:58:02 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Mon, 24 Sep 2012 17:58:02 -0400 (EDT) Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: Message-ID: <2001466894.916515.1348523882168.JavaMail.root@redhat.com> ----- Original Message ----- > > Is this for 6? 7? 8? > > I seem to have messed up the threading... It's for 6. > I think 6 is actually more up-to-date than 7. The bug was filed to get the actual changesets in sync. Taking on the whole Makefile is a much bigger issue, covered by the tracker bug that PR1118 blocks. > >> if ENABLE_PULSE_JAVA > >> ICEDTEA_PATCHES += \ > >> patches/pulse-soundproperties.patch > >> @@ -591,11 +585,6 @@ > >> VERBOSE="$(VERBOSE)" \ > >> ALT_OUTPUTDIR="$(BUILD_OUTPUT_DIR)" > >> > >> -if ENABLE_CACAO > >> -ICEDTEA_ENV += \ > >> - ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" > >> -endif > >> - > > > > Why is this being removed? > > I'm not sure what it is for, and I hoped someone would comment on it > ;). I thought it was not there in 7, but it seems I was mistaken. > Will > need to reconsider. > > >> if ENABLE_JAMVM > >> ICEDTEA_ENV += \ > >> ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" > >> @@ -1036,14 +1025,14 @@ > >> if !USE_SYSTEM_CACAO > >> if USE_ALT_CACAO_SRC_DIR > >> set -e ; \ > >> - if ! test -d cacao ; \ > >> + if ! test -d cacao/cacao ; \ > > > > I seem to remember this is a previous fix. I'd prefer direct > > backports of existing fixes. > > Ok, I'll try to track this down. > I was thinking of this: 2012-08-09 Stefan Ring * Makefile.am: copy entire CACAO directory, including .hg but that's to the mkdir not the test. The change in 7 is part of a big cleanup patch which I'd rather wasn't backported as is, so just include this single change, assuming it doesn't break anything. > >> @@ -2112,8 +2101,8 @@ > >> --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk > >> \ > >> --with-java-runtime-library-classes=$(RUNTIME) \ > >> --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ > >> - $(ARCH_PREFIX) $(MAKE) install > >> - ln -s server > >> $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client > >> + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install > >> + ln -sf server > >> $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client > > > > Has CACAO always supported parallel make or is this a recent fix? > > Always been supported. It always bugged me that the icedtea build was > not using it. If I had only known how easy it was to add... > Ok, so I suggest just adding a patch to change the test & add parallel jobs, assuming it builds. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From xerxes at zafena.se Mon Sep 24 16:16:19 2012 From: xerxes at zafena.se (=?UTF-8?B?WGVyeGVzIFLDpW5ieQ==?=) Date: Tue, 25 Sep 2012 01:16:19 +0200 Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <1861102037.817861.1348511072683.JavaMail.root@redhat.com> References: <1861102037.817861.1348511072683.JavaMail.root@redhat.com> Message-ID: <5060E9C3.4000904@zafena.se> On 09/24/2012 08:24 PM, Andrew Hughes wrote: > ----- Original Message ----- >> Hi Florian, >> >> Mostly in complete agreement with Xerxes here, >> >> On 24/09/12 10:03 AM, Xerxes R?nby wrote: >>> 2012-09-23 11:05, Florian Weimer skrev: >>>> What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? >>>> Are >>>> they officially released/supported? What about the zero port? >>>> >>>> I'm wondering which of these VMs should be part of the upcoming >>>> Debian >>>> stable release. >>>> >>> ### Zero >>> Zero is actively maintained and all around stable. >>> Zero includes an assembler optimized interpreter for ARM and a >>> thumb2 jit for armv7. >>> Zero + OpenJDK 6 Icedtea 1.11.4 = OK >>> Zero + OpenJDK 7 Icedtea 2.3.2 = OK >> At least as far as I know the asm jit for arm is not yet working in >> 2.3 >> will be fixed after I get last bits of jsr 292 for zero pasted back >> together. We default to use the 2.1 hotspot branch when zero is enabled in order to workaround this issue for the 2.3.2 release. see below: >>> tested configure flags: >>> --enable-zero >>> and >>> --with-additional-vms=zero > > As far as I'm aware, the ARM port is only present in the 2.1 branch. This needs rectifying. No rectifying needed because we actually build the IcedTea 7 2.1 hotspot branch for all Zero builds of the IcedTea7 2.3.2 release! examination: http://icedtea.classpath.org/hg/release/icedtea7-2.3/file/e7117fcb33ed/acinclude.m4#l924 Here we run a check for zero builds and if found then switches the default hotspot. line source of acinclude.m4 926 AC_REQUIRE([IT_ENABLE_ZERO_BUILD]) 927 if test "x${use_zero}" = "xyes"; then 928 DEFAULT_BUILD="zero" 929 else 930 DEFAULT_BUILD="default" 931 fi http://icedtea.classpath.org/hg/release/icedtea7-2.3/file/e7117fcb33ed/hotspot.map Here we define the location for the zero hotspot src repository, note that zero builds use the icedtea7-forest-2.1/hotspot that do include the ARM port! line source of hotspot.map 1 # version url changeset sha256sum 2 default http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot ea39d76b3bde 25733b44590c950adc42a2e9c366b8a3992803c06dedcc16d2bf0d50fed54844 3 zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot 47a867dd3005 9f9c2fb9eea9cc2e2d44f23d46615522b09ad0b5dbce2e448458a44e05161e3e Verification: If your Zero VM version ends with "mixed mode" on ARM then it do contain the assembler optimizations and the Thumb2 JIT. xranby at ac100-armel:~$ java -version java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1) OpenJDK Zero VM (build 22.0-b10, mixed mode) Yes, the ARM assembler optimized interpreter and Thumb2 JIT is included in 2.3.2 release! > > The supported way of building is with --enable-zero. > >>> >>> ### Shark >>> Shark (zero+shark) is unmaintained and considered broken. >>> Do not package. >> >> Long term goal but dead at the moment. >>> >>> ### JamVM >>> JamVM is actively maintained and all around stable. >>> JamVM + OpenJDK 6 Icedtea 1.11.4 = OK, a more stable upstream >>> release exist to be released with 1.12. >>> use this patch >>> http://icedtea.classpath.org/hg/icedtea6/rev/fb1137cef484 >>> to use the latest JamVM in combination with IcedTea6 1.11.x before >>> the next IcedTea 6 1.12 hits the streets. >>> >>> JamVM + OpenJDK 7 Icedtea 2.3.2 = OK >>> tested configure flags: >>> --enable-jamvm > > --enable-jamvm is the support way of building. > > Is the same JamVM used by 6, 7 & 8? Yes same source, JamVM got a configure flag --with-java-runtime-library=openjdk6 and --with-java-runtime-library=openjdk7 to handle the recent shared char buffer String change that got introduced with the IcedTea 2.3 release. > >>> and >>> --with-additional-vms=jamvm >>> * This --with-additional-vms=jamvm combination require a SONAME >>> patch on top of JamVM. >>> This jamvm-avoid-version-soname.patch SONAME patch is currently >>> only in use by ubuntu. >>> http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch >>> Sent and waiting for review upstream. >>> http://sourceforge.net/mailarchive/message.php?msg_id=29763831 >>> > > Why is this patch not in IcedTea or JamVM itself? Robert have not yet responded to the patch sent to the JamVM mailinglist. I wanted to first merge it in JamVM upstream before introducing it into IcedTea. > >>> ### CACAO >>> Cacao is actively maintained and stable in combination with OpenJDK >>> 6. >>> Cacao + OpenJDK 6 Icedtea 1.11.4 = OK >>> --enable-cacao >>> and >>> --with-additional-vms=cacao > > Again, --enable-cacao is the supported way of building. > >>> There is a new upstream cacao 1.6.0 release that should be merged >>> and used by IcedTea6. >>> http://www.cacaojvm.org/ >>> > > Is anyone working on this? > >>> Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable >>> The CACAO OpenJDK 7 port is immature, it can run HelloWorld and >>> some numerical simple benchmarks >>> but refuses to run real world applications that access file IO. >>> Do not package. >>> > > Ok, should this also be upgraded to 1.6? Are there CACAO bugs for these issues? > >>> ### Avian >>> Avian is actively maintained and rapidly approaching stable. >>> Avian + OpenJDK 7 IcedTea 2.3.2 = OK >>> Avian is preferably built separately from src after the main >>> OpenJDK 7 build. >>> Avian is packaged in Ubuntu 12.10 and show great performance on >>> embeded devices. >>> Latest deb source and merge request: >>> https://code.launchpad.net/~xranby/ubuntu/quantal/avian/avian_0.6+20120924/+merge/126005 >>> http://oss.readytalk.com/avian/ >>> > > This is the first I've heard of this. Any reason support wasn't added to IcedTea? > Avian is preparing their 1.0 release that will be the first release with OpenJDK 7 support. By keeping it outside IcedTea enable distributions that package Avian to have a rapid release cycle during its stabilization process. I plan to introduce Avian into IcedTea when it have reached 1.0 and is found to be self hosting. >>> Cheers >>> Xerxes >> Thanks Xerxes! >> >> Cheers! >> Chris >> PS >> The definition of support I am using here is >> "mostly working will try to fix bugs on best effort basis". >> >> -- >> -- >> -- Woda: "Java: write once, debug anywhere" Hong Zhang >> http://thehenrys.ca >> | Chris Phillips @ T.O. Red Hat OpenJDK JVM Engineer, | >> | mailto:ChrisPhi at RedHat.Com (416)483-3768 | >> | http://LGonQn.Org/www/Chris.Phillips cell: (416)505-3610 | >> "EPIC stands for Expects Perfectly Intuitive Compilers" P. Bannon >> http://www.hazmatmodine.com >> NOTICE: >> This email message is for the sole use of the intended recipient(s) >> and may contain confidential and privileged information. Any >> unauthorized review, use, disclosure or distribution is prohibited. >> If you are not the intended recipient, please contact the sender by >> reply email and destroy all copies of the original message. >> "blah blah blah - Ginger!" >> -- >> -- >> >> > > Cheers, > Cheers! From vanaltj at icedtea.classpath.org Mon Sep 24 18:07:01 2012 From: vanaltj at icedtea.classpath.org (vanaltj at icedtea.classpath.org) Date: Tue, 25 Sep 2012 01:07:01 +0000 Subject: /hg/release/thermostat-0.4: Added tag thermostat-0.4-branch for ... Message-ID: changeset 73b984279227 in /hg/release/thermostat-0.4 details: http://icedtea.classpath.org/hg/release/thermostat-0.4?cmd=changeset;node=73b984279227 author: Jon VanAlten date: Mon Sep 24 20:29:50 2012 -0400 Added tag thermostat-0.4-branch for changeset f355627c5cf3 diffstat: .hgtags | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (8 lines): diff -r f355627c5cf3 -r 73b984279227 .hgtags --- a/.hgtags Mon Sep 24 13:00:57 2012 -0400 +++ b/.hgtags Mon Sep 24 20:29:50 2012 -0400 @@ -1,3 +1,4 @@ 6f83cf36541d5bfaedfcaf2caa826c7d20fb9adf v0.1 d6ef9a7aa52e5b879d588b7ce60f7ceeede19f8b v0.2 f1a3248d23a9792161228352686dfcd481efc6b6 0.3 +f355627c5cf3287320ae57e2148748bdbd9d7dc0 thermostat-0.4-branch From rob.lougher at gmail.com Mon Sep 24 18:12:22 2012 From: rob.lougher at gmail.com (Robert Lougher) Date: Tue, 25 Sep 2012 02:12:22 +0100 Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <5060E9C3.4000904@zafena.se> References: <1861102037.817861.1348511072683.JavaMail.root@redhat.com> <5060E9C3.4000904@zafena.se> Message-ID: On 25 September 2012 00:16, Xerxes R?nby wrote: > On 09/24/2012 08:24 PM, Andrew Hughes wrote: >> >>>> and >>>> --with-additional-vms=jamvm >>>> * This --with-additional-vms=jamvm combination require a SONAME >>>> patch on top of JamVM. >>>> This jamvm-avoid-version-soname.patch SONAME patch is currently >>>> only in use by ubuntu. >>>> >>>> http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch >>>> Sent and waiting for review upstream. >>>> http://sourceforge.net/mailarchive/message.php?msg_id=29763831 >>>> >> >> Why is this patch not in IcedTea or JamVM itself? > > > Robert have not yet responded to the patch sent to the JamVM mailinglist. > I wanted to first merge it in JamVM upstream before introducing it into > IcedTea. > > Patch now pushed to JamVMs repository: http://git.berlios.de/cgi-bin/gitweb.cgi?p=jamvm;a=commit;h=0972452d441544f7dd29c55d64f1ce3a5db90d82 Thanks, Rob. From stefan at complang.tuwien.ac.at Mon Sep 24 23:45:25 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Tue, 25 Sep 2012 08:45:25 +0200 Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: <2001466894.916515.1348523882168.JavaMail.root@redhat.com> References: <2001466894.916515.1348523882168.JavaMail.root@redhat.com> Message-ID: > Ok, so I suggest just adding a patch to change the test & add parallel > jobs, assuming it builds. Ok, I have this now -- : diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-09-25 Stefan Ring + + * Makefile.am: Synchronize CACAO sections with icedtea7, + remove test-disabling patches. + * patches/cacao/ignore-jdi-tests.patch: Removed. + * patches/cacao/ignore-tests.patch: Removed. + 2012-09-20 Andrew John Hughes * Makefile.am: diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -453,12 +453,6 @@ patches/cacao/memory.patch endif -if ENABLE_CACAO -ICEDTEA_PATCHES += \ - patches/cacao/ignore-jdi-tests.patch \ - patches/cacao/ignore-tests.patch -endif - if ENABLE_PULSE_JAVA ICEDTEA_PATCHES += \ patches/pulse-soundproperties.patch @@ -1054,7 +1048,7 @@ endif endif mkdir -p stamps - touch stamps/extract-cacao.stamp + touch $@ stamps/extract-jamvm.stamp: if BUILD_JAMVM @@ -2112,7 +2106,7 @@ --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ --with-java-runtime-library-classes=$(RUNTIME) \ --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ - $(ARCH_PREFIX) $(MAKE) install + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install ln -s server $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client endif endif From stefan at complang.tuwien.ac.at Mon Sep 24 23:46:34 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Tue, 25 Sep 2012 08:46:34 +0200 Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: References: <2001466894.916515.1348523882168.JavaMail.root@redhat.com> Message-ID: > @@ -1054,7 +1048,7 @@ > endif > endif > mkdir -p stamps > - touch stamps/extract-cacao.stamp > + touch $@ I still like this better. And should PR1118 or PR1120 be referenced? From ptisnovs at icedtea.classpath.org Tue Sep 25 01:43:27 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 25 Sep 2012 08:43:27 +0000 Subject: /hg/gfx-test: Added ten new tests to the test suite src/org/gfxt... Message-ID: changeset fed6c6375851 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=fed6c6375851 author: Pavel Tisnovsky date: Tue Sep 25 10:46:05 2012 +0200 Added ten new tests to the test suite src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java | 169 ++++++++++++++- 2 files changed, 173 insertions(+), 1 deletions(-) diffs (206 lines): diff -r 9de74cb93444 -r fed6c6375851 ChangeLog --- a/ChangeLog Fri Sep 21 11:45:20 2012 +0200 +++ b/ChangeLog Tue Sep 25 10:46:05 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-25 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java: + Added ten new tests to this test suite. + 2012-09-21 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltCropImage.java: diff -r 9de74cb93444 -r fed6c6375851 src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java --- a/src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java Fri Sep 21 11:45:20 2012 +0200 +++ b/src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java Tue Sep 25 10:46:05 2012 +0200 @@ -40,7 +40,16 @@ package org.gfxtest.testsuites; +import java.awt.Graphics2D; +import java.awt.image.BufferedImage; + + + +import org.gfxtest.framework.BitmapCropRegions; +import org.gfxtest.framework.CommonBitmapOperations; import org.gfxtest.framework.PrintTest; +import org.gfxtest.framework.TestImage; +import org.gfxtest.framework.TestResult; import org.gfxtest.framework.annotations.BitBltOperation; import org.gfxtest.framework.annotations.BitBltOperations; import org.gfxtest.framework.annotations.GraphicsPrimitive; @@ -57,7 +66,8 @@ /** * This test check the rendering of buffered images (so called bit block - * transfers or Bit Blt) created by various constructors. + * transfers or Bit Blt) created by various constructors. Such images are + * rendered cropped - only partial image is used for the BitBlt operation. * * @author Pavel Tisnovsky */ @@ -71,6 +81,163 @@ { /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. No crop is performed to that image. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryNoCrop(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropNW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropNE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropSW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_BYTE_BINARY. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeByteBinaryCropSE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, + BitmapCropRegions.CROP_REGION_SE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB. + * No crop is performed to that image. + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBNoCrop(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only north-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropNW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_NW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only north-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropNE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_NE); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only south-west quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropSW(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_SW); + } + + /** + * Test basic BitBlt operation for checker buffered image with type + * TYPE_INT_RGB. Image is cropped so only south-east quarter of it is rendered. + * + * @param image + * image to which line is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testBitBltCheckerBufferedImageTypeIntRGBCropSE(TestImage image, Graphics2D graphics2d) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, + BitmapCropRegions.CROP_REGION_SE); + } + + /** * Entry point to the test suite. * * @param args From ptisnovs at icedtea.classpath.org Tue Sep 25 01:51:28 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 25 Sep 2012 08:51:28 +0000 Subject: /hg/rhino-tests: Added five new tests to the test suite src/org/... Message-ID: changeset 466d720bca82 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=466d720bca82 author: Pavel Tisnovsky date: Tue Sep 25 10:54:08 2012 +0200 Added five new tests to the test suite src/org/RhinoTests/SimpleBindingsClassTest.java. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleBindingsClassTest.java | 64 +++++++++++++++++++++++- 2 files changed, 64 insertions(+), 5 deletions(-) diffs (117 lines): diff -r 0c41d28346b9 -r 466d720bca82 ChangeLog --- a/ChangeLog Fri Sep 21 13:04:34 2012 +0200 +++ b/ChangeLog Tue Sep 25 10:54:08 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-25 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleBindingsClassTest.java: + Added five new tests to this test suite. + 2012-09-21 Pavel Tisnovsky * src/org/RhinoTests/CompiledScriptClassTest.java: diff -r 0c41d28346b9 -r 466d720bca82 src/org/RhinoTests/SimpleBindingsClassTest.java --- a/src/org/RhinoTests/SimpleBindingsClassTest.java Fri Sep 21 13:04:34 2012 +0200 +++ b/src/org/RhinoTests/SimpleBindingsClassTest.java Tue Sep 25 10:54:08 2012 +0200 @@ -65,7 +65,7 @@ /** * Object that represents the type of SimpleBindings. */ - Class simpleBindingsClass = null; + Class simpleBindingsClass = null; @Override protected void setUp(String[] args) { @@ -136,10 +136,64 @@ } /** + * Test for method javax.script.SimpleBindings.getClass().isAnnotation() + */ + protected void testIsAnnotation() { + assertFalse(this.simpleBindingsClass.isAnnotation(), + "Method SimpleBindings.getClass().isAnnotation() returns wrong value"); + } + + /** + * Test for method javax.script.SimpleBindings.getClass().isAnnotationPresent() + */ + protected void testIsAnnotationPresent() { + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.annotation.Annotation.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.annotation.Annotation.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.annotation.Documented.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.annotation.Documented.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.annotation.Inherited.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.annotation.Inherited.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.annotation.Retention.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.annotation.Retention.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.annotation.Target.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.annotation.Target.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.Deprecated.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.Deprecated.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.Override.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.Override.class) returns wrong value"); + assertFalse(this.simpleBindingsClass.isAnnotationPresent(java.lang.SuppressWarnings.class), + "Method SimpleBindings.getClass().isAnnotationPresent(java.lang.SuppressWarnings.class) returns wrong value"); + } + + /** + * Test for method javax.script.SimpleBindings.getClass().isAnonymousClass() + */ + protected void testIsAnonymousClass() { + assertFalse(this.simpleBindingsClass.isAnonymousClass(), + "Method SimpleBindings.getClass().isAnonymousClass() returns wrong value"); + } + + /** + * Test for method javax.script.SimpleBindings.getClass().isArray() + */ + protected void testIsArray() { + assertFalse(this.simpleBindingsClass.isArray(), + "Method SimpleBindings.getClass().isArray() returns wrong value"); + } + + /** + * Test for method javax.script.SimpleBindings.getClass().isEnum() + */ + protected void testIsEnum() { + assertFalse(this.simpleBindingsClass.isEnum(), + "Method SimpleBindings.getClass().isEnum() returns wrong value"); + } + + /** * Test for method javax.script.SimpleBindings.getClass().getInterfaces() */ protected void testGetInterfaces() { - List interfaces = Arrays.asList(this.simpleBindingsClass.getInterfaces()); + List> interfaces = Arrays.asList(this.simpleBindingsClass.getInterfaces()); assertTrue(interfaces.contains(Bindings.class), "list of implemented interfaces does not contain Bindings"); } @@ -207,7 +261,7 @@ * Test for method javax.script.SimpleBindings.getClass().getSuperclass() */ protected void testGetSuperclass() { - Class superClass = this.simpleBindingsClass.getSuperclass(); + Class superClass = this.simpleBindingsClass.getSuperclass(); String superClassName = superClass.getName(); assertEquals(superClassName, "java.lang.Object", "Method SimpleBindings.getClass().getSuperclass() returns wrong value " + superClassName); @@ -217,7 +271,7 @@ * Test for method javax.script.SimpleBindings.getClass().getConstructors() */ protected void testGetConstructors() { - Constructor[] constructors = this.simpleBindingsClass.getConstructors(); + Constructor[] constructors = this.simpleBindingsClass.getConstructors(); assertEquals(constructors.length, 2, "only 2 constructors should be set"); String constructorName; String constructorString; @@ -239,7 +293,7 @@ * Test for method javax.script.SimpleBindings.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.simpleBindingsClass.getDeclaredConstructors(); + Constructor[] constructors = this.simpleBindingsClass.getDeclaredConstructors(); assertEquals(constructors.length, 2, "only 2 constructors should be set"); String constructorName; String constructorString; From xranby at icedtea.classpath.org Tue Sep 25 03:54:56 2012 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Tue, 25 Sep 2012 10:54:56 +0000 Subject: /hg/icedtea7: JamVM PR1155: Do not put version number in libjvm.... Message-ID: changeset 1603e47bf631 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=1603e47bf631 author: Xerxes Ranby date: Tue Sep 25 14:34:52 2012 +0200 JamVM PR1155: Do not put version number in libjvm.so SONAME 2012-09-25 Xerxes Ranby JamVM PR1155: Do not put version number in libjvm.so SONAME * NEWS: Updated. * Makefile.am (JAMVM_VERSION): Updated JamVM to 2012-09-25 revision. (JAMVM_SHA256SUM): Updated. diffstat: ChangeLog | 9 +++++++++ Makefile.am | 4 ++-- NEWS | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diffs (42 lines): diff -r b374a4e01497 -r 1603e47bf631 ChangeLog --- a/ChangeLog Wed Sep 19 21:36:08 2012 +0100 +++ b/ChangeLog Tue Sep 25 14:34:52 2012 +0200 @@ -1,3 +1,12 @@ +2012-09-25 Xerxes R??nby + + JamVM + PR1155: Do not put version number in libjvm.so SONAME + * NEWS: Updated. + * Makefile.am + (JAMVM_VERSION): Updated JamVM to 2012-09-25 revision. + (JAMVM_SHA256SUM): Updated. + 2012-09-19 Andrew John Hughes * hotspot.map: diff -r b374a4e01497 -r 1603e47bf631 Makefile.am --- a/Makefile.am Wed Sep 19 21:36:08 2012 +0100 +++ b/Makefile.am Tue Sep 25 14:34:52 2012 +0200 @@ -24,8 +24,8 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -JAMVM_VERSION = e70f2450890b82c37422616cc85e1a23385f03cd -JAMVM_SHA256SUM = 3ca7e297ef4daa56c3dd733e21bce795d57ab071243369aa9400c0384ada8a4c +JAMVM_VERSION = 0972452d441544f7dd29c55d64f1ce3a5db90d82 +JAMVM_SHA256SUM = bfa706402ac934d24f7119eb78f6be65e91439a4b2e49dbcc21e288137808f03 JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz diff -r b374a4e01497 -r 1603e47bf631 NEWS --- a/NEWS Wed Sep 19 21:36:08 2012 +0100 +++ b/NEWS Tue Sep 25 14:34:52 2012 +0200 @@ -11,6 +11,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 2.4 (2012-XX-XX): +* JamVM + - PR1155: Do not put version number in libjvm.so SONAME New in release 2.1.2 (2012-09-02): From xerxes at zafena.se Tue Sep 25 04:15:45 2012 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 25 Sep 2012 13:15:45 +0200 Subject: Status of non-Hotspot VMs and Shark - RFC: backport of JamVM PR1155 to 2.3 release branch. In-Reply-To: References: <1861102037.817861.1348511072683.JavaMail.root@redhat.com> <5060E9C3.4000904@zafena.se> Message-ID: <50619261.70903@zafena.se> 2012-09-25 03:12, Robert Lougher skrev: > On 25 September 2012 00:16, Xerxes R?nby wrote: >> On 09/24/2012 08:24 PM, Andrew Hughes wrote: >>> >>>>> and >>>>> --with-additional-vms=jamvm >>>>> * This --with-additional-vms=jamvm combination require a SONAME >>>>> patch on top of JamVM. >>>>> This jamvm-avoid-version-soname.patch SONAME patch is currently >>>>> only in use by ubuntu. >>>>> >>>>> http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch >>>>> Sent and waiting for review upstream. >>>>> http://sourceforge.net/mailarchive/message.php?msg_id=29763831 >>>>> >>> >>> Why is this patch not in IcedTea or JamVM itself? >> >> >> Robert have not yet responded to the patch sent to the JamVM mailinglist. >> I wanted to first merge it in JamVM upstream before introducing it into >> IcedTea. >> >> > > Patch now pushed to JamVMs repository: > > http://git.berlios.de/cgi-bin/gitweb.cgi?p=jamvm;a=commit;h=0972452d441544f7dd29c55d64f1ce3a5db90d82 > > Thanks, > Rob. > Thank you now pushed to IcedTea 7 to be included in the 2.4 release: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=1603e47bf631 RFC: I would like to commit the attached patch into the IcedTea 7 2.3 release branch. Ok to push? Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea7-2.3-jamvm-pr1155.patch Type: text/x-patch Size: 2076 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120925/b7b1751c/icedtea7-2.3-jamvm-pr1155.patch From gnu.andrew at redhat.com Tue Sep 25 07:55:39 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Tue, 25 Sep 2012 10:55:39 -0400 (EDT) Subject: Status of non-Hotspot VMs and Shark - RFC: backport of JamVM PR1155 to 2.3 release branch. In-Reply-To: <50619261.70903@zafena.se> Message-ID: <1858065832.1404443.1348584939867.JavaMail.root@redhat.com> ----- Original Message ----- > 2012-09-25 03:12, Robert Lougher skrev: > > On 25 September 2012 00:16, Xerxes R?nby wrote: > >> On 09/24/2012 08:24 PM, Andrew Hughes wrote: > >>> > >>>>> and > >>>>> --with-additional-vms=jamvm > >>>>> * This --with-additional-vms=jamvm combination require a SONAME > >>>>> patch on top of JamVM. > >>>>> This jamvm-avoid-version-soname.patch SONAME patch is currently > >>>>> only in use by ubuntu. > >>>>> > >>>>> http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch > >>>>> Sent and waiting for review upstream. > >>>>> http://sourceforge.net/mailarchive/message.php?msg_id=29763831 > >>>>> > >>> > >>> Why is this patch not in IcedTea or JamVM itself? > >> > >> > >> Robert have not yet responded to the patch sent to the JamVM > >> mailinglist. > >> I wanted to first merge it in JamVM upstream before introducing it > >> into > >> IcedTea. > >> > >> > > > > Patch now pushed to JamVMs repository: > > > > http://git.berlios.de/cgi-bin/gitweb.cgi?p=jamvm;a=commit;h=0972452d441544f7dd29c55d64f1ce3a5db90d82 > > > > Thanks, > > Rob. > > > > Thank you now pushed to IcedTea 7 to be included in the 2.4 release: > http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=1603e47bf631 > > RFC: I would like to commit the attached patch into the IcedTea 7 2.3 > release branch. > Ok to push? > > Xerxes > Ok. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From adomurad at redhat.com Tue Sep 25 07:59:23 2012 From: adomurad at redhat.com (Adam Domurad) Date: Tue, 25 Sep 2012 10:59:23 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier Message-ID: <1348585163.17801.24.camel@adomurad-desktop> The original topic email for this is: [RFC][icedtea-web] Major rework of JarCertVerifier. I have picked up review of this and added additional patches on top for review. I will still be creating an additional reproducer that tests the effect of multiple signers per jar for JNLP & HTML-based applications, but wanted to get review on my additional patches. I have ensured there was no regressions in the reproducer suite (I fixed one regression with empty signed jars). I have also ran the manual browser tests. (Note these tests were with all patches applied) Here are the patches, in order that they should be applied, and how to direct reviewing attention. Essentially the JCV rework patch has been more or less validated, and I want the additional patches reviewed before I continue. =========================================================================== 1) jcv-major-rework-02.patch: The most recent version of Danesh's patch, unmodified. I have purposely left this as-was and made additional patches on top of it, because between Omair and I, I consider this patch reviewed. Feel free to point out any additional concerns (but hopefully addressable after we get this in HEAD.) See the original discussion for details + ChangeLog. =========================================================================== =========================================================================== 2) CodeStyle.patch: Modifies newly added code to use interface types instead of concrete types wherever it is applicable. ChangeLog: 2012-09-25 Adam Domurad * netx/net/sourceforge/jnlp/security/AppVerifier.java: Use interface types for declared types where applicable. * netx/net/sourceforge/jnlp/security/PluginAppVerifier.java: Same. * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Same. =========================================================================== =========================================================================== 3) FixForEmptySignedReproducer.patch Fixes a slight problem that prohibited correctly identifying trivially signed jars. ChangeLog: 2012-09-25 Adam Domurad Fixes JCV#isTriviallySigned(). Reproducer 'EmptySignedJar' passes again. * netx/net/sourceforge/jnlp/tools/JarCertVerifier.java: Remove problematic 'triviallySigned' variable and instead determine whether triviallySigned on the fly. Consider jars with 0 signable entries as SIGNED_OK. =========================================================================== =========================================================================== 3) NewMessage.patch: A new message for when a JNLP application is fully signed, but by mismatching signers. (A JNLP application can have multiple signers, but each jar needs a common signer). ChangeLog: 2012-09-25 Adam Domurad New message for signer mismatch in JNLP applications. * netx/net/sourceforge/jnlp/resources/Messages.properties: Added message 'The JNLP application is not fully signed by a single cert.' * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: Message thrown when JNLP's jcv.allJarsSigned() is true but not jcv.isFullySigned(); =========================================================================== =========================================================================== 4) TestForPR822.patch: The existing tests for PR822 weren't really demonstrating the offending behaviour. I have removed their @Bug annotation, and made them expect the new messages added. Also added an HTML test applet to signed2/MultipleSignaturesTest that is fully signed, but by different signers. (In the case of HTML-tag applets, this is allowed.) ChangeLog: 2012-09-25 Adam Domurad Revised multiple signatures test to check for new message. Added more accurate reproducer for PR822. * tests/reproducers/signed2/MultipleSignaturesTest/srcs/somecrazytestpackage/MultipleSignaturesTest.java: Made class take a classname parameter so different out-of-package classes could be executed. * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest.html: Added main-class parameter. * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest1.jnlp: Same. * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest1_requesting.jnlp: Same. * tests/reproducers/signed2/MultipleSignaturesTest/resources/MultipleSignaturesTest2.jnlp: Same. * tests/reproducers/signed2/MultipleSignaturesTest/testcases/MultipleSignaturesTestTests.java (multipleSignaturesTestHtmlAppletUsesPermissions): New, tests if fully signed HTML applets with varied signers can (as they should) execute with full permissions. Reproduces PR822. (multipleSignaturesTestJnlpApplicationRequesting): Check for mismatching signers JNLP failure message. Remove known-to-fail & (incorrect) bug annotation. * tests/reproducers/signed2/MultipleSignaturesTestSamePackage/testcases/MultipleSignaturesTestTestsSamePackage.java (multipleSignaturesTestSamePackageJnlpApplicationRequesting): Check for mismatching signers JNLP failure message. Remove known-to-fail & (incorrect) bug annotation. =========================================================================== -------------- next part -------------- A non-text attachment was scrubbed... Name: jcv-major-rework-02.patch Type: text/x-patch Size: 118979 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120925/c13576b5/jcv-major-rework-02.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: CodeStyle.patch Type: text/x-patch Size: 9623 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120925/c13576b5/CodeStyle.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: FixForEmptySignedReproducer.patch Type: text/x-patch Size: 2659 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120925/c13576b5/FixForEmptySignedReproducer.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: NewMessage.patch Type: text/x-patch Size: 2202 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120925/c13576b5/NewMessage.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: TestforPR822.patch Type: text/x-patch Size: 11286 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120925/c13576b5/TestforPR822.patch From gnu.andrew at redhat.com Tue Sep 25 08:00:04 2012 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Tue, 25 Sep 2012 11:00:04 -0400 (EDT) Subject: Status of non-Hotspot VMs and Shark In-Reply-To: <5060E9C3.4000904@zafena.se> Message-ID: <411634233.1406307.1348585204356.JavaMail.root@redhat.com> ----- Original Message ----- > On 09/24/2012 08:24 PM, Andrew Hughes wrote: > > ----- Original Message ----- > >> Hi Florian, > >> > >> Mostly in complete agreement with Xerxes here, > >> > >> On 24/09/12 10:03 AM, Xerxes R?nby wrote: > >>> 2012-09-23 11:05, Florian Weimer skrev: > >>>> What's the status of Shark, JamVM and Cocoa for OpenJDK 6 and 7? > >>>> Are > >>>> they officially released/supported? What about the zero port? > >>>> > >>>> I'm wondering which of these VMs should be part of the upcoming > >>>> Debian > >>>> stable release. > >>>> > >>> ### Zero > >>> Zero is actively maintained and all around stable. > >>> Zero includes an assembler optimized interpreter for ARM and a > >>> thumb2 jit for armv7. > >>> Zero + OpenJDK 6 Icedtea 1.11.4 = OK > >>> Zero + OpenJDK 7 Icedtea 2.3.2 = OK > >> At least as far as I know the asm jit for arm is not yet working > >> in > >> 2.3 > >> will be fixed after I get last bits of jsr 292 for zero pasted > >> back > >> together. > > We default to use the 2.1 hotspot branch when zero is enabled in > order to > workaround this issue for the 2.3.2 release. see below: > > >>> tested configure flags: > >>> --enable-zero > >>> and > >>> --with-additional-vms=zero > > > > As far as I'm aware, the ARM port is only present in the 2.1 > > branch. This needs rectifying. > > No rectifying needed because we actually build the IcedTea 7 2.1 > hotspot branch for all > Zero builds of the IcedTea7 2.3.2 release! > Yes, that's a temporary measure. We don't want to be maintaining 2.1 forever. The port should be available on HEAD, so it makes it to new branches. http://blog.fuseyism.com/index.php/2012/07/26/the-return-of-zero-sort-of/ > examination: > http://icedtea.classpath.org/hg/release/icedtea7-2.3/file/e7117fcb33ed/acinclude.m4#l924 > Here we run a check for zero builds and if found then switches the > default hotspot. > line source of acinclude.m4 > 926 AC_REQUIRE([IT_ENABLE_ZERO_BUILD]) > 927 if test "x${use_zero}" = "xyes"; then > 928 DEFAULT_BUILD="zero" > 929 else > 930 DEFAULT_BUILD="default" > 931 fi > > http://icedtea.classpath.org/hg/release/icedtea7-2.3/file/e7117fcb33ed/hotspot.map > Here we define the location for the zero hotspot src repository, > note that zero builds use the icedtea7-forest-2.1/hotspot that do > include the ARM port! > line source of hotspot.map > 1 # version url changeset sha256sum > 2 default > http://icedtea.classpath.org/hg/release/icedtea7-forest-2.3/hotspot > ea39d76b3bde > 25733b44590c950adc42a2e9c366b8a3992803c06dedcc16d2bf0d50fed54844 > 3 zero > http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot > 47a867dd3005 > 9f9c2fb9eea9cc2e2d44f23d46615522b09ad0b5dbce2e448458a44e05161e3e > > Verification: > If your Zero VM version ends with "mixed mode" on ARM then it do > contain the assembler > optimizations and the Thumb2 JIT. > > xranby at ac100-armel:~$ java -version > java version "1.7.0_07" > OpenJDK Runtime Environment (IcedTea7 2.3.2) > (7u7-2.3.2a-0ubuntu0.12.04.1) > OpenJDK Zero VM (build 22.0-b10, mixed mode) > > Yes, the ARM assembler optimized interpreter and Thumb2 JIT is > included in 2.3.2 release! > > > > > The supported way of building is with --enable-zero. > > > >>> > >>> ### Shark > >>> Shark (zero+shark) is unmaintained and considered broken. > >>> Do not package. > >> > >> Long term goal but dead at the moment. > >>> > >>> ### JamVM > >>> JamVM is actively maintained and all around stable. > >>> JamVM + OpenJDK 6 Icedtea 1.11.4 = OK, a more stable upstream > >>> release exist to be released with 1.12. > >>> use this patch > >>> http://icedtea.classpath.org/hg/icedtea6/rev/fb1137cef484 > >>> to use the latest JamVM in combination with IcedTea6 1.11.x > >>> before > >>> the next IcedTea 6 1.12 hits the streets. > >>> > >>> JamVM + OpenJDK 7 Icedtea 2.3.2 = OK > >>> tested configure flags: > >>> --enable-jamvm > > > > --enable-jamvm is the support way of building. > > > > Is the same JamVM used by 6, 7 & 8? > Yes same source, JamVM got a configure flag > --with-java-runtime-library=openjdk6 > and > --with-java-runtime-library=openjdk7 > to handle the recent shared char buffer String change that got > introduced > with the IcedTea 2.3 release. > > > > >>> and > >>> --with-additional-vms=jamvm > >>> * This --with-additional-vms=jamvm combination require a SONAME > >>> patch on top of JamVM. > >>> This jamvm-avoid-version-soname.patch SONAME patch is currently > >>> only in use by ubuntu. > >>> http://bazaar.launchpad.net/~ubuntu-branches/ubuntu/quantal/openjdk-7/quantal/revision/30#debian/patches/jamvm-avoid-version-soname.patch > >>> Sent and waiting for review upstream. > >>> http://sourceforge.net/mailarchive/message.php?msg_id=29763831 > >>> > > > > Why is this patch not in IcedTea or JamVM itself? > > Robert have not yet responded to the patch sent to the JamVM > mailinglist. > I wanted to first merge it in JamVM upstream before introducing it > into IcedTea. > > > > >>> ### CACAO > >>> Cacao is actively maintained and stable in combination with > >>> OpenJDK > >>> 6. > >>> Cacao + OpenJDK 6 Icedtea 1.11.4 = OK > >>> --enable-cacao > >>> and > >>> --with-additional-vms=cacao > > > > Again, --enable-cacao is the supported way of building. > > > >>> There is a new upstream cacao 1.6.0 release that should be merged > >>> and used by IcedTea6. > >>> http://www.cacaojvm.org/ > >>> > > > > Is anyone working on this? > > > >>> Cacao + OpenJDK 7 Icedtea 2.3.2 = unstable > >>> The CACAO OpenJDK 7 port is immature, it can run HelloWorld and > >>> some numerical simple benchmarks > >>> but refuses to run real world applications that access file IO. > >>> Do not package. > >>> > > > > Ok, should this also be upgraded to 1.6? Are there CACAO bugs for > > these issues? > > > >>> ### Avian > >>> Avian is actively maintained and rapidly approaching stable. > >>> Avian + OpenJDK 7 IcedTea 2.3.2 = OK > >>> Avian is preferably built separately from src after the main > >>> OpenJDK 7 build. > >>> Avian is packaged in Ubuntu 12.10 and show great performance on > >>> embeded devices. > >>> Latest deb source and merge request: > >>> https://code.launchpad.net/~xranby/ubuntu/quantal/avian/avian_0.6+20120924/+merge/126005 > >>> http://oss.readytalk.com/avian/ > >>> > > > > This is the first I've heard of this. Any reason support wasn't > > added to IcedTea? > > > Avian is preparing their 1.0 release that will be the first release > with OpenJDK 7 support. > By keeping it outside IcedTea enable distributions that package Avian > to have a rapid > release cycle during its stabilization process. > I plan to introduce Avian into IcedTea when it have reached 1.0 and > is found to be self > hosting. > > >>> Cheers > >>> Xerxes > >> Thanks Xerxes! > >> > >> Cheers! > >> Chris > >> PS > >> The definition of support I am using here is > >> "mostly working will try to fix bugs on best effort basis". > >> > >> -- > >> -- > >> -- Woda: "Java: write once, debug anywhere" Hong Zhang > >> http://thehenrys.ca > >> | Chris Phillips @ T.O. Red Hat OpenJDK JVM Engineer, > >> | | > >> | mailto:ChrisPhi at RedHat.Com (416)483-3768 > >> | | > >> | http://LGonQn.Org/www/Chris.Phillips cell: (416)505-3610 > >> | | > >> "EPIC stands for Expects Perfectly Intuitive Compilers" P. > >> Bannon > >> http://www.hazmatmodine.com > >> NOTICE: > >> This email message is for the sole use of the intended > >> recipient(s) > >> and may contain confidential and privileged information. Any > >> unauthorized review, use, disclosure or distribution is > >> prohibited. > >> If you are not the intended recipient, please contact the > >> sender by > >> reply email and destroy all copies of the original message. > >> "blah blah blah - Ginger!" > >> -- > >> -- > >> > >> > > > > Cheers, > > > > Cheers! > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From andrew at icedtea.classpath.org Tue Sep 25 09:22:29 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 25 Sep 2012 16:22:29 +0000 Subject: /hg/icedtea6: 10 new changesets Message-ID: changeset dc9ce5c9dbc1 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=dc9ce5c9dbc1 author: Andrew John Hughes date: Wed May 16 13:01:42 2012 +0100 Move hg tree to b26, ready for next release. 2012-05-16 Andrew John Hughes * Makefile.am: (OPENJDK_VERSION): Move to b26, ready for next release. changeset 244fd5d980de in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=244fd5d980de author: Andrew John Hughes date: Wed Jun 06 18:00:06 2012 +0100 Remove 6610244; patch upstreamed. 2012-06-06 Andrew John Hughes * patches/openjdk/6610244-modal-fatal-error-windows.patch: Removed. * Makefile.am, Remove upstreamed patch. changeset ac9d382dab4e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ac9d382dab4e author: Andrew John Hughes date: Mon Jun 11 17:49:58 2012 +0100 Drop upstreamed patches. Regenerate 6633275 patch due to copyright change by Oracle. 2012-06-11 Andrew John Hughes * patches/openjdk/7103224-glibc_name_collision.patch, * patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch, * patches/support_linux_3.patch: Drop upstreamed patches. * Makefile.am: (ICEDTEA_PATCHES): Removed above patches. * patches/openjdk/6633275-shaped_translucent_windows.patch: Regenerated due to copyright header change by Oracle. changeset 7a3b429bf4d5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7a3b429bf4d5 author: Andrew John Hughes date: Wed Jun 13 17:33:16 2012 +0100 Merge changeset f9a4a97fd49a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f9a4a97fd49a author: Andrew John Hughes date: Wed Jun 13 21:11:11 2012 +0100 Sync with upstream security patches and upstreaming of mimpure-text patch. 2012-06-13 Andrew John Hughes * patches/openjdk/remove-mimpure-option-to-gcc.patch: Dropped; upstreamed. * patches/security/20120612/7079902.patch, * patches/security/20120612/7110720.patch, * patches/security/20120612/7143606.patch, * patches/security/20120612/7143614.patch, * patches/security/20120612/7143617.patch, * patches/security/20120612/7143851.patch, * patches/security/20120612/7143872.patch, * patches/security/20120612/7145239.patch, * patches/security/20120612/7152811.patch, * patches/security/20120612/7157609.patch, * patches/security/20120612/7160677.patch, * patches/security/20120612/7160757.patch: Dropped; provided by Oracle upstream. * Makefile.am: (JAXP_DROP_ZIP): Update to security fixed version. (JAXP_DROP_SHA256SUM): Likewise. (SECURITY_PATCHES): Drop; upstream. (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. * patches/ecj/override.patch: Regenerate against Oracle version of security patches. changeset 004393c6afb9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=004393c6afb9 author: Andrew John Hughes date: Mon Sep 10 17:48:15 2012 +0100 Merge changeset 7f9b1d08b2c5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7f9b1d08b2c5 author: Andrew John Hughes date: Mon Sep 10 17:48:48 2012 +0100 Merge changeset 8ad13dc5ad87 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8ad13dc5ad87 author: Andrew John Hughes date: Wed Sep 19 17:06:14 2012 +0100 Work with latest upstream, post security fixes. 2012-09-19 Andrew John Hughes * patches/openjdk/7185678-xmenuitem_peer_npe.patch, * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: Removed; upstream. * Makefile.am: (SECURITY_PATCHES): Drop patches available upstream. (ICEDTEA_PATCHES): Likewise. * patches/merge_fix.patch, * patches/nomotif-6706121.patch, * patches/openjdk/6633275-shaped_translucent_windows.patch, * patches/openjdk/6797195-hw_lw_mixing.patch: Regenerated against upstream. changeset 99dd5321a045 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=99dd5321a045 author: Andrew John Hughes date: Mon Sep 24 20:32:40 2012 +0100 Merge in icedtea6-hg for b26 changeset 8bfbcf3a5d93 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=8bfbcf3a5d93 author: Andrew John Hughes date: Tue Sep 25 17:22:04 2012 +0100 Update to b26 tarball. Include new changes in b25 & b26 in NEWS. 2012-09-25 Andrew John Hughes * Makefile.am: (OPENJDK_DATE): Updated to that of b26 tarball. (OPENJDK_SHA256SUM): Likewise. * NEWS: Add updates in b25 & b26 not already present in previous releases. diffstat: ChangeLog | 385 + Makefile.am | 276 +- NEWS | 109 +- README | 2 +- acinclude.m4 | 64 + configure.ac | 8 +- overlays/openjdk/hotspot/test/serviceability/SDTProbesGNULinuxTest.sh | 68 + patches/ecj/7010849-make_sa-jdi_build_with_1.5.patch | 394 + patches/ecj/corba-dependencies.patch | 17 + patches/ecj/hotspot-jdk-dependency.patch | 25 + patches/ecj/hotspot.patch | 14 - patches/ecj/icedtea.patch | 7 +- patches/ecj/jaxws-jdk-dependency.patch | 47 + patches/ecj/jaxws-langtools-dependency.patch | 48 + patches/ecj/override.patch | 95 +- patches/gcc-suffix.patch | 116 +- patches/libraries.patch | 2589 +++++---- patches/merge_fix.patch | 280 + patches/nomotif-6706121.patch | 657 +-- patches/nss-config.patch | 4 +- patches/nss-not-enabled-config.patch | 4 +- patches/openjdk/6610244-modal-fatal-error-windows.patch | 125 - patches/openjdk/6633275-shaped_translucent_windows.patch | 421 +- patches/openjdk/6693253-security_warning.patch | 331 +- patches/openjdk/6797195-hw_lw_mixing.patch | 133 +- patches/openjdk/7034464-hugepage.patch | 458 - patches/openjdk/7034464-transparent_huge_pages.patch | 458 + patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch | 71 + patches/openjdk/7037939-hugepage.patch | 71 - patches/openjdk/7103224-glibc_name_collision.patch | 236 - patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch | 12 - patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch | 1511 +++++ patches/openjdk/remove-mimpure-option-to-gcc.patch | 162 - patches/sdt-arguments.patch | 24 + patches/sdt-dtrace-hpp.patch | 103 + patches/sdt-jni.patch | 37 + patches/sdt-make.patch | 51 + patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch | 519 ++ patches/support_linux_3.patch | 19 - patches/systemtap.patch | 162 - patches/version-hotspot.patch | 24 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java | 6 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java | 2 + pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java | 8 +- pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java | 3 + pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c | 21 +- pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java | 13 + tapset/jstack.stp.in | 34 +- test/tapset/jstaptest.pl | 62 +- 49 files changed, 6536 insertions(+), 3750 deletions(-) diffs (truncated from 13683 to 500 lines): diff -r aaefc2cbbc10 -r 8bfbcf3a5d93 ChangeLog --- a/ChangeLog Wed May 16 12:59:46 2012 +0100 +++ b/ChangeLog Tue Sep 25 17:22:04 2012 +0100 @@ -1,3 +1,388 @@ +2012-09-25 Andrew John Hughes + + * Makefile.am: + (OPENJDK_DATE): Updated to that of b26 tarball. + (OPENJDK_SHA256SUM): Likewise. + * NEWS: + Add updates in b25 & b26 not already present + in previous releases. + +2012-09-20 Andrew John Hughes + + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): + Remove com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel. + +2012-09-19 Andrew John Hughes + + * patches/openjdk/7185678-xmenuitem_peer_npe.patch, + * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, + * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: + Removed; upstream. + * Makefile.am: + (SECURITY_PATCHES): Drop patches available upstream. + (ICEDTEA_PATCHES): Likewise. + * patches/merge_fix.patch, + * patches/nomotif-6706121.patch, + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Regenerated against upstream. + +2012-09-19 Andrew John Hughes + + PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) + are actually missing from the boot JDK + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): Only include + javax.swing.plaf.basic.BasicDirectoryModel if + PR42003 is present in the boot JDK. + * NEWS: List PR1119. Correct previous use of + PR1119 which should be PR1121. + * acinclude.m4: + (IT_FIND_JAVAC): Add missing requirement of + IT_CHECK_FOR_JDK. + (IT_FIND_JAVA): Likewise. + (IT_FIND_JAVAH): Likewise. + (IT_FIND_JAR): Likewise. + (IT_FIND_RMIC): Likewise. + (IT_FIND_NATIVE2ASCII): Likewise. + (IT_CHECK_FOR_METHOD): New macro to check + for a method both at build-time and run-time. + * configure.ac: Call IT_CHECK_FOR_METHOD + for javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener. + +2012-09-03 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash after + patches/openjdk/7034464-transparent_huge_pages.patch. + +2012-09-03 Andrew John Hughes + + * NEWS: Add 1.10.9 & 1.11.4. + +2012-08-31 Andrew John Hughes + + * Makefile.am: + (JAXP_DROP_ZIP): Update to security fixed version. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop; upstream. + (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. + * patches/ecj/override.patch: Regenerate + against Oracle version of security patches. + +2012-08-31 Andrew John Hughes + + (ICEDTEA_PATCHES): Rename patches. + * patches/openjdk/7034464-hugepage.patch: + Renamed to... + * patches/openjdk/7034464-transparent_huge_pages.patch: + this. + * patches/openjdk/7037939-hugepage.patch: + Renamed to... + * patches/openjdk/7037939-disable_adaptive_resizing_with_large_pages.patch + this. + +2012-08-31 Andrew John Hughes + + * Makefile.am: + (SECURITY_PATCHES): Add 7162476, 7163201 & 7182135. + (ICEDTEA_PATCHES): Add 7185678. + * patches/merge_fix.patch: Patch to fix merge issues + between new security fixes and previous backports. + * patches/gcc-suffix.patch, + * patches/libraries.patch, + * patches/version-hotspot.patch: + Regenerate to remove fuzz. + * patches/nomotif-6706121.patch, + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6693253-security_warning.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Regenerated post-security patches. + * patches/openjdk/7185678-xmenuitem_peer_npe.patch, + * patches/security/20120830/7162476-xmldecoder_via_classfinder.patch, + * patches/security/20120830/7163201-simplify_toolkit_internal_references.patch: + New patches from 6u35/7u7 security release. + * patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch: + Regression fix for 7162476. + +2012-08-20 Xerxes R??nby + Robert Lougher + + JamVM: Sync with IcedTea7 + * Makefile.am + (JAMVM_VERSION): Updated JamVM to 2012-08-15 revision. + (JAMVM_SHA256SUM): Updated. + (stamps/jamvm.stamp): Use --with-java-runtime-library=openjdk6 + +2012-08-17 Pavel Tisnovsky + + * patches/ecj/hotspot.patch: + Make this patch file compatible with patch tool 2.5.4 + +2012-08-16 Mark Wielaard + + * Makefile.am (add-zero.stamp): Setup drops directory by symlinking. + (add-zero-debug.stamp): Likewise. + +2012-08-16 Mark Wielaard + + * Makefile.am (stamps/add-nss.stamp): Only try patching the + security files if they actually exist. + +2012-08-16 Andrew John Hughes + + PR1121: Old installs still suffer from GCC PR41686 + * Makefile.am: + (ICEDTEA_BOOTSTRAP_CLASSES): + Add javax.security.auth.kerberos.KerberosTicket + * NEWS: Updated. + +2012-08-15 Andrew John Hughes + + PR1117: IcedTea6 prebuilds far too many classes on bootstrap + * patches/ecj/hotspot.patch: + Removed; replaced by hotspot-jdk-dependency + We don't need to add rt.jar on the classpath + as well as the bootclasspath. + * Makefile.am: + (ICEDTEA_BOOTSTRAP_DIRS): Removed. + (ICEDTEA_BOOTSTRAP_CLASSES): Extend with new + cases found through building without + ICEDTEA_BOOTSTRAP_DIRS. + (ICEDTEA_ECJ_PATCHES): Add new patches, remove + hotspot.patch. + (rt-source-files.txt): Remove use of + ICEDTEA_BOOTSTRAP_CLASSES. + * NEWS: Updated. + * patches/ecj/7010849-make_sa-jdi_build_with_1.5.patch: + Backport from OpenJDK7. Allows the serviceability + agent to be compiled with 1.5. Added to bootstrap + only to reduce potential issues with the API change. + * patches/ecj/corba-dependencies.patch: + Point the CORBA build at the JDK sources as it + requires sun.tools.java. + * patches/ecj/hotspot-jdk-dependency.patch: + Point the HotSpot build at the JDK sources as it + requires com.sun.jdi for the serviceability agent. + Building com.sun.jdi requires 1.5+ source code and + thus 7010849 is necessary. + * patches/ecj/icedtea.patch: + Extend CORBA Defs-java changes so that it uses the + just-built langtools instead of the boot jdk's + tools.jar. + * patches/ecj/jaxws-jdk-dependency.patch: + Point the JAXWS build at the JDK sources as it + depends on com.sun.net.httpserver. + * patches/ecj/jaxws-langtools-dependency.patch: + Point the JAXWS build at the full langtools + distribution, rather than just javac/javah/javadoc + as it requires com.sun.mirror. + +2012-08-15 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Remove systemtap.patch, add + individual sdt-*.patches. + * patches/systemtap.patch: Removed. + * patches/sdt-arguments.patch: Added. + * patches/sdt-dtrace-hpp.patch: Added. + * patches/sdt-jni.patch: Added. + * patches/sdt-make.patch: Added. + * overlays/openjdk/hotspot/test/serviceability/SDTProbesGNULinuxTest.sh: + New testcase. + +2012-08-14 Andrew John Hughes + + PR1113: Include tapset tests in distribution. + * Makefile.am: + (TAPSET_TEST_SRCS): Like tapset test sources. + (EXTRA_DIST): Add TAPSET_TEST_SRCS. + * NEWS: Updated. + +2012-08-14 Andrew John Hughes + + * Makefile.am: + (clean-add-nss): Only move java.security.old + if it exists. + (clean-add-nss-debug): Likewise. + (clean-add-nss-ecj): Likewise. + +2012-08-13 Xerxes R??nby + + JamVM + - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) + - PPC: Don't use lwsync if it isn't supported + - X86: Generate machine-dependent stubs for i386 + - When suspending, ignore detached threads that have died, this prevents + a user caused deadlock when an external thread has been attached to the + VM via JNI and it has exited without detaching + - Add missing REF_TO_OBJs for references passed from JNI, + this enable JamVM to run Qt-Jambi + * NEWS: Updated. + * Makefile.am + (JAMVM_VERSION): Updated JamVM to 2012-07-25 revision. + (JAMVM_SHA256SUM): Updated. + +2012-08-10 Stefan Ring + + * README: Fix CACAO URL. + +2012-08-06 Mark Wielaard + + * test/tapset/jstaptest.pl (probestrings): Expect non-zero value + for hotspot.jni.NewObjectA.return. + +2012-08-03 Mark Wielaard + + * Makefile.am (check-tapset-probes): New target. + (check-tapset-jstack): Likewise. + (check-tapset): Depend on check-tapset-probes check-tapset-jstack. + * test/tapset/jstaptest.pl (process_args): Add -p [$run_test_probes] + and -j [$run_test_jstack]. + (test_jstack): Takes argument to pass to java process. + Pass -XX:+UseCompressedOops and/or -Xmx5G. + +2012-08-03 Yasumasa Suenaga + + * tapset/jstack.stp.in (NarrowOopStruct): New global. + (hotspot.vm_init_end): Initialize NarrowOopStruct. + (hotspot.vm_shutdown): Delete NarrowOopStruct for pid. + (jstack_call): Use NarrowOopStruct to calculate methodOopKlass. + +2012-08-09 Stefan Ring + + * Makefile.am: copy entire CACAO directory, including .hg + +2012-08-09 Andrew John Hughes + + Apply NSS changes to java.security after + build. + * Makefile.am: + (ICEDTEA_PATCHES): Don't add NSS config patches. + (NSS_PATCHES): Add here instead. + (add-nss): Apply NSS_PATCHES. + (clean-add-nss): Revert java.security. + (add-nss-debug): Apply NSS_PATCHES to debug build. + (clean-add-nss-debug): Revert java.security for debug build. + (add-nss-ecj): Apply NSS_PATCHES to bootstrap build. + (clean-add-nss-ecj): Revert java.security for bootstrap build. + +2012-08-08 Andrew John Hughes + + * Makefile.am: Add new patch. + * patches/openjdk/p11cipher-6414899-p11digest_should_support_cloning.patch: + Backport of OpenJDK patch to make + com.oracle.security.ucrypto.TestDigest test + work on NSS. + +2012-06-28 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioClip.java + (getMicrosecondLength, getMicrosecondPosition) + (setMicrosecondPosition): Use correct factor to convert seconds to + microseconds. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + (getMicrosecondPosition): Likewise. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioPlaybackLine.java: + Define SECONDS_TO_MICROSECONDS. + +2012-06-28 Omair Majid + + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java + (write): Synchronize access to writeInterrupted flag. + +2012-06-28 Omair Majid + + PR1050: Stream objects not garbage collected + * NEWS: Update with fix. + * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/Stream.java: + Add new member variable contextPointer. + * pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1new): + Save j_context as contextPointer. + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1unref): + Delete the global ref and dellocate the java context. + (cork_callback): Don't check userdata. It is NULL. + (Java_org_classpath_icedtea_pulseaudio_Stream_native_1pa_1stream_1cork): + Dont allocate and pass a java_context to pa_stream_cork. It is not needed. + * pulseaudio/unittests/org/classpath/icedtea/pulseaudio/PulseAudioClipTest.java + (testOpenCloseLotsOfTimes): New method. + +2012-06-26 Omair Majid + + * test/tapset/jstaptest.pl (get_arch_dir): Fix dir for x86. + +2012-06-13 Andrew John Hughes + + * patches/openjdk/remove-mimpure-option-to-gcc.patch: + Dropped; upstreamed. + * patches/security/20120612/7079902.patch, + * patches/security/20120612/7110720.patch, + * patches/security/20120612/7143606.patch, + * patches/security/20120612/7143614.patch, + * patches/security/20120612/7143617.patch, + * patches/security/20120612/7143851.patch, + * patches/security/20120612/7143872.patch, + * patches/security/20120612/7145239.patch, + * patches/security/20120612/7152811.patch, + * patches/security/20120612/7157609.patch, + * patches/security/20120612/7160677.patch, + * patches/security/20120612/7160757.patch: + Dropped; provided by Oracle upstream. + * Makefile.am: + (JAXP_DROP_ZIP): Update to security fixed version. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop; upstream. + (ICEDTEA_PATCHES): Drop mimpure-text patch; upstream. + * patches/ecj/override.patch: Regenerate + against Oracle version of security patches. + +2012-06-07 Andrew John Hughes + + * Makefile.am, + * patches/ecj/override.patch: + Add additional cases from 7143872. + * patches/security/20120612/7079902.patch, + * patches/security/20120612/7110720.patch, + * patches/security/20120612/7143606.patch, + * patches/security/20120612/7143614.patch, + * patches/security/20120612/7143617.patch, + * patches/security/20120612/7143851.patch, + * patches/security/20120612/7143872.patch, + * patches/security/20120612/7145239.patch, + * patches/security/20120612/7152811.patch, + * patches/security/20120612/7157609.patch, + * patches/security/20120612/7160677.patch, + * patches/security/20120612/7160757.patch: + Security patches for 2012/06/12. + +2012-06-12 Andrew John Hughes + + * NEWS: Add 1.10.8 & 1.11.3 releases. + +2012-06-11 Andrew John Hughes + + * patches/openjdk/7103224-glibc_name_collision.patch, + * patches/openjdk/7140882-dont-return-booleans-from-methods-returning-pointers.patch, + * patches/support_linux_3.patch: + Drop upstreamed patches. + * Makefile.am: + (ICEDTEA_PATCHES): Removed above patches. + * patches/openjdk/6633275-shaped_translucent_windows.patch: + Regenerated due to copyright header change by Oracle. + +2012-06-06 Andrew John Hughes + + * patches/openjdk/6610244-modal-fatal-error-windows.patch: + Removed. + * Makefile.am, + Remove upstreamed patch. + +2012-05-16 Andrew John Hughes + + * Makefile.am: + (OPENJDK_VERSION): Move to b26, ready + for next release. + 2012-05-16 Andrew John Hughes Move to released b25. diff -r aaefc2cbbc10 -r 8bfbcf3a5d93 Makefile.am --- a/Makefile.am Wed May 16 12:59:46 2012 +0100 +++ b/Makefile.am Tue Sep 25 17:22:04 2012 +0100 @@ -1,8 +1,8 @@ # Dependencies -OPENJDK_DATE = 01_may_2012 -OPENJDK_SHA256SUM = 42db988b436593017e29d6543ac09168a901027817e41dc1be5c795b85d53b05 -OPENJDK_VERSION = b25 +OPENJDK_DATE = 21_sep_2012 +OPENJDK_SHA256SUM = 9635d8563b9ba811f1d6e333861f235a2d8835c623451abc44791891d40d8b09 +OPENJDK_VERSION = b26 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/ CACAO_VERSION = cff92704c4e0 @@ -11,8 +11,8 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -JAMVM_VERSION = 4617da717ecb05654ea5bb9572338061106a414d -JAMVM_SHA256SUM = 47fce7bd556c1b1d29a93b8c45497e0d872b48b7f535066b303336f29d0f0d8d +JAMVM_VERSION = e70f2450890b82c37422616cc85e1a23385f03cd +JAMVM_SHA256SUM = 3ca7e297ef4daa56c3dd733e21bce795d57ab071243369aa9400c0384ada8a4c JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz @@ -24,8 +24,8 @@ JAF_DROP_ZIP = jdk6-jaf-b20.zip JAF_DROP_SHA256SUM = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012 JAXP_DROP_URL = http://icedtea.classpath.org/download/drops -JAXP_DROP_ZIP = jaxp144_03.zip -JAXP_DROP_SHA256SUM = c1a5348e17b330a7e4b18431e61a40efd2ba99a7da71102cf2c604478ef96012 +JAXP_DROP_ZIP = jaxp144_04.zip +JAXP_DROP_SHA256SUM = 490f696218c1fed9cb180680af883fe309b414fec232e9cec19645e12ad0b43c OPENJDK_HG_URL = http://hg.openjdk.java.net/jdk6/jdk6 HOTSPOT_SRC_ZIP = hotspot.tar.gz @@ -62,31 +62,23 @@ SOURCEPATH_DIRS = $(abs_top_srcdir)/generated:$(OPENJDK_SOURCEPATH_DIRS) # Sources used from OpenJDK. -ICEDTEA_BOOTSTRAP_DIRS = \ - $(SHARE)/com/sun/jdi \ - $(SHARE)/com/sun/net/httpserver \ - $(SHARE)/com/sun/tools/jdi \ - $(SHARE)/java/io \ - $(SHARE)/java/security/cert \ - $(SHARE)/java/util \ - $(SHARE)/java/rmi \ - $(SHARE)/sun/awt/ \ - $(SHARE)/sun/nio/cs \ - $(SHARE)/sun/rmi/rmic \ - $(SHARE)/sun/tools/java \ - $(SHARE)/javax/net/ssl \ - $(SHARE)/javax/script \ - $(SHARE)/javax/security/auth/kerberos \ - $(SHARE)/javax/security/sasl \ - $(LANGTOOLS)/com/sun/mirror \ - $(LANGTOOLS)/com/sun/tools/apt # PR42003 - javax.swing.plaf.basic.BasicDirectoryModel # PR43389 - javax.management.StandardMBean +# PR54274 - sun.security.other requires missing X509CRLSelector methods +# PR54275 - sun.security.sasl requires missing Sasl.CREDENTIALS field ICEDTEA_BOOTSTRAP_CLASSES = \ - $(SHARE)/javax/swing/plaf/basic/BasicDirectoryModel.java \ $(SHARE)/javax/management/StandardMBean.java \ - $(SHARE)/com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java + $(SHARE)/java/security/cert/X509CRLSelector.java \ + $(SHARE)/java/security/cert/X509CertSelector.java \ + $(SHARE)/javax/security/sasl/Sasl.java \ + $(SHARE)/javax/security/auth/kerberos/KerberosTicket.java + +#PR42003 - Missing javax.swing.plaf.basic.BasicDirectoryModel methods cause OpenJDK build failure +if LACKS_JAVAX_SWING_PLAF_BASIC_BASICDIRECTORYMODEL_ADDPROPERTYCHANGELISTENER +ICEDTEA_BOOTSTRAP_CLASSES += \ + $(SHARE)/javax/swing/plaf/basic/BasicDirectoryModel.java +endif # Flags MEMORY_LIMIT = -J-Xmx1024m @@ -188,18 +180,30 @@ # Relative path to JTreg tool JTREG_DIR = src/jtreg JTREG_SRCS = $(top_srcdir)/$(JTREG_DIR) +TAPSET_TEST_SRCS = \ + $(top_srcdir)/test/tapset/ClassUnloadedProbeTester.java \ + $(top_srcdir)/test/tapset/JNIStapTest.c \ + $(top_srcdir)/test/tapset/JNITestClass.c \ + $(top_srcdir)/test/tapset/JNITestClass.h \ + $(top_srcdir)/test/tapset/JNITestClass.java \ + $(top_srcdir)/test/tapset/jstaptest.pl \ + $(top_srcdir)/test/tapset/RunWrapper.java \ + $(top_srcdir)/test/tapset/StapJNIClassLoader.java \ + $(top_srcdir)/test/tapset/StapURLClassLoader.java \ + $(top_srcdir)/test/tapset/SystemtapTester.java \ + $(top_srcdir)/test/tapset/TestingRunner.java # Patch list ICEDTEA_FSG_PATCHES = -SECURITY_PATCHES = +SECURITY_PATCHES = \ + patches/security/20120830/7182135-impossible_to_use_some_editors_directly.patch SPECIAL_SECURITY_PATCH = patches/security/20120214/7112642.patch From jvanek at icedtea.classpath.org Tue Sep 25 09:59:51 2012 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Tue, 25 Sep 2012 16:59:51 +0000 Subject: /hg/icedtea-web: Added rules listeners Message-ID: changeset 077a48d226c4 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=077a48d226c4 author: Jiri Vanek date: Tue Sep 25 19:04:30 2012 +0200 Added rules listeners diffstat: ChangeLog | 22 +- tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java | 39 +- tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java | 51 +- tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java | 60 ++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java | 46 + tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java | 235 ++++++++++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java | 57 ++ 7 files changed, 475 insertions(+), 35 deletions(-) diffs (truncated from 642 to 500 lines): diff -r 17900f4ca4a6 -r 077a48d226c4 ChangeLog --- a/ChangeLog Mon Sep 24 17:05:41 2012 +0200 +++ b/ChangeLog Tue Sep 25 19:04:30 2012 +0200 @@ -1,13 +1,31 @@ +2012-09-25 Jiri Vanek + + Added rules listeners + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java: + Base class for closing listeners which is containing complete output in + each time. + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java: + Class with rule definition for RulesFolowingClosingListener + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java: + ClosingListener consisted from rules which all have to match for close action + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringRule.java: + Implementation of rule based on string + * tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java: + * tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java: + Refactored to use Above iisteners. + + 2012-09-24 Jiri Vanek + Added basic closing listener implementation * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned.html: removed unnecessary XslowX * tests/reproducers/signed/AppletTestSigned/resources/AppletTestSigned2.html: - aded missing XslowX + added missing XslowX * tests/reproducers/signed/AppletTestSigned/srcs/AppletTestSigned.java: added standard closing sentence * tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java: - used auto*clsoing listeners + used auto*closing listeners * tests/test-extensions/net/sourceforge/jnlp/ClosingListener.java: interface for identifying closing listeners * tests/test-extensions/net/sourceforge/jnlp/ProcessAssasin.java: diff -r 17900f4ca4a6 -r 077a48d226c4 tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java --- a/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Mon Sep 24 17:05:41 2012 +0200 +++ b/tests/reproducers/signed/AppletTestSigned/testcases/AppletTestSignedTests.java Tue Sep 25 19:04:30 2012 +0200 @@ -43,6 +43,9 @@ import net.sourceforge.jnlp.browsertesting.BrowserTest; import net.sourceforge.jnlp.browsertesting.Browsers; import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.closinglisteners.Rule; +import net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener; +import static net.sourceforge.jnlp.closinglisteners.RulesFolowingClosingListener.*; import org.junit.Assert; import org.junit.Test; @@ -50,8 +53,22 @@ public class AppletTestSignedTests extends BrowserTest { private final List l = Collections.unmodifiableList(Arrays.asList(new String[]{"-Xtrustall"})); + private static final String ss = "xception"; + private static final String s0 = "AppletTestSigned was started"; + private static final String s1 = "value1"; + private static final String s2 = "value2"; + private static final String s3 = "AppletTestSigned was initialised"; + private static final String s7 = "AppletTestSigned killing himself after 2000 ms of life"; + private static final ContainsRule exceptionRule = new ContainsRule(ss); + private static final ContainsRule startedRule = new ContainsRule(s0); + private static final ContainsRule variable1Rule = new ContainsRule(s1); + private static final ContainsRule variable2Rule = new ContainsRule(s2); + private static final ContainsRule initialisedRule = new ContainsRule(s3); + private static final ContainsRule killedRule = new ContainsRule(s7); + private static final RulesFolowingClosingListener okListener=new RulesFolowingClosingListener(startedRule, variable1Rule, variable2Rule, initialisedRule, killedRule); + private static final RulesFolowingClosingListener errorListener=new RulesFolowingClosingListener(exceptionRule); - @Test + // @Test public void AppletTestSignedTest() throws Exception { ProcessResult pr = server.executeJavawsHeadless(l, "/AppletTestSigned.jnlp"); evaluateSignedApplet(pr, true); @@ -60,18 +77,12 @@ } private void evaluateSignedApplet(ProcessResult pr, boolean javawsApplet) { - String s3 = "AppletTestSigned was initialised"; - Assert.assertTrue("AppletTestSigned stdout should contain " + s3 + " but didn't", pr.stdout.contains(s3)); - String s0 = "AppletTestSigned was started"; - Assert.assertTrue("AppletTestSigned stdout should contain " + s0 + " but didn't", pr.stdout.contains(s0)); - String s1 = "value1"; - Assert.assertTrue("AppletTestSigned stdout should contain " + s1 + " but didn't", pr.stdout.contains(s1)); - String s2 = "value2"; - Assert.assertTrue("AppletTestSigned stdout should contain " + s2 + " but didn't", pr.stdout.contains(s2)); - String ss = "xception"; - Assert.assertFalse("AppletTestSigned stderr should not contain " + ss + " but did", pr.stderr.contains(ss)); - String s7 = "AppletTestSigned killing himself after 2000 ms of life"; - Assert.assertTrue("AppletTestSigned stdout should contain " + s7 + " but didn't", pr.stdout.contains(s7)); + Assert.assertTrue("AppletTestSigned stdout " + initialisedRule.toPassingString() + " but didn't", initialisedRule.evaluate(pr.stdout)); + Assert.assertTrue("AppletTestSigned stdout " + startedRule.toPassingString() + " but didn't", startedRule.evaluate(pr.stdout)); + Assert.assertTrue("AppletTestSigned stdout " + variable1Rule.toPassingString() + " but didn't", variable1Rule.evaluate(pr.stdout)); + Assert.assertTrue("AppletTestSigned stdout " + variable2Rule.toPassingString() + " but didn't", variable2Rule.evaluate(pr.stdout)); + Assert.assertFalse("AppletTestSigned stderr " + exceptionRule.toFailingString() + " but did", exceptionRule.evaluate(pr.stderr)); + Assert.assertTrue("AppletTestSigned stdout " + killedRule.toPassingString() + " but didn't", killedRule.evaluate(pr.stdout)); if (!javawsApplet) { /*this is working correctly in most browser, but not in all. temporarily disabling String s4 = "AppletTestSigned was stopped"; @@ -87,7 +98,7 @@ public void AppletTestSignedFirefoxTestXslowX() throws Exception { ServerAccess.PROCESS_TIMEOUT = 30 * 1000; try { - ProcessResult pr = server.executeBrowser("/AppletTestSigned2.html"); + ProcessResult pr = server.executeBrowser("/AppletTestSigned2.html", okListener, errorListener); evaluateSignedApplet(pr, false); //Assert.assertTrue(pr.wasTerminated); //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null diff -r 17900f4ca4a6 -r 077a48d226c4 tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java --- a/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Mon Sep 24 17:05:41 2012 +0200 +++ b/tests/reproducers/simple/AppletTest/testcases/AppletTestTests.java Tue Sep 25 19:04:30 2012 +0200 @@ -35,6 +35,7 @@ exception statement from your version. */ +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; import net.sourceforge.jnlp.ProcessResult; import net.sourceforge.jnlp.ServerAccess; import net.sourceforge.jnlp.browsertesting.BrowserTest; @@ -47,6 +48,24 @@ public class AppletTestTests extends BrowserTest { + private final String s7 = "Aplet killing himself after 2000 ms of life"; + private final String ss = "xception"; + private final String s2 = "value2"; + private final String s1 = "value1"; + private final String s0 = "applet was started"; + private final String s3 = "applet was initialised"; + + private class CountingClosingListenerImpl extends CountingClosingListener { + + @Override + protected boolean isAlowedToFinish(String s) { + if (s.contains(ss)) { + return true; + } + return (s.contains(s0) && s.contains(s1) && s.contains(s2) && s.contains(s3) && s.contains(s7)); + } + } + @Test @TestInBrowsers(testIn = {Browsers.googleChrome}) @NeedsDisplay @@ -55,7 +74,7 @@ try { //System.out.println("connecting AppletInFirefoxTest request in " + getBrowser().toString()); //just verify loging is recording browser - ProcessResult pr1 = server.executeBrowser("/appletAutoTests.html"); + ProcessResult pr1 = server.executeBrowser("/appletAutoTests2.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); if (pr1.process == null) { Assert.assertTrue("If proces was null here, then google-chrome had to not exist, and so " + ServerAccess.UNSET_BROWSER @@ -64,12 +83,12 @@ pr1.deadlyException.getMessage().contains(ServerAccess.UNSET_BROWSER)); return; } - evaluateApplet(pr1,false); + evaluateApplet(pr1, false); Assert.assertTrue(pr1.wasTerminated); //System.out.println("connecting AppletInFirefoxTest request in " + getBrowser().toString()); // just verify loging is recording browser - ServerAccess.ProcessResult pr = server.executeBrowser("/appletAutoTests.html"); - evaluateApplet(pr,false); + ServerAccess.ProcessResult pr = server.executeBrowser("/appletAutoTests2.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateApplet(pr, false); Assert.assertTrue(pr.wasTerminated); } finally { ServerAccess.PROCESS_TIMEOUT = 20 * 1000; //back to normal @@ -80,30 +99,24 @@ @NeedsDisplay public void AppletTest() throws Exception { ProcessResult pr = server.executeJavawsHeadless(null, "/AppletTest.jnlp"); - evaluateApplet(pr,true); + evaluateApplet(pr, true); Assert.assertFalse(pr.wasTerminated); Assert.assertEquals((Integer) 0, pr.returnValue); } private void evaluateApplet(ProcessResult pr, boolean javawsApplet) { - String s3 = "applet was initialised"; Assert.assertTrue("AppletTest stdout should contains " + s3 + " bud didn't", pr.stdout.contains(s3)); - String s0 = "applet was started"; Assert.assertTrue("AppletTest stdout should contains " + s0 + " bud didn't", pr.stdout.contains(s0)); - String s1 = "value1"; Assert.assertTrue("AppletTest stdout should contains " + s1 + " bud didn't", pr.stdout.contains(s1)); - String s2 = "value2"; Assert.assertTrue("AppletTest stdout should contains " + s2 + " bud didn't", pr.stdout.contains(s2)); - String ss = "xception"; Assert.assertFalse("AppletTest stderr should not contains " + ss + " but did", pr.stderr.contains(ss)); - String s7 = "Aplet killing himself after 2000 ms of life"; Assert.assertTrue("AppletTest stdout should contains " + s7 + " bud didn't", pr.stdout.contains(s7)); if (!javawsApplet) { /*this is working correctly in most browser, but not in all. temporarily disabling - String s4 = "applet was stopped"; - Assert.assertTrue("AppletTest stdout should contains " + s4 + " bud did't", pr.stdout.contains(s4)); - String s5 = "applet will be destroyed"; - Assert.assertTrue("AppletTest stdout should contains " + s5 + " bud did't", pr.stdout.contains(s5)); + String s4 = "applet was stopped"; + Assert.assertTrue("AppletTest stdout should contain " + s4 + " bud did't", pr.stdout.contains(s4)); + String s5 = "applet will be destroyed"; + Assert.assertTrue("AppletTest stdout should contain " + s5 + " bud did't", pr.stdout.contains(s5)); */ } } @@ -116,8 +129,8 @@ //just verify loging is recordingb rowser ServerAccess.PROCESS_TIMEOUT = 30 * 1000; try { - ProcessResult pr = server.executeBrowser("/appletAutoTests2.html"); - evaluateApplet(pr,false); + ProcessResult pr = server.executeBrowser("/appletAutoTests2.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateApplet(pr, false); Assert.assertTrue(pr.wasTerminated); //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null } finally { @@ -132,9 +145,9 @@ //just verify loging is recording browser ServerAccess.PROCESS_TIMEOUT = 30 * 1000; try { - ProcessResult pr = server.executeBrowser("/appletAutoTests.html"); + ProcessResult pr = server.executeBrowser("/appletAutoTests.html", new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); pr.process.destroy(); - evaluateApplet(pr,false); + evaluateApplet(pr, false); Assert.assertTrue(pr.wasTerminated); //Assert.assertEquals((Integer) 0, pr.returnValue); due to destroy is null } finally { diff -r 17900f4ca4a6 -r 077a48d226c4 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/CountingClosingListener.java Tue Sep 25 19:04:30 2012 +0200 @@ -0,0 +1,60 @@ +/* CountingClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp.closinglisteners; + +import net.sourceforge.jnlp.ClosingListener; + +public abstract class CountingClosingListener extends ClosingListener { + + protected StringBuilder sb = new StringBuilder(); + + @Override + public void charReaded(char ch) { + sb.append(ch); + if (isAlowedToFinish(sb.toString())) { + terminate(); + } + + } + + @Override + public void lineReaded(String s) { + //nothing to do + } + + protected abstract boolean isAlowedToFinish(String content); +} diff -r 17900f4ca4a6 -r 077a48d226c4 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/Rule.java Tue Sep 25 19:04:30 2012 +0200 @@ -0,0 +1,46 @@ +/* Rule.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. +*/ +package net.sourceforge.jnlp.closinglisteners; + +public interface Rule { + + public void setRule(S rule); + public boolean evaluate(T upon); + public String toPassingString(); + public String toFailingString(); + +} diff -r 17900f4ca4a6 -r 077a48d226c4 tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/RulesFolowingClosingListener.java Tue Sep 25 19:04:30 2012 +0200 @@ -0,0 +1,235 @@ +/* RulesFolowingClosingListener.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ +package net.sourceforge.jnlp.closinglisteners; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class RulesFolowingClosingListener extends CountingClosingListener { + + private List rules = new ArrayList(); + + public static class ContainsRule extends StringRule { + + public ContainsRule(String s) { + super(s); + } + + @Override + public boolean evaluate(String upon) { + return (upon.contains(rule)); + } + + @Override + public String toPassingString() { + return "should contain `" + rule + "`"; + } + + @Override + public String toFailingString() { + return "should NOT contain `" + rule + "`"; + } + } + + public static class NotContainsRule extends StringRule { + + public NotContainsRule(String s) { + super(s); + } + + @Override + public boolean evaluate(String upon) { + return !(upon.contains(rule)); + } + + @Override + public String toPassingString() { + return "should NOT contain `" + rule + "`"; + } + + @Override + public String toFailingString() { + return "should contain `" + rule + "`"; + } + } + + public static class MatchesRule extends StringRule { + + public MatchesRule(String s) { + super(s); + } + + @Override + public boolean evaluate(String upon) { + return (upon.matches(rule)); + } + + @Override + public String toPassingString() { + return "should match `" + rule + "`"; + } + + @Override + public String toFailingString() { + return "should NOT match `" + rule + "`"; + } + } + + public static class NotMatchesRule extends StringRule { + + public NotMatchesRule(String s) { + super(s); + } + + @Override + public boolean evaluate(String upon) { + return !(upon.matches(rule)); + } + + @Override + public String toPassingString() { + return "should NOT match`" + rule + "`"; + } + + @Override + public String toFailingString() { + return "should match`" + rule + "`"; + } + } + + + /** + * + * @param rule + * @return self, to alow chaing add(...).add(..)... + */ + public RulesFolowingClosingListener addMatchingRule(String rule) { + this.rules.add(new MatchesRule(rule)); + return this; + } + + /** + * + * @param rule + * @return self, to alow chaing add(...).add(..)... + */ + public RulesFolowingClosingListener addNotMatchingRule(String rule) { + this.rules.add(new NotMatchesRule(rule)); + return this; + } From andrew at icedtea.classpath.org Tue Sep 25 10:06:17 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 25 Sep 2012 17:06:17 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset d9d8e88ece00 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d9d8e88ece00 author: Andrew John Hughes date: Tue Sep 25 18:04:11 2012 +0100 PR1114: Provide option to turn off downloading of tarballs (--disable-downloading) 2012-09-25 Andrew John Hughes * NEWS: List PR1114. 2012-04-11 Andrew John Hughes * Makefile.am: (download-openjdk): Don't download unless enable_downloading is set. (download-cacao): Likewise. (download-jamvm): Likewise. (download-hotspot): Likewise. (download-jaxp-drop): Likewise. (download-jaxws-drop): Likewise. (download-jaf-drop): Likewise. * acinclude.m4: (IT_CHECK_FOR_DOWNLOADING): New option --disable-downloading. * configure.ac: Call IT_CHECK_FOR_DOWNLOADING. changeset 9fe1e3e1d4dc in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9fe1e3e1d4dc author: Andrew John Hughes date: Tue Sep 25 18:06:05 2012 +0100 PR1114: Fix enable_downloading syntax. 2012-04-12 Andrew John Hughes * Makefile.am: (download-openjdk): Fix syntax. (download-cacao): Likewise. (download-jamvm): Likewise. (download-hotspot): Likewise. (download-jaxp-drop): Likewise. (download-jaxws-drop): Likewise. (download-jaf-drop): Likewise. diffstat: ChangeLog | 31 +++++++++++++ Makefile.am | 134 ++++++++++++++++++++++++++++++++++++---------------------- NEWS | 1 + acinclude.m4 | 23 ++++++++++ configure.ac | 1 + 5 files changed, 139 insertions(+), 51 deletions(-) diffs (280 lines): diff -r 8bfbcf3a5d93 -r 9fe1e3e1d4dc ChangeLog --- a/ChangeLog Tue Sep 25 17:22:04 2012 +0100 +++ b/ChangeLog Tue Sep 25 18:06:05 2012 +0100 @@ -1,3 +1,34 @@ +2012-04-12 Andrew John Hughes + + * Makefile.am: + (download-openjdk): Fix syntax. + (download-cacao): Likewise. + (download-jamvm): Likewise. + (download-hotspot): Likewise. + (download-jaxp-drop): Likewise. + (download-jaxws-drop): Likewise. + (download-jaf-drop): Likewise. + +2012-09-25 Andrew John Hughes + + * NEWS: List PR1114. + +2012-04-11 Andrew John Hughes + + * Makefile.am: + (download-openjdk): Don't download unless + enable_downloading is set. + (download-cacao): Likewise. + (download-jamvm): Likewise. + (download-hotspot): Likewise. + (download-jaxp-drop): Likewise. + (download-jaxws-drop): Likewise. + (download-jaf-drop): Likewise. + * acinclude.m4: + (IT_CHECK_FOR_DOWNLOADING): New option + --disable-downloading. + * configure.ac: Call IT_CHECK_FOR_DOWNLOADING. + 2012-09-25 Andrew John Hughes * Makefile.am: diff -r 8bfbcf3a5d93 -r 9fe1e3e1d4dc Makefile.am --- a/Makefile.am Tue Sep 25 17:22:04 2012 +0100 +++ b/Makefile.am Tue Sep 25 18:06:05 2012 +0100 @@ -762,15 +762,19 @@ if ! echo "$(JAXP_DROP_SHA256SUM) drops/$(JAXP_DROP_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -f drops/$(JAXP_DROP_ZIP) ] ; \ - then \ - mv drops/$(JAXP_DROP_ZIP) drops/$(JAXP_DROP_ZIP).old ; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -f drops/$(JAXP_DROP_ZIP) ] ; \ + then \ + mv drops/$(JAXP_DROP_ZIP) drops/$(JAXP_DROP_ZIP).old ; \ + fi ; \ + $(WGET) $(JAXP_DROP_URL)/$(JAXP_DROP_ZIP) -O drops/$(JAXP_DROP_ZIP); \ + if ! echo "$(JAXP_DROP_SHA256SUM) drops/$(JAXP_DROP_ZIP)" \ + | $(SHA256SUM) --check ; \ + then echo "ERROR: Bad download of jaxp drop zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date JAXP drop zip available"; exit -1; \ fi ; \ - $(WGET) $(JAXP_DROP_URL)/$(JAXP_DROP_ZIP) -O drops/$(JAXP_DROP_ZIP); \ - if ! echo "$(JAXP_DROP_SHA256SUM) drops/$(JAXP_DROP_ZIP)" \ - | $(SHA256SUM) --check ; \ - then echo "ERROR: Bad download of jaxp drop zip"; false; \ - fi; \ fi ; mkdir -p stamps touch $@ @@ -787,14 +791,18 @@ if ! echo "$(JAF_DROP_SHA256SUM) drops/$(JAF_DROP_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -f drops/$(JAF_DROP_ZIP) ] ; \ - then \ - mv drops/$(JAF_DROP_ZIP) drops/$(JAF_DROP_ZIP).old ; \ - fi ; \ - $(WGET) $(JAF_DROP_URL)/$(JAF_DROP_ZIP) -O drops/$(JAF_DROP_ZIP); \ - if ! echo "$(JAF_DROP_SHA256SUM) drops/$(JAF_DROP_ZIP)" \ - | $(SHA256SUM) --check ; \ - then echo "ERROR: Bad download of jaf drop zip"; false; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -f drops/$(JAF_DROP_ZIP) ] ; \ + then \ + mv drops/$(JAF_DROP_ZIP) drops/$(JAF_DROP_ZIP).old ; \ + fi ; \ + $(WGET) $(JAF_DROP_URL)/$(JAF_DROP_ZIP) -O drops/$(JAF_DROP_ZIP); \ + if ! echo "$(JAF_DROP_SHA256SUM) drops/$(JAF_DROP_ZIP)" \ + | $(SHA256SUM) --check ; \ + then echo "ERROR: Bad download of jaf drop zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date JAF drop zip available"; exit -1; \ fi; \ fi ; mkdir -p stamps @@ -812,14 +820,18 @@ if ! echo "$(JAXWS_DROP_SHA256SUM) drops/$(JAXWS_DROP_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -f drops/$(JAXWS_DROP_ZIP) ] ; \ - then \ - mv drops/$(JAXWS_DROP_ZIP) drops/$(JAXWS_DROP_ZIP).old ; \ - fi ; \ - $(WGET) $(JAXWS_DROP_URL)/$(JAXWS_DROP_ZIP) -O drops/$(JAXWS_DROP_ZIP); \ - if ! echo "$(JAXWS_DROP_SHA256SUM) drops/$(JAXWS_DROP_ZIP)" \ - | $(SHA256SUM) --check ; \ - then echo "ERROR: Bad download of jaxws drop zip"; false; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -f drops/$(JAXWS_DROP_ZIP) ] ; \ + then \ + mv drops/$(JAXWS_DROP_ZIP) drops/$(JAXWS_DROP_ZIP).old ; \ + fi ; \ + $(WGET) $(JAXWS_DROP_URL)/$(JAXWS_DROP_ZIP) -O drops/$(JAXWS_DROP_ZIP); \ + if ! echo "$(JAXWS_DROP_SHA256SUM) drops/$(JAXWS_DROP_ZIP)" \ + | $(SHA256SUM) --check ; \ + then echo "ERROR: Bad download of jaxws drop zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date JAXWS drop zip available"; exit -1; \ fi; \ fi ; mkdir -p stamps @@ -844,15 +856,18 @@ if ! echo "$(CACAO_SHA256SUM) $(CACAO_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -e $(CACAO_SRC_ZIP) ] ; \ - then \ - mv $(CACAO_SRC_ZIP) $(CACAO_SRC_ZIP).old ; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -e $(CACAO_SRC_ZIP) ] ; then \ + mv $(CACAO_SRC_ZIP) $(CACAO_SRC_ZIP).old ; \ + fi ; \ + $(WGET) $(CACAO_URL) -O $(CACAO_SRC_ZIP); \ + if ! echo "$(CACAO_SHA256SUM) $(CACAO_SRC_ZIP)" \ + | $(SHA256SUM) --check ; then \ + echo "ERROR: Bad download of CACAO zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date CACAO zip available"; exit -1; \ fi ; \ - $(WGET) $(CACAO_URL) -O $(CACAO_SRC_ZIP); \ - if ! echo "$(CACAO_SHA256SUM) $(CACAO_SRC_ZIP)" \ - | $(SHA256SUM) --check ; \ - then echo "ERROR: Bad download of CACAO zip"; false; \ - fi; \ fi endif endif @@ -872,15 +887,18 @@ if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -e $(JAMVM_SRC_ZIP) ] ; \ - then \ - mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ - fi ; \ - $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ - if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ - | $(SHA256SUM) --check ; \ - then echo "ERROR: Bad download of JamVM zip"; false; \ - fi; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -e $(JAMVM_SRC_ZIP) ] ; then \ + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ + fi ; \ + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ + | $(SHA256SUM) --check ; then \ + echo "ERROR: Bad download of JamVM zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date JamVM zip available"; exit -1; \ + fi ; \ fi endif mkdir -p stamps @@ -914,11 +932,18 @@ if ! echo "$(OPENJDK_SHA256SUM) $(OPENJDK_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -e $(OPENJDK_SRC_ZIP) ] ; \ - then \ - mv $(OPENJDK_SRC_ZIP) $(OPENJDK_SRC_ZIP).old ; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -e $(OPENJDK_SRC_ZIP) ] ; then \ + mv $(OPENJDK_SRC_ZIP) $(OPENJDK_SRC_ZIP).old ; \ + fi ; \ + $(WGET) $(OPENJDK_URL)$(OPENJDK_SRC_ZIP) -O $(OPENJDK_SRC_ZIP); \ + if ! echo "$(OPENJDK_SHA256SUM) $(OPENJDK_SRC_ZIP)" \ + | $(SHA256SUM) --check ; then \ + echo "ERROR: Bad download of OpenJDK zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date OpenJDK zip available"; exit -1; \ fi ; \ - $(WGET) $(OPENJDK_URL)$(OPENJDK_SRC_ZIP) -O $(OPENJDK_SRC_ZIP); \ fi endif endif @@ -941,13 +966,20 @@ if ! echo "$${hotspot_sha256sum} $(HOTSPOT_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ -e $(HOTSPOT_SRC_ZIP) ] ; \ - then \ - mv $(HOTSPOT_SRC_ZIP) $(HOTSPOT_SRC_ZIP).old ; \ + if test "x$(enable_downloading)" = "xyes"; then \ + if [ -e $(HOTSPOT_SRC_ZIP) ] ; then \ + mv $(HOTSPOT_SRC_ZIP) $(HOTSPOT_SRC_ZIP).old ; \ + fi ; \ + hotspot_url="`$(AWK) 'version==$$1 {print $$2 "/archive/" $$3 ".tar.gz"}' \ + version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map`"; \ + $(WGET) $${hotspot_url} -O $(HOTSPOT_SRC_ZIP) ; \ + if ! echo "$${hotspot_sha256sum} $(HOTSPOT_SRC_ZIP)" \ + | $(SHA256SUM) --check ; then \ + echo "ERROR: Bad download of HotSpot zip"; false; \ + fi; \ + else \ + echo "ERROR: No up-to-date HotSpot zip available"; exit -1; \ fi ; \ - hotspot_url="`$(AWK) 'version==$$1 {print $$2 "/archive/" $$3 ".tar.gz"}' \ - version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map`"; \ - $(WGET) $${hotspot_url} -O $(HOTSPOT_SRC_ZIP) ; \ fi endif mkdir -p stamps diff -r 8bfbcf3a5d93 -r 9fe1e3e1d4dc NEWS --- a/NEWS Tue Sep 25 17:22:04 2012 +0100 +++ b/NEWS Tue Sep 25 18:06:05 2012 +0100 @@ -51,6 +51,7 @@ - PR1121: Old installs still suffer from GCC PR41686 - PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) are actually missing from the boot JDK + - PR1114: Provide option to turn off downloading of tarballs (--disable-downloading) * JamVM - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) - PPC: Don't use lwsync if it isn't supported diff -r 8bfbcf3a5d93 -r 9fe1e3e1d4dc acinclude.m4 --- a/acinclude.m4 Tue Sep 25 17:22:04 2012 +0100 +++ b/acinclude.m4 Tue Sep 25 18:06:05 2012 +0100 @@ -1834,3 +1834,26 @@ AM_CONDITIONAL([LACKS_$1], test x"${it_cv_$1}" = "xyes") AC_PROVIDE([$0])dnl ]) + +AC_DEFUN([IT_CHECK_IF_DOWNLOADING], +[ + AC_MSG_CHECKING([whether to download tarballs]) + AC_ARG_ENABLE([downloading], + [AS_HELP_STRING(--disable-downloading,don't download tarballs [[default=no]])], + [ + case "${enableval}" in + no) + enable_downloading=no + ;; + *) + enable_downloading=yes + ;; + esac + ], + [ + enable_downloading=yes + ]) + AC_MSG_RESULT([${enable_downloading}]) + AM_CONDITIONAL([DOWNLOADING], test x"${enable_downloading}" = "xyes") + AC_SUBST([enable_downloading]) +]) diff -r 8bfbcf3a5d93 -r 9fe1e3e1d4dc configure.ac --- a/configure.ac Tue Sep 25 17:22:04 2012 +0100 +++ b/configure.ac Tue Sep 25 18:06:05 2012 +0100 @@ -149,6 +149,7 @@ AC_SUBST(OPENJDK_BUILD_DIR) IT_CHECK_IF_BOOTSTRAPPING +IT_CHECK_IF_DOWNLOADING IT_FIND_JAVA IT_FIND_COMPILER IT_FIND_JAVAH From andrew at icedtea.classpath.org Tue Sep 25 11:09:01 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 25 Sep 2012 18:09:01 +0000 Subject: /hg/icedtea6: PR1176: Synchronise CACAO rules between IcedTea6/7... Message-ID: changeset b2594f302584 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b2594f302584 author: Andrew John Hughes date: Tue Sep 25 19:08:50 2012 +0100 PR1176: Synchronise CACAO rules between IcedTea6/7/8 where possible 2012-09-25 Andrew John Hughes * NEWS: List PR1176. 2012-09-25 Stefan Ring * patches/cacao/ignore-jdi-tests.patch: Removed. * patches/cacao/ignore-tests.patch: Likewise. * Makefile.am: Synchronize CACAO sections with icedtea7, removing test-disabling patches. (cacao): Pass -j$(PARALLEL_JOBS) to make. 2009-11-02 Andrew John Hughes (extract-cacao): Test the actual CACAO source directory exists, not just the directory above. Use $@ to create stamp. diffstat: ChangeLog | 19 + Makefile.am | 14 +- NEWS | 1 + patches/cacao/ignore-jdi-tests.patch | 1496 ---------------------------------- patches/cacao/ignore-tests.patch | 11 - 5 files changed, 24 insertions(+), 1517 deletions(-) diffs (truncated from 1603 to 500 lines): diff -r 9fe1e3e1d4dc -r b2594f302584 ChangeLog --- a/ChangeLog Tue Sep 25 18:06:05 2012 +0100 +++ b/ChangeLog Tue Sep 25 19:08:50 2012 +0100 @@ -1,3 +1,22 @@ +2012-09-25 Andrew John Hughes + + * NEWS: List PR1176. + +2012-09-25 Stefan Ring + + * patches/cacao/ignore-jdi-tests.patch: Removed. + * patches/cacao/ignore-tests.patch: Likewise. + * Makefile.am: + Synchronize CACAO sections with icedtea7, + removing test-disabling patches. + (cacao): Pass -j$(PARALLEL_JOBS) to make. + +2009-11-02 Andrew John Hughes + + (extract-cacao): Test the actual CACAO source + directory exists, not just the directory above. + Use $@ to create stamp. + 2012-04-12 Andrew John Hughes * Makefile.am: diff -r 9fe1e3e1d4dc -r b2594f302584 Makefile.am --- a/Makefile.am Tue Sep 25 18:06:05 2012 +0100 +++ b/Makefile.am Tue Sep 25 19:08:50 2012 +0100 @@ -433,12 +433,6 @@ patches/cacao/memory.patch endif -if ENABLE_CACAO -ICEDTEA_PATCHES += \ - patches/cacao/ignore-jdi-tests.patch \ - patches/cacao/ignore-tests.patch -endif - if ENABLE_PULSE_JAVA ICEDTEA_PATCHES += \ patches/pulse-soundproperties.patch @@ -1048,14 +1042,14 @@ if !USE_SYSTEM_CACAO if USE_ALT_CACAO_SRC_DIR set -e ; \ - if ! test -d cacao ; \ + if ! test -d cacao/cacao ; \ then \ mkdir cacao ; \ cp -rL $(ALT_CACAO_SRC_DIR) cacao/cacao ; \ fi else set -e ; \ - if ! test -d cacao ; \ + if ! test -d cacao/cacao ; \ then \ mkdir cacao ; \ $(TAR) xf $(CACAO_SRC_ZIP) -C cacao ; \ @@ -1066,7 +1060,7 @@ endif endif mkdir -p stamps - touch stamps/extract-cacao.stamp + touch $@ stamps/extract-jamvm.stamp: if BUILD_JAMVM @@ -2124,7 +2118,7 @@ --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ --with-java-runtime-library-classes=$(RUNTIME) \ --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ - $(ARCH_PREFIX) $(MAKE) install + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install ln -s server $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client endif endif diff -r 9fe1e3e1d4dc -r b2594f302584 NEWS --- a/NEWS Tue Sep 25 18:06:05 2012 +0100 +++ b/NEWS Tue Sep 25 19:08:50 2012 +0100 @@ -52,6 +52,7 @@ - PR1119: Only add classes to rt-source-files.txt if the class (or one or more of its methods/fields) are actually missing from the boot JDK - PR1114: Provide option to turn off downloading of tarballs (--disable-downloading) + - PR1176: Synchronise CACAO rules between IcedTea6/7/8 where possible * JamVM - ARMv6 armhf: Changes for Raspbian (Raspberry Pi) - PPC: Don't use lwsync if it isn't supported diff -r 9fe1e3e1d4dc -r b2594f302584 patches/cacao/ignore-jdi-tests.patch --- a/patches/cacao/ignore-jdi-tests.patch Tue Sep 25 18:06:05 2012 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1496 +0,0 @@ -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/AcceptTimeout.java openjdk/jdk/test/com/sun/jdi/AcceptTimeout.java ---- openjdk.orig/jdk/test/com/sun/jdi/AcceptTimeout.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AcceptTimeout.java 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 6198277 - * @summary Test that each ListeningConnector that supports a "timeout" argument will - * timeout with TransportTimeoutException -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/AccessSpecifierTest.java openjdk/jdk/test/com/sun/jdi/AccessSpecifierTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/AccessSpecifierTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AccessSpecifierTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4359628 - * @summary Test fix for JDI: methods Accessible.is...() lie about array types - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/AfterThreadDeathTest.java openjdk/jdk/test/com/sun/jdi/AfterThreadDeathTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/AfterThreadDeathTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AfterThreadDeathTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4364671 - * @summary Creating a StepRequest on a nonexistant thread fails - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/AllLineLocations.java openjdk/jdk/test/com/sun/jdi/AllLineLocations.java ---- openjdk.orig/jdk/test/com/sun/jdi/AllLineLocations.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/AllLineLocations.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4248728 - * @summary Test ReferenceType.allLineLocations - * @author Gordon Hirsch -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ArgumentValuesTest.java openjdk/jdk/test/com/sun/jdi/ArgumentValuesTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/ArgumentValuesTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ArgumentValuesTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -1,5 +1,6 @@ - /** hard coded linenumbers in other tests - DO NOT CHANGE - * @test/nodynamiccopyright/ -+ * @ignore cacao nyi - * @bug 4490824 - * @summary JDI: provide arguments when no debug attributes present - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh openjdk/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh ---- openjdk.orig/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ArrayLengthDumpTest.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4422141 4695338 - # @summary TTY: .length field for arrays in print statements in jdb not recognized - # TTY: dump command not implemented. -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ArrayRangeTest.java openjdk/jdk/test/com/sun/jdi/ArrayRangeTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/ArrayRangeTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ArrayRangeTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4439631 - * @bug 4448721 - * @bug 4448603 -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/BacktraceFieldTest.java openjdk/jdk/test/com/sun/jdi/BacktraceFieldTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/BacktraceFieldTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/BacktraceFieldTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4446677 - * @summary debuggee crashes when debugging under jbuilder - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/BadHandshakeTest.java openjdk/jdk/test/com/sun/jdi/BadHandshakeTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/BadHandshakeTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/BadHandshakeTest.java 2010-02-19 15:01:46.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 6306165 6432567 - * @summary Check that a bad handshake doesn't cause a debuggee to abort - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/BreakpointTest.java openjdk/jdk/test/com/sun/jdi/BreakpointTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/BreakpointTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/BreakpointTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6496524 - * @summary Setting breakpoint in jdb crashes Hotspot JVM - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CatchAllTest.sh openjdk/jdk/test/com/sun/jdi/CatchAllTest.sh ---- openjdk.orig/jdk/test/com/sun/jdi/CatchAllTest.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CatchAllTest.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4749692 - # @summary REGRESSION: jdb rejects the syntax catch java.lang.IndexOutOfBoundsException - # @author Tim Bell -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CatchCaughtTest.sh openjdk/jdk/test/com/sun/jdi/CatchCaughtTest.sh ---- openjdk.orig/jdk/test/com/sun/jdi/CatchCaughtTest.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CatchCaughtTest.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4788864 - # @summary TTY: 'catch caught' with no class pattern throws NullPointerException - # @author Tim Bell -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CatchPatternTest.sh openjdk/jdk/test/com/sun/jdi/CatchPatternTest.sh ---- openjdk.orig/jdk/test/com/sun/jdi/CatchPatternTest.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CatchPatternTest.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4671838 - # @summary TTY: surprising ExceptionSpec.resolveEventRequest() wildcard results - # @author Tim Bell -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ClassesByName2Test.java openjdk/jdk/test/com/sun/jdi/ClassesByName2Test.java ---- openjdk.orig/jdk/test/com/sun/jdi/ClassesByName2Test.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassesByName2Test.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4406439 4925740 - * @summary ClassesByName2 verifies that all the classes in the loaded class list can be found with classesByName.. - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ClassesByName.java openjdk/jdk/test/com/sun/jdi/ClassesByName.java ---- openjdk.orig/jdk/test/com/sun/jdi/ClassesByName.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassesByName.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4287992 - * @author Robert Field - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java openjdk/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ClassLoaderClassesTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4450091 - * @summary Test ClassLoaderReference.visibleClasses() which is - * a direct pass-through of the JVMDI function GetClassLoaderClasses -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh ---- openjdk.orig/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CommandCommentDelimiter.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -25,6 +25,7 @@ - - # - # @test -+# @ignore cacao nyi - # @bug 4507088 - # @summary TTY: Add a comment delimiter to the jdb command set - # @author Tim Bell -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CompatibleConnectors.java openjdk/jdk/test/com/sun/jdi/CompatibleConnectors.java ---- openjdk.orig/jdk/test/com/sun/jdi/CompatibleConnectors.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CompatibleConnectors.java 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4287596 - * @summary Unit test for "Pluggable Connectors and Transports" feature. - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java openjdk/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java ---- openjdk.orig/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java 2010-02-17 03:14:51.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/connect/spi/DebugUsingCustomConnector.java 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4287596 - * @summary Unit test for "Pluggable Connectors and Transports" feature. - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java openjdk/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java ---- openjdk.orig/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java 2010-02-17 03:14:51.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/connect/spi/GeneratedConnectors.java 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4287596 - * @summary Unit test for "Pluggable Connectors and Transports" feature. - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh openjdk/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh ---- openjdk.orig/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2010-02-17 03:14:51.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 5055681 - # @summary Test loading JDI classes via custom class loader - -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ConnectedVMs.java openjdk/jdk/test/com/sun/jdi/ConnectedVMs.java ---- openjdk.orig/jdk/test/com/sun/jdi/ConnectedVMs.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ConnectedVMs.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4329140 - * @author Robert Field - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ConstantPoolInfo.java openjdk/jdk/test/com/sun/jdi/ConstantPoolInfo.java ---- openjdk.orig/jdk/test/com/sun/jdi/ConstantPoolInfo.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ConstantPoolInfo.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 5024104 - * @summary Test ReferenceType.majorVersion(), minorVersion, constantPoolCount and ConstantPool apis. - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CountEvent.java openjdk/jdk/test/com/sun/jdi/CountEvent.java ---- openjdk.orig/jdk/test/com/sun/jdi/CountEvent.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CountEvent.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4315352 - * @summary disabling EventRequest expired with addCountFilter() throws - * InternalException. -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/CountFilterTest.java openjdk/jdk/test/com/sun/jdi/CountFilterTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/CountFilterTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/CountFilterTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4321339 - * @summary Check correct processing of filters after a count filter - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/DebuggerThreadTest.java openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/DebuggerThreadTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DebuggerThreadTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4513488 - * @summary Test for JDI: Internal JDI helper threads should setDaemon(true) - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java openjdk/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeleteAllBkptsTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4528948 - * @summary Unable to finish a debugging in NetBeans IDE - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java openjdk/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeleteEventRequestsTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4331872 - * @summary erm.deleteEventRequests(erm.breakpointRequests()) throws exception - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/DeoptimizeWalk.sh openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh ---- openjdk.orig/jdk/test/com/sun/jdi/DeoptimizeWalk.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DeoptimizeWalk.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4525714 - # @summary jtreg test PopAsynchronousTest fails in build 85 with -Xcomp - # @author Jim Holmlund/Swamy Venkataramanappa -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/DoubleAgentTest.java openjdk/jdk/test/com/sun/jdi/DoubleAgentTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/DoubleAgentTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/DoubleAgentTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 6354345 - * @summary Check that a double agent request fails - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EarlyReturnNegativeTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 6431735 - * @summary Unexpected ClassCastException in ThreadReference.forceEarlyReturn - * @author Jim Holmlund -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/EarlyReturnTest.java openjdk/jdk/test/com/sun/jdi/EarlyReturnTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/EarlyReturnTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EarlyReturnTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /* - * @test -+ * @ignore cacao nyi - * @bug 6175634 - * @summary Allow early return from methods - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/EnumTest.java openjdk/jdk/test/com/sun/jdi/EnumTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/EnumTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EnumTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4728816 - * @summary JPDA: Add support for enums - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/EvalArgs.sh openjdk/jdk/test/com/sun/jdi/EvalArgs.sh ---- openjdk.orig/jdk/test/com/sun/jdi/EvalArgs.sh 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EvalArgs.sh 2010-02-19 14:59:03.000000000 +0000 -@@ -24,6 +24,7 @@ - # - - # @test -+# @ignore cacao nyi - # @bug 4663146 - # @summary Arguments match no method error - # @author Jim Holmlund/Suvasis -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java openjdk/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/EventQueueDisconnectTest.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4425852 - * @author Robert Field - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ExceptionEvents.java openjdk/jdk/test/com/sun/jdi/ExceptionEvents.java ---- openjdk.orig/jdk/test/com/sun/jdi/ExceptionEvents.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ExceptionEvents.java 2010-02-19 14:59:03.000000000 +0000 -@@ -23,6 +23,7 @@ - - /** - * @test -+ * @ignore cacao nyi - * @bug 4407397 - * @summary Test the requesting of exception events - * -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ExclusiveBind.java openjdk/jdk/test/com/sun/jdi/ExclusiveBind.java ---- openjdk.orig/jdk/test/com/sun/jdi/ExclusiveBind.java 2010-02-17 03:14:50.000000000 +0000 -+++ openjdk/jdk/test/com/sun/jdi/ExclusiveBind.java 2010-02-19 14:59:03.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - /* @test -+ * @ignore cacao nyi - * @bug 4531526 - * @summary Test that more than one debuggee cannot bind to same port - * at the same time. -diff -Nru openjdk.orig/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java openjdk/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java ---- openjdk.orig/jdk/test/com/sun/jdi/ExpiredRequestDeletionTest.java 2010-02-17 03:14:50.000000000 +0000 From ahughes at redhat.com Tue Sep 25 11:10:32 2012 From: ahughes at redhat.com (Andrew Hughes) Date: Tue, 25 Sep 2012 14:10:32 -0400 (EDT) Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: Message-ID: <1700858167.1533370.1348596632736.JavaMail.root@redhat.com> ----- Original Message ----- > > Ok, so I suggest just adding a patch to change the test & add > > parallel > > jobs, assuming it builds. > > Ok, I have this now -- > : > > > diff --git a/ChangeLog b/ChangeLog > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,10 @@ > +2012-09-25 Stefan Ring > + > + * Makefile.am: Synchronize CACAO sections with icedtea7, > + remove test-disabling patches. > + * patches/cacao/ignore-jdi-tests.patch: Removed. > + * patches/cacao/ignore-tests.patch: Removed. > + > 2012-09-20 Andrew John Hughes > > * Makefile.am: > diff --git a/Makefile.am b/Makefile.am > --- a/Makefile.am > +++ b/Makefile.am > @@ -453,12 +453,6 @@ > patches/cacao/memory.patch > endif > > -if ENABLE_CACAO > -ICEDTEA_PATCHES += \ > - patches/cacao/ignore-jdi-tests.patch \ > - patches/cacao/ignore-tests.patch > -endif > - > if ENABLE_PULSE_JAVA > ICEDTEA_PATCHES += \ > patches/pulse-soundproperties.patch > @@ -1054,7 +1048,7 @@ > endif > endif > mkdir -p stamps > - touch stamps/extract-cacao.stamp > + touch $@ > > stamps/extract-jamvm.stamp: > if BUILD_JAMVM > @@ -2112,7 +2106,7 @@ > --with-java-runtime-library-prefix=$(abs_top_builddir)/openjdk \ > --with-java-runtime-library-classes=$(RUNTIME) \ > --enable-jre-layout $(CACAO_CONFIGURE_ARGS); \ > - $(ARCH_PREFIX) $(MAKE) install > + $(ARCH_PREFIX) $(MAKE) -j$(PARALLEL_JOBS) install > ln -s server > $(abs_top_builddir)/cacao/install/jre/lib/$(INSTALL_ARCH_DIR)/client > endif > endif > Committed as: http://icedtea.classpath.org/hg/icedtea6/rev/b2594f302584 I added the cacao -> cacao/cacao change back which you removed and padded out the ChangeLog & NEWS a bit. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) PGP Key: 248BDC07 (https://keys.indymedia.org/) Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07 From stefan at complang.tuwien.ac.at Tue Sep 25 12:09:09 2012 From: stefan at complang.tuwien.ac.at (Stefan Ring) Date: Tue, 25 Sep 2012 21:09:09 +0200 Subject: [RFC] PR1118: Synchronize CACAO sections with icedtea7 In-Reply-To: <1700858167.1533370.1348596632736.JavaMail.root@redhat.com> References: <1700858167.1533370.1348596632736.JavaMail.root@redhat.com> Message-ID: > Committed as: > > http://icedtea.classpath.org/hg/icedtea6/rev/b2594f302584 Thanks. > I added the cacao -> cacao/cacao change back which you removed Arghh, I must have lost track of where and when it was added or removed and why :). In case you haven't noticed, I have also updated the corresponding patches for 7 here: https://bitbucket.org/Ringdingcoder/icedtea7/changeset/f68fa9be60b2ecce5aaf586430b7cbc57273def0 + its parent They look pretty good to me, but you might want to scrutinize a bit. Cheers From xranby at icedtea.classpath.org Wed Sep 26 01:09:05 2012 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Wed, 26 Sep 2012 08:09:05 +0000 Subject: /hg/release/icedtea7-2.3: JamVM PR1155: Do not put version numbe... Message-ID: changeset b5dcc4ea49a8 in /hg/release/icedtea7-2.3 details: http://icedtea.classpath.org/hg/release/icedtea7-2.3?cmd=changeset;node=b5dcc4ea49a8 author: Xerxes Ranby date: Wed Sep 26 12:05:38 2012 +0200 JamVM PR1155: Do not put version number in libjvm.so SONAME 2012-09-26 Xerxes Ranby JamVM PR1155: Do not put version number in libjvm.so SONAME * NEWS: Updated. * Makefile.am (JAMVM_VERSION): Updated JamVM to 2012-09-25 revision. (JAMVM_SHA256SUM): Updated. diffstat: ChangeLog | 9 +++++++++ Makefile.am | 4 ++-- NEWS | 2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diffs (42 lines): diff -r 9fc75486d031 -r b5dcc4ea49a8 ChangeLog --- a/ChangeLog Wed Sep 05 11:27:46 2012 +0200 +++ b/ChangeLog Wed Sep 26 12:05:38 2012 +0200 @@ -1,3 +1,12 @@ +2012-09-26 Xerxes R??nby + + JamVM + PR1155: Do not put version number in libjvm.so SONAME + * NEWS: Updated. + * Makefile.am + (JAMVM_VERSION): Updated JamVM to 2012-09-25 revision. + (JAMVM_SHA256SUM): Updated. + 2012-09-05 Matthias Klose * configure.ac: Remove the Xp header and library checks. diff -r 9fc75486d031 -r b5dcc4ea49a8 Makefile.am --- a/Makefile.am Wed Sep 05 11:27:46 2012 +0200 +++ b/Makefile.am Wed Sep 26 12:05:38 2012 +0200 @@ -24,8 +24,8 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -JAMVM_VERSION = e70f2450890b82c37422616cc85e1a23385f03cd -JAMVM_SHA256SUM = 3ca7e297ef4daa56c3dd733e21bce795d57ab071243369aa9400c0384ada8a4c +JAMVM_VERSION = 0972452d441544f7dd29c55d64f1ce3a5db90d82 +JAMVM_SHA256SUM = bfa706402ac934d24f7119eb78f6be65e91439a4b2e49dbcc21e288137808f03 JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz diff -r 9fc75486d031 -r b5dcc4ea49a8 NEWS --- a/NEWS Wed Sep 05 11:27:46 2012 +0200 +++ b/NEWS Wed Sep 26 12:05:38 2012 +0200 @@ -11,6 +11,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 2.3.3 (2012-XX-XX): +* JamVM + - PR1155: Do not put version number in libjvm.so SONAME New in release 2.3.2 (2012-08-31): From ptisnovs at icedtea.classpath.org Wed Sep 26 02:23:41 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 26 Sep 2012 09:23:41 +0000 Subject: /hg/rhino-tests: Make the test AbstractScriptEngineClassTest com... Message-ID: changeset a3b0d341d76b in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=a3b0d341d76b author: Pavel Tisnovsky date: Wed Sep 26 11:26:17 2012 +0200 Make the test AbstractScriptEngineClassTest compatible with JDK 7. diffstat: ChangeLog | 5 + src/org/RhinoTests/AbstractScriptEngineClassTest.java | 132 +++++++++++++---- 2 files changed, 105 insertions(+), 32 deletions(-) diffs (211 lines): diff -r 466d720bca82 -r a3b0d341d76b ChangeLog --- a/ChangeLog Tue Sep 25 10:54:08 2012 +0200 +++ b/ChangeLog Wed Sep 26 11:26:17 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-26 Pavel Tisnovsky + + * src/org/RhinoTests/AbstractScriptEngineClassTest.java: + Make this test compatible with JDK 7. + 2012-09-25 Pavel Tisnovsky * src/org/RhinoTests/SimpleBindingsClassTest.java: diff -r 466d720bca82 -r a3b0d341d76b src/org/RhinoTests/AbstractScriptEngineClassTest.java --- a/src/org/RhinoTests/AbstractScriptEngineClassTest.java Tue Sep 25 10:54:08 2012 +0200 +++ b/src/org/RhinoTests/AbstractScriptEngineClassTest.java Wed Sep 26 11:26:17 2012 +0200 @@ -43,6 +43,8 @@ import java.util.Arrays; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import java.lang.reflect.Constructor; import java.lang.reflect.Field; @@ -271,44 +273,66 @@ * Test for method javax.script.AbstractScriptEngine.getClass().getConstructors() */ protected void testGetConstructors() { + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk6.put("public javax.script.AbstractScriptEngine()", "javax.script.AbstractScriptEngine"); + testedConstructors_jdk6.put("public javax.script.AbstractScriptEngine(javax.script.Bindings)", "javax.script.AbstractScriptEngine"); + + testedConstructors_jdk7.put("public javax.script.AbstractScriptEngine()", "javax.script.AbstractScriptEngine"); + testedConstructors_jdk7.put("public javax.script.AbstractScriptEngine(javax.script.Bindings)", "javax.script.AbstractScriptEngine"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all constructors for this class Constructor[] constructors = this.abstractScriptEngineClass.getConstructors(); + + // basic check for a number of constructors assertEquals(constructors.length, 2, "only 2 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.AbstractScriptEngine", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.AbstractScriptEngine()", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.AbstractScriptEngine", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.AbstractScriptEngine(javax.script.Bindings)", - "wrong constructor.toString() " + constructorName); + + // check if all constructors exists + for (Constructor constructor : constructors) { + String constructorName = constructor.getName(); + String constructorString = constructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** * Test for method javax.script.AbstractScriptEngine.getClass().getDeclaredConstructors() */ protected void testGetDeclaredConstructors() { - Constructor[] constructors = this.abstractScriptEngineClass.getDeclaredConstructors(); - assertEquals(constructors.length, 2, "only 2 constructors should be set"); - String constructorName; - String constructorString; - constructorName = constructors[0].getName(); - constructorString = constructors[0].toString(); - assertEquals(constructorName, "javax.script.AbstractScriptEngine", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.AbstractScriptEngine()", - "wrong constructor.toString() " + constructorName); - constructorName = constructors[1].getName(); - constructorString = constructors[1].toString(); - assertEquals(constructorName, "javax.script.AbstractScriptEngine", - "wrong constructor name " + constructorName); - assertEquals(constructorString, "public javax.script.AbstractScriptEngine(javax.script.Bindings)", - "wrong constructor.toString() " + constructorName); + // map of constructors which should exists + Map testedConstructors = null; + Map testedConstructors_jdk6 = new HashMap(); + Map testedConstructors_jdk7 = new HashMap(); + + testedConstructors_jdk6.put("public javax.script.AbstractScriptEngine()", "javax.script.AbstractScriptEngine"); + testedConstructors_jdk6.put("public javax.script.AbstractScriptEngine(javax.script.Bindings)", "javax.script.AbstractScriptEngine"); + + testedConstructors_jdk7.put("public javax.script.AbstractScriptEngine()", "javax.script.AbstractScriptEngine"); + testedConstructors_jdk7.put("public javax.script.AbstractScriptEngine(javax.script.Bindings)", "javax.script.AbstractScriptEngine"); + + // get the right map containing constructor signatures + testedConstructors = getJavaVersion() < 7 ? testedConstructors_jdk6 : testedConstructors_jdk7; + + // get all declared constructors for this class + Constructor[] declaredConstructors = this.abstractScriptEngineClass.getDeclaredConstructors(); + + // basic check for a number of declared constructors + assertEquals(declaredConstructors.length, 2, "only 2 constructors should be set"); + + // check if all declared constructors exists + for (Constructor declaredConstructor : declaredConstructors) { + String constructorName = declaredConstructor.getName(); + String constructorString = declaredConstructor.toString(); + assertTrue(testedConstructors.containsKey(constructorString), "wrong constructor.toString() " + constructorName); + assertEquals(testedConstructors.get(constructorString), constructorName, "wrong constructor name " + constructorName); + } } /** @@ -366,7 +390,7 @@ */ protected void testGetMethods() { // following methods should be inherited - final String[] methodsThatShouldExists = { + final String[] methodsThatShouldExists_jdk6 = { "public abstract java.lang.Object javax.script.ScriptEngine.eval(java.io.Reader,javax.script.ScriptContext) throws javax.script.ScriptException", "public abstract java.lang.Object javax.script.ScriptEngine.eval(java.lang.String,javax.script.ScriptContext) throws javax.script.ScriptException", "public abstract javax.script.Bindings javax.script.ScriptEngine.createBindings()", @@ -391,6 +415,33 @@ "public void javax.script.AbstractScriptEngine.setBindings(javax.script.Bindings,int)", "public void javax.script.AbstractScriptEngine.setContext(javax.script.ScriptContext)", }; + + final String[] methodsThatShouldExists_jdk7 = { + "public abstract java.lang.Object javax.script.ScriptEngine.eval(java.io.Reader,javax.script.ScriptContext) throws javax.script.ScriptException", + "public abstract java.lang.Object javax.script.ScriptEngine.eval(java.lang.String,javax.script.ScriptContext) throws javax.script.ScriptException", + "public abstract javax.script.Bindings javax.script.ScriptEngine.createBindings()", + "public abstract javax.script.ScriptEngineFactory javax.script.ScriptEngine.getFactory()", + "public boolean java.lang.Object.equals(java.lang.Object)", + "public final native java.lang.Class java.lang.Object.getClass()", + "public final native void java.lang.Object.notify()", + "public final native void java.lang.Object.notifyAll()", + "public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException", + "public final void java.lang.Object.wait() throws java.lang.InterruptedException", + "public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.io.Reader) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.io.Reader,javax.script.Bindings) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.lang.String) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.lang.String,javax.script.Bindings) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.get(java.lang.String)", + "public java.lang.String java.lang.Object.toString()", + "public javax.script.Bindings javax.script.AbstractScriptEngine.getBindings(int)", + "public javax.script.ScriptContext javax.script.AbstractScriptEngine.getContext()", + "public native int java.lang.Object.hashCode()", + "public void javax.script.AbstractScriptEngine.put(java.lang.String,java.lang.Object)", + "public void javax.script.AbstractScriptEngine.setBindings(javax.script.Bindings,int)", + "public void javax.script.AbstractScriptEngine.setContext(javax.script.ScriptContext)", + }; + // get all inherited methods Method[] methods = this.abstractScriptEngineClass.getMethods(); // and transform the array into a list of method names @@ -398,6 +449,7 @@ for (Method method : methods) { methodsAsString.add(method.toString()); } + String[] methodsThatShouldExists = getJavaVersion() < 7 ? methodsThatShouldExists_jdk6 : methodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : methodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), @@ -410,7 +462,7 @@ */ protected void testGetDeclaredMethods() { // following methods should be declared - final String[] declaredMethodsThatShouldExists = { + final String[] declaredMethodsThatShouldExists_jdk6 = { "protected javax.script.ScriptContext javax.script.AbstractScriptEngine.getScriptContext(javax.script.Bindings)", "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.io.Reader) throws javax.script.ScriptException", "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.io.Reader,javax.script.Bindings) throws javax.script.ScriptException", @@ -423,6 +475,21 @@ "public void javax.script.AbstractScriptEngine.setBindings(javax.script.Bindings,int)", "public void javax.script.AbstractScriptEngine.setContext(javax.script.ScriptContext)", }; + + final String[] declaredMethodsThatShouldExists_jdk7 = { + "protected javax.script.ScriptContext javax.script.AbstractScriptEngine.getScriptContext(javax.script.Bindings)", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.io.Reader) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.io.Reader,javax.script.Bindings) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.lang.String) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.eval(java.lang.String,javax.script.Bindings) throws javax.script.ScriptException", + "public java.lang.Object javax.script.AbstractScriptEngine.get(java.lang.String)", + "public javax.script.Bindings javax.script.AbstractScriptEngine.getBindings(int)", + "public javax.script.ScriptContext javax.script.AbstractScriptEngine.getContext()", + "public void javax.script.AbstractScriptEngine.put(java.lang.String,java.lang.Object)", + "public void javax.script.AbstractScriptEngine.setBindings(javax.script.Bindings,int)", + "public void javax.script.AbstractScriptEngine.setContext(javax.script.ScriptContext)", + }; + // get all declared methods Method[] declaredMethods = this.abstractScriptEngineClass.getDeclaredMethods(); // and transform the array into a list of method names @@ -430,6 +497,7 @@ for (Method method : declaredMethods) { methodsAsString.add(method.toString()); } + String[] declaredMethodsThatShouldExists = getJavaVersion() < 7 ? declaredMethodsThatShouldExists_jdk6 : declaredMethodsThatShouldExists_jdk7; // check if all required methods really exists for (String methodThatShouldExists : declaredMethodsThatShouldExists) { assertTrue(methodsAsString.contains(methodThatShouldExists), From ptisnovs at icedtea.classpath.org Wed Sep 26 02:48:52 2012 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 26 Sep 2012 09:48:52 +0000 Subject: /hg/gfx-test: Ten new tests added to the test suite ClippingPath... Message-ID: changeset a2b002fd8cf5 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=a2b002fd8cf5 author: Pavel Tisnovsky date: Wed Sep 26 11:51:29 2012 +0200 Ten new tests added to the test suite ClippingPathByRoundRectangleShape. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java | 243 +++++++++- 2 files changed, 246 insertions(+), 2 deletions(-) diffs (279 lines): diff -r fed6c6375851 -r a2b002fd8cf5 ChangeLog --- a/ChangeLog Tue Sep 25 10:46:05 2012 +0200 +++ b/ChangeLog Wed Sep 26 11:51:29 2012 +0200 @@ -1,3 +1,8 @@ +2012-09-26 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java: + Ten new tests added to the test suite. + 2012-09-25 Pavel Tisnovsky * src/org/gfxtest/testsuites/PrintTestBitBltCropImage.java: diff -r fed6c6375851 -r a2b002fd8cf5 src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java --- a/src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java Tue Sep 25 10:46:05 2012 +0200 +++ b/src/org/gfxtest/testsuites/ClippingPathByRoundRectangleShape.java Wed Sep 26 11:51:29 2012 +0200 @@ -40,7 +40,6 @@ package org.gfxtest.testsuites; -import java.awt.BasicStroke; import java.awt.Graphics2D; @@ -401,7 +400,7 @@ } /** - * Check if line path could be clippRounded by a round rectangle shape. Path is rendered + * Check if line path could be clipped by a round rectangle shape. Path is rendered * using stroke paint with thick stroke width. * * @param image @@ -1111,6 +1110,246 @@ } /** + * Check if line path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with normal stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipLinePathByRoundRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawLinePathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if quadratic path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with normal stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipQuadraticPathByRoundRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawQuadraticPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if cubic path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with normal stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipCubicPathByRoundRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawCubicPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if closed path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with normal stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipClosedPathByRoundRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawClosedPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if crossed closed path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with normal stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipCrossedClosedPathByRoundRectangleShapeDottedStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + //CommonRenderingStyles.setStrokeThickWidth(graphics2d, BasicStroke.CAP_ROUND); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawCrossedClosedPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if line path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with zero stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipLinePathByRoundRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeZeroThick(graphics2d); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawLinePathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if quadratic path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with zero stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipQuadraticPathByRoundRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeZeroThick(graphics2d); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawQuadraticPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if cubic path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with zero stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipCubicPathByRoundRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeZeroThick(graphics2d); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawCubicPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if closed path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with zero stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipClosedPathByRoundRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeZeroThick(graphics2d); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawClosedPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** + * Check if crossed closed path could be clipped by a round rectangle shape. Path is rendered + * using dotted stroke paint with zero stroke width. + * + * @param image + * work image + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testClipCrossedClosedPathByRoundRectangleShapeDottedZeroStrokePaint(TestImage image, Graphics2D graphics2d) + { + // render clip round rectangle + CommonClippingOperations.renderClipRoundRectangle(image, graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeZeroThick(graphics2d); + // set dashed pattern + CommonRenderingStyles.setDashedStrokePattern(graphics2d, DOTTED_PATTERN); + // set clip region and draw the path + drawCrossedClosedPathClippedByRoundRectangleShape(image, graphics2d); + // test result + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args From andrew at icedtea.classpath.org Wed Sep 26 06:53:03 2012 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 26 Sep 2012 13:53:03 +0000 Subject: /hg/icedtea7: Update to u10b08. Message-ID: changeset 67d42446bc25 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=67d42446bc25 author: Andrew John Hughes date: Wed Sep 26 14:52:49 2012 +0100 Update to u10b08. 2012-09-25 Andrew John Hughes * Makefile.am: (OPENJDK_VERSION): Bump to b08. (CORBA_CHANGESET): Update to IcedTea7 forest head. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * hotspot.map: Update default to head of IcedTea7 forest HotSpot. * patches/boot/ecj-diamond.patch: Regenerated. Added new cases in javax.crypto.CryptoPermissions, javax.crypto.JceSecurityManager and java.beans.Introspector. * patches/boot/ecj-multicatch.patch: Added new case in sun.tools.jconsole.Resources. * patches/boot/ecj-stringswitch.patch: Regenerated. diffstat: ChangeLog | 26 + Makefile.am | 26 +- hotspot.map | 2 +- patches/boot/ecj-diamond.patch | 1114 ++++++++++++++++++---------------- patches/boot/ecj-multicatch.patch | 33 + patches/boot/ecj-stringswitch.patch | 52 +- 6 files changed, 676 insertions(+), 577 deletions(-) diffs (truncated from 3158 to 500 lines): diff -r 1603e47bf631 -r 67d42446bc25 ChangeLog --- a/ChangeLog Tue Sep 25 14:34:52 2012 +0200 +++ b/ChangeLog Wed Sep 26 14:52:49 2012 +0100 @@ -1,3 +1,29 @@ +2012-09-25 Andrew John Hughes + + * Makefile.am: + (OPENJDK_VERSION): Bump to b08. + (CORBA_CHANGESET): Update to IcedTea7 forest head. + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (CORBA_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + * hotspot.map: Update default to head of IcedTea7 + forest HotSpot. + * patches/boot/ecj-diamond.patch: + Regenerated. Added new cases in javax.crypto.CryptoPermissions, + javax.crypto.JceSecurityManager and java.beans.Introspector. + * patches/boot/ecj-multicatch.patch: + Added new case in sun.tools.jconsole.Resources. + * patches/boot/ecj-stringswitch.patch: + Regenerated. + 2012-09-25 Xerxes R??nby JamVM diff -r 1603e47bf631 -r 67d42446bc25 Makefile.am --- a/Makefile.am Tue Sep 25 14:34:52 2012 +0200 +++ b/Makefile.am Wed Sep 26 14:52:49 2012 +0100 @@ -1,22 +1,22 @@ # Dependencies -OPENJDK_VERSION = b07 +OPENJDK_VERSION = b08 JDK_UPDATE_VERSION = 10 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) -CORBA_CHANGESET = 460b8758b9e4 -JAXP_CHANGESET = 5022489661f3 -JAXWS_CHANGESET = cf12218e2d86 -JDK_CHANGESET = 7458205a24cb -LANGTOOLS_CHANGESET = b6aa87579acb -OPENJDK_CHANGESET = d6cfb4b87935 +CORBA_CHANGESET = 7b663d107703 +JAXP_CHANGESET = 5534e1a3b332 +JAXWS_CHANGESET = b75161fe3bd2 +JDK_CHANGESET = 1c47442c7584 +LANGTOOLS_CHANGESET = 1045d2bf8428 +OPENJDK_CHANGESET = fc2e81562d86 -CORBA_SHA256SUM = a9f997e9b8b530a8155505bbb0ef83a2aac5cdea120f87196172f1402f98018c -JAXP_SHA256SUM = efc733f72384008e3bb095420964b671eeecba02e7003bb50355e835f2495bf3 -JAXWS_SHA256SUM = 3aae6d0d757c460b4d9a5cbebf722fc81192d1dcebd25d4c709fe6b03c12d48d -JDK_SHA256SUM = 9602aaa77634a7750afc63f65334ae26efc2b38ef822552e77cef456d681cb97 -LANGTOOLS_SHA256SUM = 166a06f7a56b5ae0eeb51d07b634e95e1c9c541875ea7ec3e529b72172cf875b -OPENJDK_SHA256SUM = 237b638ca0a210524ae719c96d18909ab951830081078f842ce3afa5fd20b39d +CORBA_SHA256SUM = 2c828476f2cfd1a9e3a5be7abf307c2087829ef6be626ae6b00f8c5eaf021760 +JAXP_SHA256SUM = e09f10dd7bac6ddd92016cf2397dea8a8b704dbfa0f27ca99f1a6de080412a7d +JAXWS_SHA256SUM = b08dcd8f4796daab11b13417b036de4323bed79e8c790ad958a55a1a165f08b8 +JDK_SHA256SUM = f758775982b021f6e650d1092a9f5d9bd900311603207c2ff51eb99fd4b2b731 +LANGTOOLS_SHA256SUM = f3e06606db1725548d4b67ff7f1db4e07ed291a46ac99a3149df6e82bd508945 +OPENJDK_SHA256SUM = c107253e6ca56e07c65f7656a47ae04cd53a061de9b8a302552be44cc65d1394 CACAO_VERSION = a567bcb7f589 CACAO_SHA256SUM = d49f79debc131a5694cae6ab3ba2864e7f3249ee8d9dc09aae8afdd4dc6b09f9 diff -r 1603e47bf631 -r 67d42446bc25 hotspot.map --- a/hotspot.map Tue Sep 25 14:34:52 2012 +0200 +++ b/hotspot.map Wed Sep 26 14:52:49 2012 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum -default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 08596d5d7dda c88abf4d9ab315e48a790ae184201efcd9b659c292b27570e3e606db585f2073 +default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot ede14825dbfa 3862e81ac99c464fda6f53898129ddbd1d62af63b7fc3ea06d21c4c9691da72e zero http://icedtea.classpath.org/hg/release/icedtea7-forest-2.1/hotspot c159737dd826 c1e626ecf4e7118ac269923ef0b83f5f8d36b0e816b293197ffbf8dd5083fa8d diff -r 1603e47bf631 -r 67d42446bc25 patches/boot/ecj-diamond.patch --- a/patches/boot/ecj-diamond.patch Tue Sep 25 14:34:52 2012 +0200 +++ b/patches/boot/ecj-diamond.patch Wed Sep 26 14:52:49 2012 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java ---- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2012-08-29 13:24:52.000000000 +0100 -+++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2012-08-29 13:51:21.597693973 +0100 +--- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2012-09-24 21:55:46.000000000 +0100 ++++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2012-09-26 02:21:47.741128089 +0100 @@ -58,7 +58,7 @@ private CorbaConnection conn; @@ -11,8 +11,8 @@ public static synchronized void cleanCache( ORB orb ) { synchronized (iorMapLock) { diff -Nru openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java ---- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java 2012-08-29 13:24:52.000000000 +0100 -+++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java 2012-08-29 13:51:21.605694085 +0100 +--- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java 2012-09-24 21:55:46.000000000 +0100 ++++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java 2012-09-26 02:21:47.753128270 +0100 @@ -1316,7 +1316,7 @@ protected void shutdownServants(boolean wait_for_completion) { Set oaset; @@ -23,8 +23,8 @@ for (ObjectAdapterFactory oaf : oaset) diff -Nru openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java ---- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java 2012-08-29 13:24:52.000000000 +0100 -+++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java 2012-08-29 13:51:21.605694085 +0100 +--- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java 2012-09-24 21:55:46.000000000 +0100 ++++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/orbutil/threadpool/ThreadPoolImpl.java 2012-09-26 02:21:47.753128270 +0100 @@ -108,7 +108,7 @@ private ThreadGroup threadGroup; @@ -44,8 +44,8 @@ for (WorkerThread wt : copy) { diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/TypeResolver.java openjdk-boot/jdk/src/share/classes/com/sun/beans/TypeResolver.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-29 13:52:15.526449232 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-09-24 21:55:52.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-09-26 02:21:47.753128270 +0100 @@ -46,7 +46,7 @@ */ public final class TypeResolver { @@ -65,9 +65,9 @@ CACHE.put(actual, map); } diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java 2012-08-29 13:51:21.605694085 +0100 -@@ -103,9 +103,9 @@ +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java 2012-09-24 21:55:52.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Attribute.java 2012-09-26 02:21:47.753128270 +0100 +@@ -104,9 +104,9 @@ return this.def.compareTo(that.def); } @@ -80,7 +80,7 @@ // Canonicalized lists of trivial attrs (Deprecated, etc.) // are used by trimToSize, in order to reduce footprint -@@ -115,7 +115,7 @@ +@@ -116,7 +116,7 @@ synchronized (canonLists) { List cl = canonLists.get(al); if (cl == null) { @@ -89,7 +89,7 @@ cl.addAll(al); cl = Collections.unmodifiableList(cl); canonLists.put(al, cl); -@@ -336,9 +336,9 @@ +@@ -337,9 +337,9 @@ public void addAttribute(Attribute a) { if (attributes == null) @@ -101,7 +101,7 @@ attributes.add(a); } -@@ -346,7 +346,7 @@ +@@ -347,7 +347,7 @@ if (attributes == null) return null; if (!attributes.contains(a)) return null; if (!(attributes instanceof ArrayList)) @@ -138,8 +138,8 @@ for (int i = 0; i < layout.length(); i++) { if (layout.charAt(i++) != '[') diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java 2012-08-29 13:50:51.345270734 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java 2012-09-26 02:14:39.446727849 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/BandStructure.java 2012-09-26 02:24:51.519895668 +0100 @@ -257,7 +257,7 @@ assert(basicCodings[_meta_default] == null); assert(basicCodings[_meta_canon_min] != null); @@ -169,7 +169,7 @@ // Well-known attributes: protected final Attribute.Layout attrCodeEmpty; -@@ -1713,16 +1713,16 @@ +@@ -1713,11 +1713,11 @@ protected final Attribute.Layout attrConstantValue; // Mapping from Attribute.Layout to Integer (inverse of attrDefs) @@ -183,15 +183,9 @@ { for (int i = 0; i < ATTR_CONTEXT_LIMIT; i++) { assert(attrIndexLimit[i] == 0); - attrIndexLimit[i] = 32; // just for the sake of predefs. -- attrDefs.set(i, new ArrayList<>(Collections.nCopies( -+ attrDefs.set(i, new ArrayList(Collections.nCopies( - attrIndexLimit[i], (Attribute.Layout)null))); - - } @@ -1912,7 +1912,7 @@ - protected List getPredefinedAttrs(int ctype) { + protected List getPredefinedAttrs(int ctype) { assert(attrIndexLimit[ctype] != 0); - List res = new ArrayList<>(attrIndexLimit[ctype]); + List res = new ArrayList(attrIndexLimit[ctype]); @@ -208,8 +202,8 @@ return true; } diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java 2012-08-29 13:50:51.209268832 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java 2012-09-26 02:14:39.310725828 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ClassReader.java 2012-09-26 02:21:47.753128270 +0100 @@ -466,7 +466,7 @@ void readInnerClasses(Class cls) throws IOException { @@ -220,8 +214,8 @@ InnerClass ic = new InnerClass(readClassRef(), diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java 2012-09-24 21:55:52.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/CodingChooser.java 2012-09-26 02:21:47.753128270 +0100 @@ -743,9 +743,9 @@ // Steps 1/2/3 are interdependent, and may be iterated. // Steps 4 and 5 may be decided independently afterward. @@ -258,8 +252,8 @@ if (popset.add(values[i])) popvals.add(values[i]); } diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java 2012-09-24 21:55:52.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Coding.java 2012-09-26 02:21:47.753128270 +0100 @@ -402,7 +402,7 @@ private static Map codeMap; @@ -270,9 +264,9 @@ Coding x1 = codeMap.get(x0); if (x1 == null) codeMap.put(x0, x1 = x0); diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java 2012-08-29 13:51:21.609694141 +0100 -@@ -915,7 +915,7 @@ +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java 2012-09-24 21:55:52.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/ConstantPool.java 2012-09-26 02:21:47.753128270 +0100 +@@ -919,7 +919,7 @@ public static Index[] partition(Index ix, int[] keys) { // %%% Should move this into class Index. @@ -281,7 +275,7 @@ Entry[] cpMap = ix.cpMap; assert(keys.length == cpMap.length); for (int i = 0; i < keys.length; i++) { -@@ -926,7 +926,7 @@ +@@ -930,7 +930,7 @@ } List part = parts.get(key); if (part == null) { @@ -290,7 +284,7 @@ } part.add(cpMap[i]); } -@@ -1133,7 +1133,7 @@ +@@ -1137,7 +1137,7 @@ void completeReferencesIn(Set cpRefs, boolean flattenSigs) { cpRefs.remove(null); for (ListIterator work = @@ -300,8 +294,8 @@ Entry e = work.previous(); work.remove(); // pop stack diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-08-29 13:50:51.345270734 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-09-26 02:14:39.446727849 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Driver.java 2012-09-26 02:21:47.753128270 +0100 @@ -61,7 +61,7 @@ ResourceBundle.getBundle("com.sun.java.util.jar.pack.DriverResource"); @@ -339,8 +333,8 @@ for (String optline : options.split("\n")) { String[] words = optline.split("\\p{Space}+"); diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java 2012-09-24 21:55:52.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/FixedList.java 2012-09-26 02:21:47.753128270 +0100 @@ -45,7 +45,7 @@ private final ArrayList flist; @@ -350,35 +344,9 @@ // initialize the list to null for (int i = 0 ; i < capacity ; i++) { flist.add(null); -diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Fixups.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Fixups.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Fixups.java 2012-08-29 13:24:58.000000000 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Fixups.java 2012-08-29 13:51:21.609694141 +0100 -@@ -126,11 +126,11 @@ - public void setBytes(byte[] newBytes) { - if (bytes == newBytes) return; - ArrayList old = null; -- assert((old = new ArrayList<>(this)) != null); -+ assert((old = new ArrayList(this)) != null); - if (bytes == null || newBytes == null) { - // One or the other representations is deficient. - // Construct a checkpoint. -- ArrayList save = new ArrayList<>(this); -+ ArrayList save = new ArrayList(this); - clear(); - bytes = newBytes; - addAll(save); -@@ -138,7 +138,7 @@ - // assume newBytes is some sort of bitwise copy of the old bytes - bytes = newBytes; - } -- assert(old.equals(new ArrayList<>(this))); -+ assert(old.equals(new ArrayList(this))); - } - - static final int LOC_SHIFT = 1; diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java 2012-08-29 13:50:51.209268832 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java 2012-09-26 02:14:39.314725887 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/Package.java 2012-09-26 02:25:05.996114187 +0100 @@ -112,7 +112,7 @@ public static final Attribute.Layout attrSourceFileSpecial; public static final Map attrDefs; @@ -397,7 +365,7 @@ public List getClasses() { return classes; -@@ -263,7 +263,7 @@ +@@ -264,7 +264,7 @@ if (olda == null) return; // no SourceFile attr. String obvious = getObviousSourceFile(); @@ -406,7 +374,7 @@ olda.visitRefs(this, VRM_PACKAGE, ref); Utf8Entry sfName = (Utf8Entry) ref.get(0); Attribute a = olda; -@@ -291,7 +291,7 @@ +@@ -292,7 +292,7 @@ if (a != olda) { if (verbose > 2) Utils.log.fine("recoding obvious SourceFile="+obvious); @@ -415,7 +383,7 @@ int where = newAttrs.indexOf(olda); newAttrs.set(where, a); setAttributes(newAttrs); -@@ -321,7 +321,7 @@ +@@ -322,7 +322,7 @@ } public void setInnerClasses(Collection ics) { @@ -424,7 +392,7 @@ // Edit the attribute list, if necessary. Attribute a = getAttribute(attrInnerClassesEmpty); if (innerClasses != null && a == null) -@@ -340,7 +340,7 @@ +@@ -341,7 +341,7 @@ * with that of Package.this.allInnerClasses. */ public List computeGloballyImpliedICs() { @@ -433,7 +401,7 @@ { // This block temporarily displaces this.innerClasses. ArrayList innerClassesSaved = innerClasses; innerClasses = null; // ignore for the moment -@@ -349,7 +349,7 @@ +@@ -350,7 +350,7 @@ } ConstantPool.completeReferencesIn(cpRefs, true); @@ -442,7 +410,7 @@ for (Entry e : cpRefs) { // Restrict cpRefs to InnerClasses entries only. if (!(e instanceof ClassEntry)) continue; -@@ -365,7 +365,7 @@ +@@ -366,7 +366,7 @@ // This loop is structured this way so as to accumulate // entries into impliedICs in an order which reflects // the order of allInnerClasses. @@ -451,7 +419,7 @@ for (InnerClass ic : allInnerClasses) { // This one is locally relevant if it describes // a member of the current class, or if the current -@@ -408,8 +408,8 @@ +@@ -409,8 +409,8 @@ // Diff is A since I is empty. } // (I*A) is non-trivial @@ -462,7 +430,7 @@ impliedICs.addAll(actualICs); impliedICs.removeAll(center); // Diff is now I^A = (I+A)-(I*A). -@@ -538,7 +538,7 @@ +@@ -539,7 +539,7 @@ super(flags, descriptor); assert(!descriptor.isMethod()); if (fields == null) @@ -471,7 +439,7 @@ boolean added = fields.add(this); assert(added); order = fields.size(); -@@ -563,7 +563,7 @@ +@@ -564,7 +564,7 @@ super(flags, descriptor); assert(descriptor.isMethod()); if (methods == null) @@ -480,7 +448,7 @@ boolean added = methods.add(this); assert(added); } -@@ -728,14 +728,14 @@ +@@ -732,14 +732,14 @@ } // What non-class files are in this unit? @@ -497,25 +465,16 @@ for (Class cls : classes) { assert(cls.file.isClassStub()); classStubs.add(cls.file); -@@ -749,7 +749,7 @@ - int modtime = NO_MODTIME; - int options = 0; // random flag bits, such as deflate_hint - Class stubClass; // if this is a stub, here's the class -- ArrayList prepend = new ArrayList<>(); // list of byte[] -+ ArrayList prepend = new ArrayList(); // list of byte[] - java.io.ByteArrayOutputStream append = new ByteArrayOutputStream(); - - File(Utf8Entry name) { -@@ -852,7 +852,7 @@ +@@ -859,7 +859,7 @@ public InputStream getInputStream() { InputStream in = new ByteArrayInputStream(append.toByteArray()); if (prepend.isEmpty()) return in; - List isa = new ArrayList<>(prepend.size()+1); + List isa = new ArrayList(prepend.size()+1); - for (byte[] bytes : prepend) { + for (Iterator i = prepend.iterator(); i.hasNext(); ) { + byte[] bytes = (byte[]) i.next(); isa.add(new ByteArrayInputStream(bytes)); - } -@@ -888,7 +888,7 @@ +@@ -896,7 +896,7 @@ } // Is there a globally declared table of inner classes? @@ -524,7 +483,7 @@ Map allInnerClassesByThis; public -@@ -903,7 +903,7 @@ +@@ -911,7 +911,7 @@ allInnerClasses.addAll(ics); // Make an index: @@ -533,7 +492,7 @@ for (InnerClass ic : allInnerClasses) { Object pic = allInnerClassesByThis.put(ic.thisClass, ic); assert(pic == null); // caller must ensure key uniqueness! -@@ -1290,7 +1290,7 @@ +@@ -1302,7 +1302,7 @@ // Use this before writing the class files. void ensureAllClassFiles() { @@ -543,8 +502,8 @@ // Add to the end of ths list: if (!fileSet.contains(cls.file)) diff -Nru openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java ---- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2012-08-29 13:50:51.349270790 +0100 -+++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2012-08-29 13:51:21.609694141 +0100 +--- openjdk-boot.orig/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2012-09-26 02:14:39.446727849 +0100 ++++ openjdk-boot/jdk/src/share/classes/com/sun/java/util/jar/pack/PackageReader.java 2012-09-26 02:23:17.530478725 +0100 @@ -686,7 +686,7 @@ cp_Signature_classes.expectLength(getIntTotal(numSigClasses)); cp_Signature_classes.readFrom(in); @@ -631,15 +590,15 @@ bits = attrBits; // iterate again for (int ai = 0; bits != 0; ai++) { @@ -1596,7 +1596,7 @@ - void readAttrs(int ctype, Collection holders) - throws IOException { + @SuppressWarnings("unchecked") + void readAttrs(int ctype, Collection holders) throws IOException { // Decode band values into attributes. - Set sawDefs = new HashSet<>(); + Set sawDefs = new HashSet(); ByteArrayOutputStream buf = new ByteArrayOutputStream(); - for (final Attribute.Holder h : holders) { - if (h.attributes == null) continue; -@@ -1799,7 +1799,7 @@ + for (Iterator i = holders.iterator(); i.hasNext(); ) { + final Attribute.Holder h = (Attribute.Holder) i.next(); +@@ -1800,7 +1800,7 @@ // scratch buffer for collecting code:: byte[] buf = new byte[1<<12]; // record of all switch opcodes (these are variable-length) @@ -648,7 +607,7 @@ for (int k = 0; k < allCodes.length; k++) { Code c = allCodes[k]; scanOneMethod: From helpcrypto at gmail.com Wed Sep 26 07:50:08 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 26 Sep 2012 16:50:08 +0200 Subject: Moving applet from Oracle jre: first tries Message-ID: Hi all If this is not the correct place to ask, please tell me. We have developed an applet actually running on OSX and Windows (even on Linux using Oracle JRE), but doesnt run properly on icedtea-plugin/openjdk-7. I have enabled logging this way: ICEDTEAPLUGIN_DEBUG=true firefox 2>&1 | tee plugin.log Is that correct? The output log is spplited in plugin.log, java.stdout and java.stderr. Is there any way to get a full trace on a file where i can see the complete sequence? Looking in more detail i have an NullPointerException cause System.getProperty("deployment.user.security.trusted.cacerts"); is not working. Which property should i use to get JRE keystore? Should i file a bug for that? From dbhole at redhat.com Wed Sep 26 08:45:13 2012 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 26 Sep 2012 11:45:13 -0400 Subject: Moving applet from Oracle jre: first tries In-Reply-To: References: Message-ID: <20120926154513.GQ23406@redhat.com> * helpcrypto helpcrypto [2012-09-26 10:59]: > Hi all > > If this is not the correct place to ask, please tell me. > > We have developed an applet actually running on OSX and Windows (even > on Linux using Oracle JRE), but doesnt run properly on > icedtea-plugin/openjdk-7. > > I have enabled logging this way: > ICEDTEAPLUGIN_DEBUG=true firefox 2>&1 | tee plugin.log > Is that correct? > The output log is spplited in plugin.log, java.stdout and java.stderr. > Is there any way to get a full trace on a file where i can see the > complete sequence? > > Looking in more detail i have an NullPointerException cause > System.getProperty("deployment.user.security.trusted.cacerts"); is not > working. > > Which property should i use to get JRE keystore? Should i file a bug for that? Hi, That property looks correct to me. It is odd that it is null. java.stderr should have the full trace unless it is being swallowed unintentionally somewhere. Why do you need to access the trust store via the applet by the way? Cheers, Deepak From helpcrypto at gmail.com Wed Sep 26 09:02:18 2012 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 26 Sep 2012 18:02:18 +0200 Subject: Moving applet from Oracle jre: first tries In-Reply-To: <20120926154513.GQ23406@redhat.com> References: <20120926154513.GQ23406@redhat.com> Message-ID: > Hi, > > That property looks correct to me. It is odd that it is null. Linux pc 3.2.0-31-generic-pae #50-Ubuntu SMP Fri Sep 7 16:39:45 UTC 2012 i686 athlon i386 GNU/Linux java version "1.7.0_07" OpenJDK Runtime Environment (IcedTea7 2.3.2) (7u7-2.3.2a-0ubuntu0.12.04.1) OpenJDK Client VM (build 23.2-b09, mixed mode, sharing) ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 Alternative JVM for OpenJDK, using JamVM ii openjdk-7-jre 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime, using Hotspot JIT ii openjdk-7-jre-headless 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime, using Hotspot JIT (headless) ii openjdk-7-jre-lib 7u7-2.3.2a-0ubuntu0.12.04.1 OpenJDK Java runtime (architecture independent libraries) ii icedtea-7-jre-jamvm 7u7-2.3.2a-0ubuntu0.12.04.1 Alternative JVM for OpenJDK, using JamVM ii icedtea-7-plugin 1.2-2ubuntu1.2 web browser plugin based on OpenJDK and IcedTea to execute Java applets ii icedtea-netx 1.2-2ubuntu1.2 NetX - implementation of the Java Network Launching Protocol (JNLP) ii icedtea-netx-common 1.2-2ubuntu1.2 NetX - implementation of the Java Network Launching Protocol (JNLP) Mozilla Firefox 15.0.1 /etc/alternatives/mozilla-javaplugin.so -> /usr/lib/jvm/java-7-openjdk-i386/jre/lib/i386/IcedTeaPlugin.so > java.stderr should have the full trace unless it is being swallowed > unintentionally somewhere. My System.out.println messages are on stdout, while other things are on stderr (thats quite ok, in fact). Is there something like a Java Console??? or a way to have them all merged as a trace? > Why do you need to access the trust store via the applet by the way? To add a trusted cert to keystore (its working like a configuration applet) Thanks a lot for your help! From jfabriko at redhat.com Wed Sep 26 10:53:07 2012 From: jfabriko at redhat.com (Jana Fabrikova) Date: Wed, 26 Sep 2012 19:53:07 +0200 Subject: [rfc][icedtea-web] fixing one of the closing listeners In-Reply-To: <50605228.7060809@redhat.com> References: <50605228.7060809@redhat.com> Message-ID: <50634103.1040900@redhat.com> 2012-09-26 Jana Fabrikova * /tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java: adding the name of the package into the java source file (package net.sourceforge.jnlp.closinglisteners) -------------- next part -------------- A non-text attachment was scrubbed... Name: StringMatchClosingListener.patch Type: text/x-patch Size: 647 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120926/5a19ad35/StringMatchClosingListener.patch From adomurad at redhat.com Wed Sep 26 11:57:37 2012 From: adomurad at redhat.com (Adam Domurad) Date: Wed, 26 Sep 2012 14:57:37 -0400 Subject: [rfc][icedtea-web] fixing one of the closing listeners In-Reply-To: <50634103.1040900@redhat.com> References: <50605228.7060809@redhat.com> <50634103.1040900@redhat.com> Message-ID: <1348685857.17801.25.camel@adomurad-desktop> On Wed, 2012-09-26 at 19:53 +0200, Jana Fabrikova wrote: > 2012-09-26 Jana Fabrikova > > * > /tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java: > adding the name of the package into the java source file > (package net.sourceforge.jnlp.closinglisteners) > > > > > Good catch! I shall commit this on your behalf. Thanks, Adam From adomurad at icedtea.classpath.org Wed Sep 26 12:14:10 2012 From: adomurad at icedtea.classpath.org (adomurad at icedtea.classpath.org) Date: Wed, 26 Sep 2012 19:14:10 +0000 Subject: /hg/icedtea-web: Fixed missing package declaration Message-ID: changeset cbf8e415c5bf in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=cbf8e415c5bf author: Adam Domurad date: Wed Sep 26 15:15:35 2012 -0400 Fixed missing package declaration diffstat: ChangeLog | 5 +++++ tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diffs (27 lines): diff -r 077a48d226c4 -r cbf8e415c5bf ChangeLog --- a/ChangeLog Tue Sep 25 19:04:30 2012 +0200 +++ b/ChangeLog Wed Sep 26 15:15:35 2012 -0400 @@ -1,3 +1,8 @@ +2012-09-26 Jana Fabrikova + + * tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java: + Added forgotten package name + 2012-09-25 Jiri Vanek Added rules listeners diff -r 077a48d226c4 -r cbf8e415c5bf tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java --- a/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java Tue Sep 25 19:04:30 2012 +0200 +++ b/tests/test-extensions/net/sourceforge/jnlp/closinglisteners/StringMatchClosingListener.java Wed Sep 26 15:15:35 2012 -0400 @@ -34,10 +34,10 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +package net.sourceforge.jnlp.closinglisteners; import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; - public class StringMatchClosingListener extends StringBasedClosingListener { public StringMatchClosingListener(String s) { From bugzilla-daemon at icedtea.classpath.org Wed Sep 26 13:05:48 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 26 Sep 2012 20:05:48 +0000 Subject: [Bug 1177] New: Blackboard Collaborate - Fatal error trying to verify jars Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1177 Priority: P3 Bug ID: 1177 CC: unassigned at icedtea.classpath.org Assignee: omajid at redhat.com Summary: Blackboard Collaborate - Fatal error trying to verify jars Severity: normal Classification: Unclassified OS: Linux Reporter: pietila.meghan at gmail.com Hardware: x86 Status: NEW Version: 1.2 Component: NetX (javaws) Product: IcedTea-Web Blackboard Collaborate sessions will no longer load. On September 20, sessions were working. On September 24, they were not. No updates were run on the client computer during this time (so presumably Blackboard Collaborate jars were changed in some way in the interim, or their certificate expired). The following is a url to a Blackboard Collaborate page with a link to a test session that causes this problem: http://support.blackboardcollaborate.com/ics/support/default.asp?deptID=8336&task=knowledge&questionID=1473 JARs download, then error (stacktrace follows) net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application. at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:778) at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889) Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: A fatal error occurred while trying to verify jars. at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:482) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:201) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:320) at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770) ... 2 more Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: A fatal error occurred while trying to verify jars. at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:482) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:201) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:320) at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:770) at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:889) -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120926/bde96421/attachment.html From smohammad at redhat.com Wed Sep 26 15:21:31 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Wed, 26 Sep 2012 18:21:31 -0400 Subject: [RFC][icedtea-web]: Fix PR909 - The Java applet at http://de.gosupermodel.com/games/wardrobegame.jsp fails In-Reply-To: <50570F99.1060506@redhat.com> References: <85828911.69079417.1347544752233.JavaMail.root@redhat.com> <50570F99.1060506@redhat.com> Message-ID: <50637FEB.6090709@redhat.com> Hello, I have taken a look into URI.encode() and it seems to be doing the percent encoding correctly. Please take a look at my patch and let me know if you have any objections to this way of 'normalizing' an URL. Thanks! ChangeLog: 2012-09-26 Saad Mohammad Fix PR909 - URL is invalid after normalization. * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (normalizeUrl): Converts the URL to an URI object which handles all percent encodings. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: patch0-7.patch Type: text/x-patch Size: 6091 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120926/42867496/patch0-7.patch From bugzilla-daemon at icedtea.classpath.org Thu Sep 27 07:55:31 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 27 Sep 2012 14:55:31 +0000 Subject: [Bug 1177] Blackboard Collaborate - Fatal error trying to verify jars In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1177 Adam Domurad changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adomurad at redhat.com --- Comment #1 from Adam Domurad --- Hi Meghan, thanks for the bug report. I'm unable to reproduce this using Java 7 + ITW 1.2 or 1.3. What version of ITW and what Linux distribution are you using ? When you say 'test session' you are referring to links in the section "STEP 2: Configuring your system", correct ? Perhaps you can also try clearing the cache with javaws -Xclearcache or removing ~/.icedtea. If it still fails, please run with ICEDTEAPLUGIN_DEBUG=true javaws and give the resulting log here. Thanks, - Adam. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/ee8b3fa8/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 27 08:32:58 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 27 Sep 2012 15:32:58 +0000 Subject: [Bug 1177] Blackboard Collaborate - Fatal error trying to verify jars In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1177 --- Comment #2 from Meghan Pietila --- I am running Ubuntu 12.04, ITW 1.2, and Java 1.6.0_24. Ran all Ubuntu updates yesterday. By 'test session', I do mean the links in "STEP 2: Configuring your system", sorry for not being more clear. Specifically, version 12 is the one I am attempting to use. I have tried clearing the cache both through removing ~/.icedtea and through the IcedTea Control Panel. Just to be sure I can run javaws -Xclearcache as well. Log to follow. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/fd89a081/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 27 08:39:17 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 27 Sep 2012 15:39:17 +0000 Subject: [Bug 1177] Blackboard Collaborate - Fatal error trying to verify jars In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1177 Meghan Pietila changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #3 from Meghan Pietila --- And... it works this morning. I had not tried clearing my cache since running the Ubuntu updates yesterday - maybe I picked up something in the updates that fixed the problem, but needed a clean cache. I had run rm -rf ~/.icedtea/cache first thing today. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/6fd3db68/attachment.html From bugzilla-daemon at icedtea.classpath.org Thu Sep 27 10:17:42 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 27 Sep 2012 17:17:42 +0000 Subject: [Bug 1166] Embedded JNLP File is not supported in applet tag In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1166 Saad Mohammad changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Applet fails to load using |Embedded JNLP File is not |jnlp_href: |supported in applet tag |http://docs.oracle.com/java | |se/tutorial/deployment/depl | |oymentInDepth/examples/dist | |/depl_EmbeddingJNLPInWebPag | |e/AppletPage.html | --- Comment #1 from Saad Mohammad --- More details on this feature: http://docs.oracle.com/javase/tutorial/deployment/deploymentInDepth/embeddingJNLPFileInWebPage.html -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/98cb9b16/attachment.html From smohammad at redhat.com Thu Sep 27 10:42:14 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Thu, 27 Sep 2012 13:42:14 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag Message-ID: <50648FF6.408@redhat.com> Hi, The patch attached fixes PR1166: Thanks. Changelog: 2012-09-27 Saad Mohammad Fix PR1166: Embedded JNLP File is not supported in applet tag. * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): New constructor which accepts inputstream of jnlp file and a specified codebase. * netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): Supports embedded jnlp file. -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: Changelog-News-0-1.patch Type: text/x-patch Size: 1006 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/f98b8234/Changelog-News-0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: fix0-1.patch Type: text/x-patch Size: 2644 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/f98b8234/fix0-1.patch From bugzilla-daemon at icedtea.classpath.org Thu Sep 27 11:05:52 2012 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 27 Sep 2012 18:05:52 +0000 Subject: [Bug 1177] Blackboard Collaborate - Fatal error trying to verify jars In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1177 --- Comment #4 from Adam Domurad --- Glad it works! Consider also using the newest version of icedtea, some of the fixes & features are detailed here: https://dbhole.wordpress.com/2012/09/05/icedtea-web-1-3-released/ -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120927/e686eb6e/attachment.html From adomurad at redhat.com Fri Sep 28 07:32:28 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 28 Sep 2012 10:32:28 -0400 Subject: [icedtea-web][rfc] Update on Danesh's major rework of JarCertVerifier In-Reply-To: <1348585163.17801.24.camel@adomurad-desktop> References: <1348585163.17801.24.camel@adomurad-desktop> Message-ID: <1348842748.17801.29.camel@adomurad-desktop> This is a reproducer for cases where jar's have multiple signers. (This only makes sense in the context of the other patches, because it relies on checking for the new message that is printed when jars have improperly mixed signage.) This test will pass as long as jcv-major-rework-02.patch and NewMessage.patch are properly applied. (Note that for some reason I have to manually merge the results of messages.properties, not sure why) ChangeLog: 2012-09-28 Adam Domurad Reproduces PR822: Applets fail to load if jars have different signers. Tests for applets & JNLPs with multiple signers per jar. * tests/reproducers/signed/ReadPropertiesSigned/srcs/ReadPropertiesSigned.java: Modified to end with standard applet finish message. * tests/reproducers/simple/ReadProperties/srcs/ReadProperties.java: * tests/reproducers/custom/MultipleSignaturesPerJar/README: Explains dependence on ReadPropertiesSigned. * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMatching.html: HTML applet test with a common signer. * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMatching.jnlp: JNLP test with a common signer. * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMismatching.html: HTML applet test without a common signer. * tests/reproducers/custom/MultipleSignaturesPerJar/resources/MultipleSignaturesPerJarMismatching.jnlp: JNLP test without a common signer. * tests/reproducers/custom/MultipleSignaturesPerJar/srcs/Makefile: Custom makefile used to sign a jar with multiple signers. * tests/reproducers/custom/MultipleSignaturesPerJar/srcs/somecrazytestpackage/MultipleSignaturesPerJarMain.java: Accesses ReadPropertiesSigned from another package with different signers. * tests/reproducers/custom/MultipleSignaturesPerJar/testcases/MultipleSignaturesPerJarTests.java: Test driver. -------------- next part -------------- A non-text attachment was scrubbed... Name: ChangeLog Type: text/x-changelog Size: 1487 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120928/6f0e60e3/ChangeLog.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: PR822repro.patch Type: text/x-patch Size: 24367 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120928/6f0e60e3/PR822repro.patch From adomurad at redhat.com Fri Sep 28 11:36:46 2012 From: adomurad at redhat.com (Adam Domurad) Date: Fri, 28 Sep 2012 14:36:46 -0400 Subject: [RFC][icedtea-web]: DownloadService implementation In-Reply-To: <50609F44.2040102@redhat.com> References: <50411B4E.8080308@redhat.com> <50609F44.2040102@redhat.com> Message-ID: <1348857406.17801.92.camel@adomurad-desktop> On Mon, 2012-09-24 at 13:58 -0400, Saad Mohammad wrote: > Hello, > > I found a little bug while writing the reproducer for this implementation. I > have fixed this issue and attached the updated patch with a Changelog entry > (sorry, I somehow missed adding the Changelog entry in the previous email). > > Thanks. > > Changelog: > > 2012-09-07 Saad Mohammad > > Core implementation of DownloadService. > * netx/net/sourceforge/jnlp/cache/CacheUtil.java (getCacheParentDirectory): > Returns the parent directory of the cached resource. > * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: > (addNewJar): Adds a new jar to the classloader with specified > UpdatePolicy. > (getLoaderByJnlpUrl): Returns the classloader of the jnlp file > specified. > (getLoaderByResourceUrl): Returns the classloader that contains the > specified jar. > (getJars): Returns jars from the JNLP file with the specified > partname. > (removeCachedJars): Removes jar from cache. > (removeJars): Help removeCachedJars() remove jars from the > filesystem. > (downloadJars): Downloads jars identified by part name. > (initializeNewJarDownload): Downloads and initializes jars into the > current loader. > (manageExternalJars): Manages jars that are not mentioned in the > JNLP file. > (loadExternalResouceToCache): Used by DownloadService to download > and initalize resources that are not mentioned in the jnlp file. > (removeExternalCachedResource): Used by DownloadService to remove > resources from cache that are not mentioned in the jnlp file. > (isExternalResourceCached): Determines if the resource that is not > mentioned in the jnlp file is cached and returns a boolean with the > result. > * netx/net/sourceforge/jnlp/services/XDownloadService.java: > Core implementation of DownloadService. > > Thanks for the implementation ! Comments inline. > diff --git a/netx/net/sourceforge/jnlp/cache/CacheUtil.java b/netx/net/sourceforge/jnlp/cache/CacheUtil.java > --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java > @@ -367,6 +367,17 @@ > } > > /** > + * Returns the parent directory of the cached resource. > + * @param path The path of the cached resource directory. > + */ > + public static String getCacheParentDirectory(String path) { Less fragile is: return new File(path).getParent(); File.separatorChar will cause problems with Unix-style paths on Windows :) (Yes... *someone* might run this on Windows.) > + int len = cacheDir.length(); > + int index = path.indexOf(File.separatorChar, len + 1); > + String test = path.substring(0, index); > + return test + "/"; > + } > + > + /** > * This will create a new entry for the cache item. It is however not > * initialized but any future calls to getCacheFile with the source and > * version given to here, will cause it to return this item. > diff --git a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java As we discussed on IRC, this class is already > 2250 lines! Any more and it'll surely collapse into a black hole. :) I'm guilty of hacking on lines to this class too, but it really needs to shrink. A bunch of this new logic should be part of its own class. JNLPClassLoader can stand to benefit from the 'one class, one purpose' idea. The question then remains where the logic should go. I'm guessing the add/removeJars must stay in JNLPClassLoader, but not much else. I think the cleanest solution is to have a class with static methods that operates on JNLPClassLoader. The public interface AFAICS is: public void loadExternalResouceToCache(URL ref, String version) public void removeExternalCachedResource(URL ref, String version) public boolean isExternalResourceCached(URL ref, String version) So I'm thinking the rest of the methods would be private static within this class, all take a JNLPClassLoader as their first parameter. I guess a good name for this would be 'JNLPExternalCachedResources'. This, at least to me, sounds like a class full of static method (somewhat like "Arrays"). But, name it whatever seems natural to you. > @@ -104,6 +104,13 @@ > final public static String TEMPLATE = "JNLP-INF/APPLICATION_TEMPLATE.JNLP"; > final public static String APPLICATION = "JNLP-INF/APPLICATION.JNLP"; > > + /** Actions to specify how cache is to be managed **/ > + static class DownloadAction{ Absolute nit here, but I like a space before {, ie "static class DownloadAction {". More concrete though, this should definitely be an enum. > + final static int DOWNLOADTOCACHE = 1; Underscores separating all-caps constants seems to be a bit more consistent with the rest of ITW. (alt+shift+r will rename things it in Eclipse in a pinch, in case you aren't familiar with/forget the shortcut) >+ final static int REMOVEFROMCACHE = 2; > + final static int CHECKCACHE = 3; > + } > + > /** True if the application has a signed JNLP File */ > private boolean isSignedJNLP = false; > > @@ -1622,13 +1629,22 @@ > * @param desc the JARDesc for the new jar > */ > private void addNewJar(final JARDesc desc) { > + this.addNewJar(desc, JNLPRuntime.getDefaultUpdatePolicy()); > + } > + > + /** > + * Adds a new JARDesc into this classloader. > + * @param desc the JARDesc for the new jar > + * @param updatePolicy the UpdatePolicy for the resource > + */ > + private void addNewJar(final JARDesc desc, UpdatePolicy updatePolicy) { > > available.add(desc); > > tracker.addResource(desc.getLocation(), > desc.getVersion(), > null, > - JNLPRuntime.getDefaultUpdatePolicy() > + updatePolicy > ); > > // Give read permissions to the cached jar file > @@ -2112,6 +2128,253 @@ > } > > /** > + * Locates the JNLPClassLoader of the JNLP file. > + * > + * @param urlToJnlpFile Path of the JNLP file. If null, main JNLP's file location > + * be used instead > + * @return the JNLPClassLoader of the JNLP file. > + */ > + protected JNLPClassLoader getLoaderByJnlpUrl(URL urlToJnlpFile) { > + > + if (urlToJnlpFile == null) > + urlToJnlpFile = file.getFileLocation(); > + > + for (int i = 0; i < loaders.length; i++) { > + if (file.getFileLocation().equals(urlToJnlpFile)) { > + return this; > + } This can be out of the loop. > + else if (i < loaders.length - 1) { > + JNLPClassLoader foundLoader = loaders[i + 1].getLoaderByJnlpUrl(urlToJnlpFile); > + > + if (foundLoader != null) > + return foundLoader; > + } > + } This logic is a little hard to follow, wouldn't this rephrasing of the loop: if (file.getFileLocation().equals(urlToJnlpFile)) { return this; } for (JNLPClassLoader loader : loaders) { if (loader != this) { JNLPClassLoader foundLoader = loader.getLoaderByJnlpUrl(urlToJnlpFile); if (foundLoader != null) { return foundLoader; } } } Does the same thing (I believe?) + its more explicit than relying on [0] == this. Logic like this probably could live outside of the class itself. > + > + return null; > + } > + > + /** > + * Locates the JNLPClassLoader of the JNLP file's resource. > + * > + * @param urlToJnlpFile Path of the launch or extension JNLP File. If null, > + * main JNLP's file location will be used instead. > + * @param version The version of resource. Is null if no version is specified > + * @return the JNLPClassLoader of the JNLP file's resource. > + */ > + protected JNLPClassLoader getLoaderByResourceUrl(URL ref, String version) { > + Version resourceVersion = (version == null) ? null : new Version(version); > + > + for (int i = 0; i < loaders.length; i++) { > + ResourcesDesc resources = loaders[i].getJNLPFile().getResources(); > + > + for (JARDesc eachJar : resources.getJARs()) { > + if (ref.equals(eachJar.getLocation()) && > + (resourceVersion == null || resourceVersion.equals(eachJar.getVersion()))) { > + return this; > + } > + } > + > + if (i < loaders.length - 1) { > + JNLPClassLoader foundLoader = loaders[i + 1].getLoaderByResourceUrl(ref, version); > + > + if (foundLoader != null) > + return foundLoader; > + } > + } > + return null; > + } I would prefer this as two loops: for (JNLPClassLoader loader : loaders) { ResourcesDesc resources = loaders[i].getJNLPFile().getResources(); for (JARDesc eachJar : resources.getJARs()) { if (ref.equals(eachJar.getLocation()) && (resourceVersion == null || resourceVersion.equals(eachJar.getVersion()))) { return this; } } } for (JNLPClassLoader loader : loaders) { if (loader != this) { JNLPClassLoader foundLoader = loader.getLoaderByResourceUrl(ref, version); if (foundLoader != null) { return foundLoader; } } } Assuming I understand the intent, anyhow. > + > + /** > + * Returns jars from the JNLP file with the part name provided. > + * > + * @param ref Path of the launch or extension JNLP File containing the > + * resource. If null, main JNLP's file location will be used instead. > + * @param part The name of the part. > + * @return jars found. > + */ > + public JARDesc[] getJars(URL ref, String part, Version version) { > + JNLPClassLoader foundLoader = this.getLoaderByJnlpUrl(ref); > + > + if (foundLoader != null) { > + ArrayList foundJars = new ArrayList(); Nit, but as a rule of thumb try and use the minimal interface needed as the declared type. So this would be List foundJars = new ArrayList();. This is probably a matter of taste in this case though, so proceed as you will. > + > + for (JARDesc eachJar : foundLoader.getJNLPFile().getResources().getJARs(part)) { 'foundLoader.getJNLPFile().getResources().getJARs(part)' is bit of a mouthful. Give it a temporary variable (or two :) perhaps ? > + if (version != null && version.equals(eachJar.getVersion())) { > + foundJars.add(eachJar); > + } > + else > + foundJars.add(eachJar); I must be missing something here. If (x) add jars else add jars ? Seems like the condition has no effect here. > + > + return (JARDesc[]) foundJars.toArray(new JARDesc[foundJars.size()]); Cast here isn't actually necessary. It always returns the type of array passed to 'toArray'. > + } > + > + } > + > + return null; The code is a lot easier to follow if this returns new JarDesc[]{}, ie an empty array, instead of null. This way you can consistently loop over the returned result. > + } > + > + /** > + * Removes jars from cache. > + * > + * @param ref Path of the launch or extension JNLP File containing the > + * resource. If null, main JNLP's file location will be used instead. > + * @param jars Jars marked for removal. > + */ > + public void removeCachedJars(URL ref, JARDesc[] jars) { > + JNLPClassLoader foundLoader = this.getLoaderByJnlpUrl(ref); > + > + if (foundLoader != null) > + foundLoader.removeJars(jars); > + } > + > + /** > + * Helps removeCachedJars() remove jars from the file system. > + * > + * @param jars Jars marked for removal. > + */ > + protected void removeJars(JARDesc[] jars) { > + > + if (jars == null || jars.length <= 0) I would be in favour of dropping this null check and instead making sure it gets an empty array consistently. As well the <= 0 check isn't needed as the loop will simply occur 0 times if so. (I like having less code :) > + return; > + > + for (int i = 0; i < jars.length; i++) { Consider a for-each loop here, they're tastier. > + > + try{ > + tracker.removeResource(jars[i].getLocation()); > + } catch (Exception e) { > + if (JNLPRuntime.isDebug()) { > + System.err.println(e.getMessage()); > + System.err.println("Failed to remove resource from tracker, continuing.."); > + } > + } > + > + File cachedFile = CacheUtil.getCacheFile(jars[i].getLocation(), null); > + String directoryUrl = CacheUtil.getCacheParentDirectory(cachedFile.getAbsolutePath()); > + > + File directory = new File(directoryUrl); > + > + if (JNLPRuntime.isDebug()) > + System.out.println("Deleting cached file: " + cachedFile.getAbsolutePath()); > + > + cachedFile.delete(); > + > + if (JNLPRuntime.isDebug()) > + System.out.println("Deleting cached directory: " + directory.getAbsolutePath()); > + > + directory.delete(); > + } > + } > + > + /** > + * Downloads jars identified by part name. > + * > + * @param ref Path of the launch or extension JNLP File containing the > + * resource. If null, main JNLP's file location will be used instead. > + * @param part The name of the path. > + */ > + public void downloadJars(URL ref, String part, Version version) { > + JNLPClassLoader foundLoader = this.getLoaderByJnlpUrl(ref); > + > + if (foundLoader != null) > + foundLoader.initializeNewJarDownload(ref, part, version); > + } > + > + /** > + * Downloads and initializes jars into this loader. > + * > + * @param ref Path of the launch or extension JNLP File containing the > + * resource. If null, main JNLP's file location will be used instead. > + * @param part The name of the path. > + * @throws LaunchException > + */ > + protected void initializeNewJarDownload(URL ref, String part, Version version) { > + JARDesc[] jars = getJars(ref, part, version); > + > + if (jars != null && jars.length > 0) With my null-eliminating suggestion, this check can be dropped entirely. > + for (JARDesc eachJar : jars) { > + > + if (JNLPRuntime.isDebug()) > + System.out.println("Downloading and initializing jar: " + eachJar.getLocation().toString()); > + > + this.addNewJar(eachJar, UpdatePolicy.FORCE); > + } > + } > + > + /** > + * Manages DownloadService jars which are not mentioned in the JNLP file > + * @param ref Path to the resource. > + * @param version The version of resource. If null, no version is specified. > + * @param action The action to perform with the resource. Either DOWNLOADTOCACHE, REMOVEFROMCACHE, or CHECKCACHE. > + * @return true if CHECKCACHE and the resource is cached. > + */ > + private boolean manageExternalJars(URL ref, String version, int action) { > + boolean approved = false; > + JNLPClassLoader foundLoader = this.getLoaderByResourceUrl(ref, version); > + Version resourceVersion = (version == null) ? null : new Version(version); > + > + if (foundLoader != null) { > + approved = true; > + } > + else if (ref.toString().startsWith(file.getCodeBase().toString())) Nit: Consider consistent {} around each case here, or around none (I prefer the latter) > + approved = true; > + else if (SecurityDesc.ALL_PERMISSIONS.equals(security.getSecurityType())) > + approved = true; > + > + if (approved) { > + if (foundLoader == null) > + foundLoader = this; > + > + if (action == DownloadAction.DOWNLOADTOCACHE) { > + JARDesc jd = new JARDesc(ref, resourceVersion, null, false, true, false, true); A temporary variable with an explanatory name could make it easier to tell what this JarDesc signifies. > + if (JNLPRuntime.isDebug()) > + System.out.println("Downloading and initializing jar: " + ref.toString()); > + > + foundLoader.addNewJar(jd); > + > + } else if (action == DownloadAction.REMOVEFROMCACHE) { > + JARDesc[] jd = { new JARDesc(ref, resourceVersion, null, false, true, false, true) }; Similarly here. > + foundLoader.removeJars(jd); > + } else if (action == DownloadAction.CHECKCACHE) { > + return CacheUtil.isCached(ref, resourceVersion); > + } > + } > + return false; > + } > + > + /** > + * Downloads and initalizes resources which are not mentioned in the jnlp file. > + * Used by DownloadService. > + * @param ref Path to the resource. > + * @param version The version of resource. If null, no version is specified. > + */ > + > + public void loadExternalResouceToCache(URL ref, String version) { > + this.manageExternalJars(ref, version, DownloadAction.DOWNLOADTOCACHE); > + } > + > + /** > + * Removes resource which are not mentioned in the jnlp file. > + * Used by DownloadService. > + * @param ref Path to the resource. > + * @param version The version of resource. If null, no version is specified. > + */ > + public void removeExternalCachedResource(URL ref, String version) { > + this.manageExternalJars(ref, version, DownloadAction.REMOVEFROMCACHE); > + } > + > + /** > + * Returns true if the resource (not mentioned in the jnlp file) is cached, otherwise false > + * Used by DownloadService. > + * @param ref Path to the resource. > + * @param version The version of resource. If null, no version is specified. > + * @return > + */ > + public boolean isExternalResourceCached(URL ref, String version) { > + return this.manageExternalJars(ref, version, DownloadAction.CHECKCACHE); > + } > + > + /** > * Decrements loader use count by 1 > * > * If count reaches 0, loader is removed from list of available loaders > @@ -2305,4 +2568,6 @@ > return null; > } > } > + > + > } > diff --git a/netx/net/sourceforge/jnlp/services/XDownloadService.java b/netx/net/sourceforge/jnlp/services/XDownloadService.java > --- a/netx/net/sourceforge/jnlp/services/XDownloadService.java > +++ b/netx/net/sourceforge/jnlp/services/XDownloadService.java > @@ -20,6 +20,12 @@ > import java.net.*; > import javax.jnlp.*; > > +import net.sourceforge.jnlp.JARDesc; > +import net.sourceforge.jnlp.Version; > +import net.sourceforge.jnlp.cache.CacheUtil; > +import net.sourceforge.jnlp.runtime.JNLPClassLoader; > +import net.sourceforge.jnlp.runtime.JNLPRuntime; > + > /** > * The DownloadService JNLP service. > * > @@ -28,10 +34,24 @@ > */ > class XDownloadService implements DownloadService { > > - protected XDownloadService() { > + static class XDownloadServiceHelper { > + JNLPClassLoader getClassLoader() { > + return (JNLPClassLoader) JNLPRuntime.getApplication().getClassLoader(); > + } I would prefer to simply have a package-private method as part of XDownloadService called getClassLoader, for testing purposes. In my opinion, the code would be simpler as this 'helper' class is difficult to understand the purpose of. > } > > - // comments copied from DownloadService interface > + private XDownloadServiceHelper dsHelper; > + > + protected XDownloadService() { I'd prefer 'package-private' over protected here. I don't think protected should be used in class that won't be inherited from. > + this(new XDownloadServiceHelper()); > + } > + > + protected XDownloadService(XDownloadServiceHelper helper) { > + dsHelper = helper; > + > + if (JNLPRuntime.isDebug()) > + System.out.println("Initalized Download Service"); > + } > > /** > * Returns a listener that will automatically display download > @@ -46,7 +66,19 @@ > * url and version) is cached locally. > */ > public boolean isExtensionPartCached(URL ref, String version, String part) { > - return true; > + boolean allCached = true; > + Version resourceVersion = (version == null) ? null : new Version(version); > + > + JARDesc[] jars = dsHelper.getClassLoader().getJars(ref, part, resourceVersion); > + > + if (jars == null || jars.length <= 0) > + return false; > + > + for (int i = 0; i < jars.length && allCached; i++) { > + allCached = CacheUtil.isCached(jars[i].getLocation(), resourceVersion); > + } > + > + return allCached; > } > > /** > @@ -54,7 +86,14 @@ > * url and version) are cached locally. > */ > public boolean isExtensionPartCached(URL ref, String version, String[] parts) { > - return true; > + boolean allCached = true; > + if (parts.length <= 0) > + return false; > + > + for (String eachPart : parts) > + allCached = this.isExtensionPartCached(ref, version, eachPart); > + > + return allCached; > } > > /** > @@ -64,7 +103,17 @@ > * the application. > */ > public boolean isPartCached(String part) { > - return true; > + boolean allCached = true; > + JARDesc[] jars = dsHelper.getClassLoader().getJars(null, part, null); > + > + if (jars == null || jars.length <= 0) > + return false; > + > + for (int i = 0; i < jars.length && allCached; i++) { > + allCached = CacheUtil.isCached(jars[i].getLocation(), null); > + } > + > + return allCached; > } > > /** > @@ -74,7 +123,14 @@ > * application. > */ > public boolean isPartCached(String[] parts) { > - return true; > + boolean allCached = true; > + if (parts.length <= 0) > + return false; > + > + for (String eachPart : parts) > + allCached = this.isPartCached(eachPart); > + > + return allCached; > } > > /** > @@ -83,7 +139,7 @@ > * application or extension. > */ > public boolean isResourceCached(URL ref, String version) { > - return true; > + return dsHelper.getClassLoader().isExternalResourceCached(ref, version); > } > > /** > @@ -92,6 +148,8 @@ > * @throws IOException > */ > public void loadExtensionPart(URL ref, String version, String[] parts, DownloadServiceListener progress) throws IOException { > + for (String eachPart : parts) > + this.loadExtensionPart(ref, version, eachPart, progress); > } > > /** > @@ -100,6 +158,8 @@ > * @throws IOException > */ > public void loadExtensionPart(URL ref, String version, String part, DownloadServiceListener progress) throws IOException { > + Version resourceVersion = (version == null) ? null : new Version(version); > + dsHelper.getClassLoader().downloadJars(ref, part, resourceVersion); > } > > /** > @@ -108,6 +168,8 @@ > * @throws IOException > */ > public void loadPart(String[] parts, DownloadServiceListener progress) throws IOException { > + for (String eachPart : parts) > + this.loadPart(eachPart, progress); > } > > /** > @@ -116,6 +178,7 @@ > * @throws IOException > */ > public void loadPart(String part, DownloadServiceListener progress) throws IOException { > + dsHelper.getClassLoader().downloadJars(null, part, null); > } > > /** > @@ -124,6 +187,7 @@ > * @throws IOException > */ > public void loadResource(URL ref, String version, DownloadServiceListener progress) throws IOException { > + dsHelper.getClassLoader().loadExternalResouceToCache(ref, version); > } > > /** > @@ -133,6 +197,9 @@ > * @throws IOException > */ > public void removeExtensionPart(URL ref, String version, String part) throws IOException { > + Version resourceVersion = (version == null) ? null : new Version(version); > + JARDesc[] jars = dsHelper.getClassLoader().getJars(ref, part, resourceVersion); > + dsHelper.getClassLoader().removeCachedJars(ref, jars); > } > > /** > @@ -142,6 +209,8 @@ > * @throws IOException > */ > public void removeExtensionPart(URL ref, String version, String[] parts) throws IOException { > + for (String eachPart : parts) > + this.removeExtensionPart(ref, version, eachPart); > } > > /** > @@ -151,6 +220,8 @@ > * @throws IOException > */ > public void removePart(String part) throws IOException { > + JARDesc[] jars = dsHelper.getClassLoader().getJars(null, part, null); > + dsHelper.getClassLoader().removeCachedJars(null, jars); > } > > /** > @@ -160,6 +231,8 @@ > * @throws IOException > */ > public void removePart(String[] parts) throws IOException { > + for (String eachPart : parts) > + this.removePart(eachPart); > } > > /** > @@ -169,6 +242,7 @@ > * @throws IOException > */ > public void removeResource(URL ref, String version) throws IOException { > + dsHelper.getClassLoader().removeExternalCachedResource(ref, version); > } > > } Good patch overall, thanks for filling out this missing piece of functionality! Cheers, - Adam From smohammad at redhat.com Fri Sep 28 13:11:47 2012 From: smohammad at redhat.com (Saad Mohammad) Date: Fri, 28 Sep 2012 16:11:47 -0400 Subject: [RFC][icedtea-web]: Fix PR1166 - Embedded JNLP File is not supported in applet tag In-Reply-To: <50648FF6.408@redhat.com> References: <50648FF6.408@redhat.com> Message-ID: <50660483.3030309@redhat.com> Hello, The reproducer for this bug is attached. I also found a small bug with embedded jnlps that use "." as its codebase, therefore I attached an updated bug fix that resolves this issue.(Added try/catch in Parser) Thanks. PR1166 ============================================================================== Bug Fix Changelog: 2012-09-28 Saad Mohammad Fix PR1166: Embedded JNLP File is not supported in applet tag. * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile): New constructor which accepts inputstream of jnlp file and a specified codebase. * netx/net/sourceforge/jnlp/Parser.java (Parser): If parsing of codebase fails, it will overwrite the codebase with the one passed in through parameters. * netx/net/sourceforge/jnlp/PluginBridge.java (PluginBridge): Supports embedded jnlp file. ============================================================================== Reproducer Changelog: 2012-09-28 Saad Mohammad Added reproducer for PR1166. * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlp.jnlp: Launching jnlp file that is used by jnlp_href in applet tag * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletNoCodebase.html: Applet with an embedded jnlp file with no codebase specified * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/EmbeddedJnlpInAppletWithDotCodebase.html: Applet with an embedded jnlp file with codebase set as a 'dot' * tests/reproducers/simple/EmbeddedJnlpInApplet/resources/JnlpInApplet.html: Applet with jnlp_href file. * tests/reproducers/simple/EmbeddedJnlpInApplet/srcs/EmbeddedJnlp.java: Simple class that outputs strings. * tests/reproducers/simple/EmbeddedJnlpInApplet/testcases/EmbeddedJnlpInAppletTest.java: Testcase that tests embedded jnlps in html pages. ============================================================================== -- Cheers, Saad Mohammad -------------- next part -------------- A non-text attachment was scrubbed... Name: Changelog-News-0-2.patch Type: text/x-patch Size: 1168 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120928/52d595ca/Changelog-News-0-2.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: fix0-2.patch Type: text/x-patch Size: 3663 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120928/52d595ca/fix0-2.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: ChangelogReproducer0-1.patch Type: text/x-patch Size: 1158 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120928/52d595ca/ChangelogReproducer0-1.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: reproducer0-1.patch Type: text/x-patch Size: 22797 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120928/52d595ca/reproducer0-1.patch From martin at minimum.se Sat Sep 29 06:28:05 2012 From: martin at minimum.se (Martin Olsson) Date: Sat, 29 Sep 2012 15:28:05 +0200 (CEST) Subject: [PATCH] fix two typos Message-ID: <4029a469ab4b032291e520fc277d1b5a.squirrel@webmail.minimum.se> -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea-web_two_spelling_errors.patch Type: text/x-patch Size: 1372 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20120929/70d2e523/icedtea-web_two_spelling_errors.patch