From bugzilla-daemon at icedtea.classpath.org Thu May 1 19:16:18 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 19:16:18 +0000 Subject: [Bug 1756] New: [IcedTea7] Bootstrap with OpenJDK 6 broken Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1756 Bug ID: 1756 Summary: [IcedTea7] Bootstrap with OpenJDK 6 broken Product: IcedTea Version: 7-hg Hardware: all OS: All Status: NEW Severity: normal Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org JAXWS build fails with: [javac] /* [javac] ^ [javac] The type package-info is already defined [javac] ---------- [javac] ---------- when bootstrap JDK is IcedTea. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 19:16:38 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 19:16:38 +0000 Subject: [Bug 1756] [IcedTea7] Bootstrap with IcedTea broken In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1756 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[IcedTea7] Bootstrap with |[IcedTea7] Bootstrap with |OpenJDK 6 broken |IcedTea broken -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at icedtea.classpath.org Thu May 1 19:18:19 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 01 May 2014 19:18:19 +0000 Subject: /hg/icedtea7: 3 new changesets Message-ID: changeset f182d37df5a4 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=f182d37df5a4 author: Andrew John Hughes date: Wed Apr 23 22:32:19 2014 +0100 PR1742: Allow SunEC provider to be built with changes in NSS >= 3.16.1 2014-04-23 Andrew John Hughes PR1742: Allow SunEC provider to be built with changes in NSS >= 3.16.1 * Makefile.am: (BUILD_VERSION): Bump to b13. (CORBA_CHANGESET): Update to icedtea-2.6pre02 tag. (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. (ICEDTEA_ENV): Use SUNEC_LIBS and SUNEC_CFLAGS instead of NSS_LIBS and NSS_CFLAGS respectively. * NEWS: Updated. * acinclude.m4: (IT_ENABLE_SUNEC): Use SUNEC_CFLAGS and SUNEC_LIBS for clarity as NSS_CFLAGS and NSS_LIBS are also set by the NSS detection. * configure.ac: Bump to pre02. * hotspot.map: Update to icedtea-2.6pre03 tag. * patches/boot/break-processbuilder-dependency.patch: Regenerated. changeset 7b8ec8be2784 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=7b8ec8be2784 author: Andrew John Hughes date: Wed Apr 30 15:42:11 2014 +0100 Update to icedtea-2.6pre03 tag. 2014-04-30 Andrew John Hughes * Makefile.am: (CORBA_CHANGESET): Update to icedtea-2.6pre03 tag. (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. * NEWS: Updated. * configure.ac: Bump to pre03. * hotspot.map: Update to icedtea-2.6pre03 tag. * patches/boot/jaxws-langtools-dependency.patch: Regenerated. changeset 53f3eede6777 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=53f3eede6777 author: Andrew John Hughes date: Thu May 01 20:17:50 2014 +0100 PR1756: Bootstrap with IcedTea broken 2014-05-01 Andrew John Hughes PR1756: Bootstrap with IcedTea broken * Makefile.am: (ICEDTEA_BOOT_PATCHES): Only apply ant-javac.patch when using bootstrap tools. Only patch JAXWS build when the bootstrap JDK doesn't have the com.sun.* classes it requires. Split the root patch in corba-dependencies.patch into its own file. * NEWS: Updated. * acinclude.m4: (IT_CHECK_FOR_JDK): Make DEFUN_ONCE and fix typo. (IT_CHECK_FOR_CLASS): Depend on IT_CHECK_TOOLS_JAR_EXISTS and adds TOOLS_JAR to classpath. (IT_CHECK_TOOLS_JAR_EXISTS): Find a tools.jar so we can check for classes it contains. * configure.ac: Check for com.sun.mirror.type.TypeMirror and com.sun.net.httpserver.Headers, required by JAXWS. * patches/boot/corba-dependencies.patch: Remove root part of patch. * patches/boot/dependencies.patch: Root part of patch from corba-dependencies. * patches/boot/jaxws-jdk-dependency.patch: Regenerated. * patches/boot/jaxws-langtools-dependency.patch: Rewrite to use sources, not classes. diffstat: ChangeLog | 79 ++++++++++++++++ Makefile.am | 47 +++++--- NEWS | 101 +++++++++++++++++++++ acinclude.m4 | 58 +++++++++-- configure.ac | 8 +- hotspot.map | 2 +- patches/boot/break-processbuilder-dependency.patch | 28 ++-- patches/boot/corba-dependencies.patch | 11 -- patches/boot/dependencies.patch | 11 ++ patches/boot/jaxws-jdk-dependency.patch | 46 ++++---- patches/boot/jaxws-langtools-dependency.patch | 80 ++++++++-------- 11 files changed, 351 insertions(+), 120 deletions(-) diffs (truncated from 712 to 500 lines): diff -r 57b8fd8c92eb -r 53f3eede6777 ChangeLog --- a/ChangeLog Fri Apr 18 17:11:05 2014 +0100 +++ b/ChangeLog Thu May 01 20:17:50 2014 +0100 @@ -1,3 +1,82 @@ +2014-05-01 Andrew John Hughes + + PR1756: Bootstrap with IcedTea broken + * Makefile.am: + (ICEDTEA_BOOT_PATCHES): Only apply ant-javac.patch + when using bootstrap tools. Only patch JAXWS build + when the bootstrap JDK doesn't have the com.sun.* + classes it requires. Split the root patch in + corba-dependencies.patch into its own file. + * NEWS: Updated. + * acinclude.m4: + (IT_CHECK_FOR_JDK): Make DEFUN_ONCE and fix typo. + (IT_CHECK_FOR_CLASS): Depend on IT_CHECK_TOOLS_JAR_EXISTS + and adds TOOLS_JAR to classpath. + (IT_CHECK_TOOLS_JAR_EXISTS): Find a tools.jar so + we can check for classes it contains. + * configure.ac: + Check for com.sun.mirror.type.TypeMirror and + com.sun.net.httpserver.Headers, required by JAXWS. + * patches/boot/corba-dependencies.patch: + Remove root part of patch. + * patches/boot/dependencies.patch: + Root part of patch from corba-dependencies. + * patches/boot/jaxws-jdk-dependency.patch: + Regenerated. + * patches/boot/jaxws-langtools-dependency.patch: + Rewrite to use sources, not classes. + +2014-04-30 Andrew John Hughes + + * Makefile.am: + (CORBA_CHANGESET): Update to icedtea-2.6pre03 tag. + (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. + * NEWS: Updated. + * configure.ac: Bump to pre03. + * hotspot.map: Update to icedtea-2.6pre03 tag. + * patches/boot/jaxws-langtools-dependency.patch: + Regenerated. + +2014-04-23 Andrew John Hughes + + PR1742: Allow SunEC provider to be built with changes + in NSS >= 3.16.1 + * Makefile.am: + (BUILD_VERSION): Bump to b13. + (CORBA_CHANGESET): Update to icedtea-2.6pre02 tag. + (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. + (ICEDTEA_ENV): Use SUNEC_LIBS and SUNEC_CFLAGS + instead of NSS_LIBS and NSS_CFLAGS respectively. + * NEWS: Updated. + * acinclude.m4: + (IT_ENABLE_SUNEC): Use SUNEC_CFLAGS and SUNEC_LIBS + for clarity as NSS_CFLAGS and NSS_LIBS are also set + by the NSS detection. + * configure.ac: Bump to pre02. + * hotspot.map: Update to icedtea-2.6pre03 tag. + * patches/boot/break-processbuilder-dependency.patch: + Regenerated. + 2014-04-18 Andrew John Hughes * Makefile.am: diff -r 57b8fd8c92eb -r 53f3eede6777 Makefile.am --- a/Makefile.am Fri Apr 18 17:11:05 2014 +0100 +++ b/Makefile.am Thu May 01 20:17:50 2014 +0100 @@ -1,22 +1,22 @@ # Dependencies JDK_UPDATE_VERSION = 60 -BUILD_VERSION = b04 +BUILD_VERSION = b13 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(BUILD_VERSION) -CORBA_CHANGESET = 7224b2d0d330 -JAXP_CHANGESET = 10314bfd5ba4 -JAXWS_CHANGESET = 1569dc36a61c -JDK_CHANGESET = 9b6aff2241bf -LANGTOOLS_CHANGESET = 702454ac1a07 -OPENJDK_CHANGESET = 9d6e6533c1e5 +CORBA_CHANGESET = 35fa09c49527 +JAXP_CHANGESET = 33912ce9492d +JAXWS_CHANGESET = ef698865ff56 +JDK_CHANGESET = 068d2b78bd73 +LANGTOOLS_CHANGESET = 2950924c2b80 +OPENJDK_CHANGESET = edf01342f3cb -CORBA_SHA256SUM = 4ddb46ce96184185ed0dd1ebcdad9e7cf50282d84d01af4b9fcbc35c12d7be15 -JAXP_SHA256SUM = 88cd6490d3e9c2f021d9e41d72efb49843137578ac54b1f02d90aec7e0e90ed5 -JAXWS_SHA256SUM = 64427e4708659976d7a24b32560709b3a2ba0981592805f47c04400b0526a3fc -JDK_SHA256SUM = 590e89d7aeaf6c9845cba0b9e3a9f3d00cfaeb8befcb5548fdde0ce429cfedfc -LANGTOOLS_SHA256SUM = 632ab633f289720644e4d00de74535362c8635b2cf0c9515a43719a53cdedbd6 -OPENJDK_SHA256SUM = e88e17a0bae48fca22b163224c6cdefc84bf7a574733d08d0e0ce6b70de72b8c +CORBA_SHA256SUM = 2aa4e5c18084eaaacecc3c5e0104286cb15053145b5c71be91f7a2c2e6d2f828 +JAXP_SHA256SUM = 0c93de8873e4609ae0e191541c3e8331addb657a491ed1ba36d9268bb2fe23f2 +JAXWS_SHA256SUM = 28991aa42190e391d45d4c79e8fca955249c3cf4b95a1783b8a36179b998c13a +JDK_SHA256SUM = aeeb18019359df6cd23ef479cfddea2ed9940572c265a65c70d15403cdc78151 +LANGTOOLS_SHA256SUM = 5f0179d4d9f55276ceff7f151d203b96698cde1b250430c4963f2a3a8525fd7e +OPENJDK_SHA256SUM = 5585a7ffce369a3f6dbbcadb86852a5a28ce0b2b0734fd734cedec611156ecc8 CACAO_VERSION = e215e36be9fc CACAO_SHA256SUM = 4966514c72ee7ed108b882d9b6e65c3adf8a8f9c2dccb029f971b3c8cb4870ab @@ -307,7 +307,6 @@ ICEDTEA_BOOT_PATCHES = \ patches/boot/javafiles.patch \ - patches/boot/ant-javac.patch \ patches/boot/corba-idlj.patch \ patches/boot/corba-no-gen.patch \ patches/boot/corba-orb.patch \ @@ -328,9 +327,8 @@ patches/boot/revert-6941137.patch \ patches/boot/ecj-stringswitch.patch \ patches/boot/langtools-force-old-jdk.patch \ + patches/boot/dependencies.patch \ patches/boot/corba-dependencies.patch \ - patches/boot/jaxws-langtools-dependency.patch \ - patches/boot/jaxws-jdk-dependency.patch \ patches/boot/hotspot-jdk-dependency.patch \ patches/boot/ecj-multicatch.patch \ patches/boot/ecj-trywithresources.patch \ @@ -340,7 +338,18 @@ if !DISABLE_BOOTSTRAP_TOOLS ICEDTEA_BOOT_PATCHES += \ - patches/boot/bootstrap-tools.patch + patches/boot/bootstrap-tools.patch \ + patches/boot/ant-javac.patch +endif + +if LACKS_COM_SUN_MIRROR_TYPE_TYPEMIRROR +ICEDTEA_BOOT_PATCHES += \ + patches/boot/jaxws-langtools-dependency.patch +endif + +if LACKS_COM_SUN_NET_HTTPSERVER_HEADERS +ICEDTEA_BOOT_PATCHES += \ + patches/boot/jaxws-jdk-dependency.patch endif if !VM_SUPPORTS_XBOOTCLASSPATH @@ -563,8 +572,8 @@ if ENABLE_SUNEC ICEDTEA_ENV += \ SYSTEM_NSS="true" \ - NSS_LIBS="${NSS_LIBS}" \ - NSS_CFLAGS="${NSS_CFLAGS}" \ + NSS_LIBS="${SUNEC_LIBS}" \ + NSS_CFLAGS="${SUNEC_CFLAGS}" \ ECC_JUST_SUITE_B="true" else ICEDTEA_ENV += \ diff -r 57b8fd8c92eb -r 53f3eede6777 NEWS --- a/NEWS Fri Apr 18 17:11:05 2014 +0100 +++ b/NEWS Thu May 01 20:17:50 2014 +0100 @@ -16,27 +16,78 @@ * OpenJDK - S5036554: unmarshal error on CORBA alias type in CORBA any + - S6412968: CMS: Long initial mark pauses - S6653795: C2 intrinsic for Unsafe.getAddress performs pointer sign extension on 32-bit systems - S7052170: javadoc -charset option generates wrong meta tag - S7076487: (sctp) SCTP API classes does not exist in JDK for Mac - S7084032: test/java/net/Inet6Address/B6558853.java fails on Windows XP/2003 if IPv6 - S7122142: (ann) Race condition between isAnnotationPresent and getAnnotations + - S7142035: assert in j.l.instrument agents during shutdown when daemon thread is running - S7152892: some jtreg tests fail with permission denied + - S7161320: TEST_BUG: java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java fails (Invalid key code) - S7169142: CookieHandler does not work with localhost - S7176574: sun/security/krb5/auto/TcpTimeout.java failed with solaris-i586 + - S7186887: Test T6567415.java can fail on a slow machine + - S7187554: JSR 292: JVMTI PopFrame needs to handle appendix arguments + - S7199674: (props) user.home property does not return an accessible location in sandboxed environment [macosx] + - S8002148: [TEST_BUG] The four lines printed are not the bold typeface. + - S8003253: TEST_BUG: java/nio/channels/AsynchronousChannelGroup/Unbounded.java hang intermittently [win] + - S8003285: TEST_BUG: java/nio/channels/AsynchronousChannelGroup/Unbounded.java fails again [macosx] + - S8003895: java/nio/channels/AsynchronousChannelGroup/Unbounded.java failing again [win64] + - S8004145: New improved hgforest.sh, ctrl-c now properly terminates mercurial processes. - S8006023: Embedded Builds fail management test because of requirement for UsePerfData being enabled. + - S8006628: NEED_TEST for JDK-8002870 + - S8007037: JSR 292: the VM_RedefineClasses::append_entry() should do cross-checks with indy operands + - S8007625: race with nested repos in /common/bin/hgforest.sh + - S8008511: JSR 292: MemberName vmtarget refs to methods must be updated at class redefinition + - S8011178: improve common/bin/hgforest.sh python detection (MacOS) + - S8011194: Apps launched via double-clicked .jars have file.encoding value of US-ASCII on Mac OS X + - S8011342: hgforest.sh : 'python --version' not supported on older python + - S8011350: hgforest.sh uses non-POSIX sh features that may fail with some shells + - S8011944: Sort fails with ArrayIndexOutOfBoundsException - S8012026: [macosx] Component.getMousePosition() does not work in an applet on MacOS + - S8012244: java/net/Socket/asyncClose/Race.java fails intermittently on Windows + - S8013611: Modal dialog fails to obtain keyboard focus + - S8013945: CMS fatal error: must own lock MemberNameTable_lock + - S8014052: JSR292: assert(end_offset == next_offset) failed: matched ending + - S8014288: perf regression in nashorn JDK-8008448.js test after 8008511 changes + - S8014555: G1: Memory ordering problem with Conc refinement and card marking - S8014460: Need to check for non-empty EXT_LIBS_PATH before using it - S8015421: NegativeArraySizeException occurs in ChunkedOutputStream() with Integer.MAX_VALUE + - S8016110: Japanese char (MS932) 0x5C cannot be used as an argument when quoted + - S8016328: Regression : Javadoc i18n regression caused by fix for 8012375 + - S8017456: [TEST_BUG] java/awt/DataFlavor/MissedHtmlAndRtfBug/MissedHtmlAndRtfBug.html: test frames remain after test execution + - S8017779: java/net/Authenticator/B4769350.java fails + - S8019184: MethodHandles.catchException() fails when methods have 8 args + varargs + - S8019389: SA-JDI JSR292: sun.jvm.hotspot.jdi.StackFrame.thisObject() throws sun.jvm.hotspot.utilities.AssertionFailure: sanity check + - S8019623: Lack of synchronization in AppContext.getAppContext() - S8019800: Test sun/tools/jcmd/jcmd-f.sh failing after JDK-8017011 + - S8019990: IM candidate window appears on the South-East corner of the display. + - S8020191: System.getProperty("os.name") returns "Windows NT (unknown)" on Windows 8.1 - S8021372: NetworkInterface.getNetworkInterfaces() returns duplicate hardware address + - S8022531: [TEST_BUG] After double-click on the folder names , there is no 'OK' button in the dialog. + - S8022836: JVM crashes in JVMTIENVBASE::GET_CURRENT_CONTENDED_MONITOR and GET_OWNED_MONITOR + - S8023004: JSR 292: java.lang.RuntimeException: Original target method was called. + - S8023881: IDN.USE_STD3_ASCII_RULES option is too strict to use Unicode in IDN.toASCII + - S8023956: Provide a work-around to broken Linux 32 bit "Exec Shield" using CS for NX emulation (crashing with SI_KERNEL) - S8023990: Regression: postscript size increase from 6u18 + - S8024200: handle hg wrapper with space after #! + - S8024648: 7141246 & 8016131 break Zero port - S8024675: java/net/NetworkInterface/UniqueMacAddressesTest.java fails on Windows + - S8025305: Cleanup CardTableModRefBS usage in G1 + - S8025796: hgforest.sh could trigger unbuffered output from hg without complicated machinations - S8027026: Change keytool -genkeypair to use -keyalg RSA - S8027212: java/nio/channels/Selector/SelectAfterRead.java fails intermittently + - S8027348: (process) Enhancement of handling async close of ProcessInputStream + - S8027359: XML parser returns incorrect parsing results + - S8027973: javax/xml/jaxp/transform/jdk8004476/XSLTExFuncTest.java hangs (win) - S8028073: race condition in ObjectMonitor implementation causing deadlocks + - S8028391: Make the Min/MaxHeapFreeRatio flags manageable - S8028616: Htmleditorkit parser doesn't handle leading slash (/) - S8028623: SA: hash codes in SymbolTable mismatching java_lang_String::hash_code for extended characters. + - S8029073: (corba) New connection reclaimed when number of connection is greater than highwatermark + - S8029281: Synchronization issues in Logger and LogManager + - S8030698: Several GUI labels in jconsole need correction - S8030712: TEST_BUG : java/lang/ProcessBuilder/BasicLauncher.java fails if java output contains VM warning - S8030822: (tz) Support tzdata2013i - S8030878: JConsole issues meaningless message if SSL connection fails @@ -44,23 +95,73 @@ - S8031572: jarsigner -verify exits with 0 when a jar file is not properly signed - S8031743: C2: loadI2L_immI broken for negative memory values - S8031764: tmtools/jmap/heap_config tests fail on Linux-ia32 because it Cant attach to the core file + - S8031980: Add new j.u.l deadlock test for JDK-8027670 and JDK-8029281 - S8032078: [macosx] CPlatformWindow.setWindowState throws RuntimeException, if windowState=ICONIFIED|MAXIMIZED_BOTH + - S8032207: C2: assert(VerifyOops || MachNode::size(ra_) <= (3+1)*4) failed: bad fixed size - S8032466: serviceability/sa/jmap-hashcode/Test8028623.java fails with compilation errors - S8032669: Mouse release not being delivered to Swing component in 7u45 - S8032740: Need to create SE Embedded Source Bundles in 7 Release + - S8032832: Applet/browser deadlocks, when IIS integrated authentication is used - S8032872: [macosx] Cannot select from JComboBox in a JWindow + - S8032878: Editable combos in table do not behave as expected + - S8032909: XSLT string-length returns incorrect length when string includes complementary chars + - S8032960: Running forms URL throws NullPointerException in Javaconsole. + - S8032986: new hotspot build - hs24.60-b09 + - S8033294: javac, spurious warning for instanceof operator + - S8033443: Test8000311 fails after latest changes to parallelize string and symbol table unlink + - S8033487: Improve GC option handling - S8033524: Set minor version for hotspot in 7u80 to 80 and build number to b01 - S8033970: new hotspot build - hs24.80-b02 + - S8034181: SIGBUS in SctpChannelImpl receive + - S8034262: Test java/lang/ProcessBuilder/CloseRace.java fails - S8034920: new hotspot build - hs24.80-b03 - S8035283: Second phase of branch shortening doesn't account for loop alignment - S8035435: new hotspot build - hs24.80-b04 + - S8035618: Four api/org_omg/CORBA TCK tests fail under plugin only + - S8035897: Better memory allocation for file descriptors greater than 1024 on macosx + - S8035963: The failed Kerberos tests due to timeouts - S8035973: NPE in ForwardBuilder + - S8035988: 7u60 l10n resource file translation update 1 + - S8036022: D3D: rendering with XOR composite causes InternalError. - S8036584: Review comments from 8035897 - S8036778: new hotspot build - hs24.80-b05 + - S8036786: Update jdk7 testlibrary to match jdk8 - S8036863: Update jdk7 testlibrary to match jdk8 in hotspot + - S8037012: (tz) Support tzdata2014a - S8037340: Linux semaphores to use CLOCK_REALTIME + - S8038481: CMM Testing: Min/MaxHeapFreeRatio flags should be manageable through the API + - S8038640: new hotspot build - hs24.80-b06 + - S8038785: hot workaround fix for a crash in C2 compiler at Node::rematerialize +* PPC & AIX port + - Fix handling of scalar replaced objects. + - New files for template interpreter + - PPC64: Support for ABI_ELFv2. + - S016696: PPC64 (part 4): add relocation for trampoline stubs + - S8016491: PPC64 (part 2): Clean up PPC defines. + - S8016586: PPC64 (part 3): basic changes for PPC64 + - S8017313: PPC64 (part 6): stack handling improvements + - S8017317: PPC64 (part 7): cppInterpreter: implement support for biased locking + - S8019517: PPC64 (part 102): cppInterpreter: implement G1 support + - S8019929: PPC64 (part 107): Extend ELF-decoder to support PPC64 function descriptor tables + - S8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX. + - S8024344: PPC64 (part 112): C argument in register AND stack slot. + - S8024468: PPC64 (part 201): cppInterpreter: implement bytecode profiling + - S8033168: PPC64: gcc 4.8 warning in output_c.cpp + - S8035396: Introduce accessor for tmp_oop in frame. + - S8036767: PPC64: Support for little endian execution model + - S8036976: PPC64: implement the template interpreter + - S8037915: PPC64/AIX: Several smaller fixes * Bug fixes - PR1737: Support prefixed variants of GNU tools used on *BSD systems + - Fix accidental reversion of PR1188 for armel + - PR1393: JPEG support in build is broken on non-system-libjpeg builds + - PR1742: Allow SunEC provider to be built with changes in NSS >= 3.16.1 + - Remove unused hgforest script + - Red Hat local: Fix for repo with path statting with / . + - S8041658: Use of -fdevirtualize on macroAssembler_x86.o (via -O2) with gcc 4.9.0 creates broken VM + - Extend S8041658 to all files in the HotSpot build. + - PR1753: Ant does not respect JAVA_HOME/jdk.home setting + - PR1756: Bootstrap with IcedTea broken New in release 2.5.0 (2014-XX-XX): diff -r 57b8fd8c92eb -r 53f3eede6777 acinclude.m4 --- a/acinclude.m4 Fri Apr 18 17:11:05 2014 +0100 +++ b/acinclude.m4 Thu May 01 20:17:50 2014 +0100 @@ -1146,7 +1146,7 @@ AM_CONDITIONAL([BOOTSTRAPPING], test x"${enable_bootstrap}" = "xyes") ]) -AC_DEFUN([IT_CHECK_FOR_JDK], +AC_DEFUN_ONCE([IT_CHECK_FOR_JDK], [ AC_MSG_CHECKING([for a JDK home directory]) AC_ARG_WITH([jdk-home], @@ -1193,7 +1193,7 @@ AC_MSG_RESULT(${SYSTEM_JDK_DIR}) fi if ! test -d "${SYSTEM_JDK_DIR}"; then - AC_MSG_ERROR("A JDK JDK home directory could not be found.") + AC_MSG_ERROR("A JDK home directory could not be found.") fi AC_SUBST(SYSTEM_JDK_DIR) ]) @@ -1540,6 +1540,7 @@ dnl e.g. IT_CHECK_FOR_CLASS([JAVA_UTIL_SCANNER],[java.util.Scanner]) AC_DEFUN([IT_CHECK_FOR_CLASS],[ AC_REQUIRE([IT_CHECK_JAVA_AND_JAVAC_WORK]) +AC_REQUIRE([IT_CHECK_TOOLS_JAR_EXISTS]) AC_CACHE_CHECK([if $2 is missing], it_cv_$1, [ CLASS=Test.java BYTECODE=$(echo $CLASS|sed 's#\.java##') @@ -1556,8 +1557,12 @@ } ] 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 +TEST_CP=. +if test "x$TOOLS_JAR" != x; then + TEST_CP=${TEST_CP}:${TOOLS_JAR} +fi +if $JAVAC -cp ${TEST_CP} $JAVACFLAGS -source 5 -target 5 -nowarn $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then + if $JAVA -classpath ${TEST_CP} $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then it_cv_$1=no; else it_cv_$1=yes; @@ -2718,15 +2723,48 @@ PKG_CHECK_MODULES(NSS_SOFTOKN, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no]) PKG_CHECK_MODULES(NSS_JAVA, nss-java, [NSS_JAVA_FOUND=yes], [NSS_JAVA_FOUND=no]) if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then - NSS_CFLAGS=$NSS_SOFTOKN_CFLAGS; - NSS_LIBS=$NSS_SOFTOKN_LIBS; + SUNEC_CFLAGS="$NSS_SOFTOKN_CFLAGS -lfreebl"; + SUNEC_LIBS=$NSS_SOFTOKN_LIBS; elif test "x${NSS_JAVA_FOUND}" = "xyes"; then - NSS_CFLAGS=$NSS_JAVA_CFLAGS; - NSS_LIBS=$NSS_JAVA_LIBS; + SUNEC_CFLAGS="$NSS_JAVA_CFLAGS -DLEGACY_NSS"; + SUNEC_LIBS=$NSS_JAVA_LIBS; else AC_MSG_ERROR([Could not find a suitable NSS installation to use for the SunEC provider.]) fi - AC_SUBST(NSS_CFLAGS) - AC_SUBST(NSS_LIBS) + AC_SUBST(SUNEC_CFLAGS) + AC_SUBST(SUNEC_LIBS) fi ]) + +AC_DEFUN_ONCE([IT_CHECK_TOOLS_JAR_EXISTS], +[ + AC_MSG_CHECKING([for a tools.jar]) + AC_ARG_WITH([tools-jar], + [AS_HELP_STRING([--with-tools-jar[[=PATH]]], + [location of tools JAR file (default is lib/tools.jar in the JDK being used)])], + [ + if test "x${withval}" = xyes + then + TOOLS_JAR= + elif test "x${withval}" = xno + then + TOOLS_JAR= + else + TOOLS_JAR=${withval} + fi + ], + [ + TOOLS_JAR= + ]) + if test -z "${TOOLS_JAR}"; then + AC_MSG_RESULT([not specified]) + TOOLS_JAR=${SYSTEM_JDK_DIR}/lib/tools.jar; + AC_MSG_NOTICE([Using ${TOOLS_JAR} for tools.jar]) + else + AC_MSG_RESULT(${TOOLS_JAR}) + fi + if ! test -e "${TOOLS_JAR}"; then + AC_MSG_WARN("A tools.jar file could not be found.") + fi + AC_SUBST(TOOLS_JAR) +]) diff -r 57b8fd8c92eb -r 53f3eede6777 configure.ac --- a/configure.ac Fri Apr 18 17:11:05 2014 +0100 +++ b/configure.ac Thu May 01 20:17:50 2014 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.6pre01], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.6pre03], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) @@ -144,6 +144,12 @@ [null,null,null,true] ) +dnl Check whether the obsolete Mirror API is present in the bootstrap JDK, required by JAXWS +IT_CHECK_FOR_CLASS([COM_SUN_MIRROR_TYPE_TYPEMIRROR], [com.sun.mirror.type.TypeMirror]) + +dnl Check whether the HTTP server API is present in the bootstrap JDK, required by JAXWS +IT_CHECK_FOR_CLASS([COM_SUN_NET_HTTPSERVER_HEADERS], [com.sun.net.httpserver.Headers]) + IT_CHECK_ENABLE_WARNINGS IT_DIAMOND_CHECK IT_BYTECODE7_CHECK diff -r 57b8fd8c92eb -r 53f3eede6777 hotspot.map --- a/hotspot.map Fri Apr 18 17:11:05 2014 +0100 +++ b/hotspot.map Thu May 01 20:17:50 2014 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum -default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 882a93010fb9 6809c27690d51bb08cd3be8ee61ea0a891abe4ef5e44d5c3addbdb11e2734a57 +default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 4ab69c6e4c85 03dad0749d7d81e3d5f9d76f9f8aa4d412d9d7ae3f6261efaefad0133ccc3428 aarch64 http://hg.openjdk.java.net/aarch64-port/jdk7u/hotspot f50993b6c38d 64c2d0bfa71d6eecf18ab28fd64d5bd79af096f77548d80de7953c306fd9c22c diff -r 57b8fd8c92eb -r 53f3eede6777 patches/boot/break-processbuilder-dependency.patch --- a/patches/boot/break-processbuilder-dependency.patch Fri Apr 18 17:11:05 2014 +0100 +++ b/patches/boot/break-processbuilder-dependency.patch Thu May 01 20:17:50 2014 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk-boot.orig/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux openjdk-boot/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux ---- openjdk-boot.orig/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2013-12-26 19:50:56.000000000 +0000 -+++ openjdk-boot/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2013-12-26 22:11:52.199802211 +0000 +--- openjdk-boot.orig/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2014-04-23 15:10:18.000000000 +0100 ++++ openjdk-boot/jdk/src/solaris/classes/java/lang/UNIXProcess.java.linux 2014-04-23 16:15:09.818128046 +0100 @@ -109,6 +109,32 @@ }); } @@ -53,16 +53,16 @@ new ProcessPipeInputStream(fds[2]); processReaperExecutor.execute(new Runnable() { -@@ -331,7 +357,7 @@ - } - } - return (a == null) ? -- ProcessBuilder.NullInputStream.INSTANCE : -+ NullInputStream.INSTANCE : - new ByteArrayInputStream(n == a.length ? a : Arrays.copyOf(a, n)); - } - -@@ -377,7 +403,7 @@ +@@ -332,7 +358,7 @@ + byte[] stragglers = drainInputStream(in); + in.close(); + this.in = (stragglers == null) ? +- ProcessBuilder.NullInputStream.INSTANCE : ++ NullInputStream.INSTANCE : + new ByteArrayInputStream(stragglers); + } + } catch (IOException ignored) {} +@@ -369,7 +395,7 @@ // We know of no reason to get an IOException, but if // we do, there's nothing else to do but carry on. } @@ -72,8 +72,8 @@ From bugzilla-daemon at icedtea.classpath.org Thu May 1 19:18:30 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 19:18:30 +0000 Subject: [Bug 1742] [IcedTea7] Allow SunEC provider to be built with changes in NSS >= 3.16.1 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1742 --- Comment #2 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=f182d37df5a4 author: Andrew John Hughes date: Wed Apr 23 22:32:19 2014 +0100 PR1742: Allow SunEC provider to be built with changes in NSS >= 3.16.1 2014-04-23 Andrew John Hughes PR1742: Allow SunEC provider to be built with changes in NSS >= 3.16.1 * Makefile.am: (BUILD_VERSION): Bump to b13. (CORBA_CHANGESET): Update to icedtea-2.6pre02 tag. (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. (ICEDTEA_ENV): Use SUNEC_LIBS and SUNEC_CFLAGS instead of NSS_LIBS and NSS_CFLAGS respectively. * NEWS: Updated. * acinclude.m4: (IT_ENABLE_SUNEC): Use SUNEC_CFLAGS and SUNEC_LIBS for clarity as NSS_CFLAGS and NSS_LIBS are also set by the NSS detection. * configure.ac: Bump to pre02. * hotspot.map: Update to icedtea-2.6pre03 tag. * patches/boot/break-processbuilder-dependency.patch: Regenerated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 19:18:37 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 19:18:37 +0000 Subject: [Bug 1756] [IcedTea7] Bootstrap with IcedTea broken In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1756 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=53f3eede6777 author: Andrew John Hughes date: Thu May 01 20:17:50 2014 +0100 PR1756: Bootstrap with IcedTea broken 2014-05-01 Andrew John Hughes PR1756: Bootstrap with IcedTea broken * Makefile.am: (ICEDTEA_BOOT_PATCHES): Only apply ant-javac.patch when using bootstrap tools. Only patch JAXWS build when the bootstrap JDK doesn't have the com.sun.* classes it requires. Split the root patch in corba-dependencies.patch into its own file. * NEWS: Updated. * acinclude.m4: (IT_CHECK_FOR_JDK): Make DEFUN_ONCE and fix typo. (IT_CHECK_FOR_CLASS): Depend on IT_CHECK_TOOLS_JAR_EXISTS and adds TOOLS_JAR to classpath. (IT_CHECK_TOOLS_JAR_EXISTS): Find a tools.jar so we can check for classes it contains. * configure.ac: Check for com.sun.mirror.type.TypeMirror and com.sun.net.httpserver.Headers, required by JAXWS. * patches/boot/corba-dependencies.patch: Remove root part of patch. * patches/boot/dependencies.patch: Root part of patch from corba-dependencies. * patches/boot/jaxws-jdk-dependency.patch: Regenerated. * patches/boot/jaxws-langtools-dependency.patch: Rewrite to use sources, not classes. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 19:19:57 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 19:19:57 +0000 Subject: [Bug 1756] [IcedTea7] Bootstrap with IcedTea broken In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1756 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 21:37:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 21:37:55 +0000 Subject: [Bug 1757] New: [IcedTea7] register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1757 Bug ID: 1757 Summary: [IcedTea7] register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 Product: IcedTea Version: 7-hg Hardware: all OS: All Status: NEW Severity: normal Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/shark/sharkCompiler.cpp: In member function 'virtual void SharkCompiler::compile_method(ciEnv*, ciMethod*, int)': /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/shark/sharkCompiler.cpp:215:29: error: no matching function for call to 'ciEnv::register_method(ciMethod*&, int&, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, SharkCompiler* const, int, bool)' /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/shark/sharkCompiler.cpp:215:29: note: candidate is: In file included from /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/ci/ciUtilities.hpp:28:0, from /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/ci/ciNullObject.hpp:30, from /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/ci/ciConstant.hpp:29, from /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/precompiled/precompiled.hpp:36: /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/ci/ciEnv.hpp:322:8: note: void ciEnv::register_method(ciMethod*, int, CodeOffsets*, int, CodeBuffer*, int, OopMapSet*, ExceptionHandlerTable*, ImplicitExceptionTable*, AbstractCompiler*, int, bool, bool) /usr/local/build/buildslave/icedtea/icedtea7-shark/build/openjdk-boot/hotspot/src/share/vm/ci/ciEnv.hpp:322:8: note: candidate expects 13 arguments, 12 provided http://builder.classpath.org/icedtea/buildbot/builders/icedtea7-wheezy-x86_64-shark/builds/1/steps/compile/logs/stdio -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 21:53:50 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 21:53:50 +0000 Subject: [Bug 1757] [IcedTea7] register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1757 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Target Milestone|--- |2.4.8 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 21:55:02 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 21:55:02 +0000 Subject: [Bug 1758] New: [IcedTea7] Support PPC64 JIT on ppc64le Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1758 Bug ID: 1758 Summary: [IcedTea7] Support PPC64 JIT on ppc64le Product: IcedTea Version: 7-hg Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org The latest merge of the ppc-aix-port includes support for building the JIT on ppc64le, so the build should support this. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 21:55:17 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 21:55:17 +0000 Subject: [Bug 1758] [IcedTea7] Support PPC64 JIT on ppc64le In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1758 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Hardware|x86_64 |ppc64le Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 1 21:55:33 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 01 May 2014 21:55:33 +0000 Subject: [Bug 1757] [IcedTea7] register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1757 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Component|IcedTea |Shark -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Fri May 2 07:46:14 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 02 May 2014 07:46:14 +0000 Subject: /hg/gfx-test: Ten new tests added into CAGOperationsOnChordAndRe... Message-ID: changeset 32c273c0ef64 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=32c273c0ef64 author: Pavel Tisnovsky date: Fri May 02 09:46:53 2014 +0200 Ten new tests added into CAGOperationsOnChordAndRectangle. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java | 230 ++++++++++ 2 files changed, 235 insertions(+), 0 deletions(-) diffs (252 lines): diff -r 83144bf7e807 -r 32c273c0ef64 ChangeLog --- a/ChangeLog Mon Apr 28 10:01:11 2014 +0200 +++ b/ChangeLog Fri May 02 09:46:53 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-01 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java: + Ten new tests added into CAGOperationsOnChordAndRectangle. + 2014-04-28 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: diff -r 83144bf7e807 -r 32c273c0ef64 src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java --- a/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Mon Apr 28 10:01:11 2014 +0200 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java Fri May 02 09:46:53 2014 +0200 @@ -1546,6 +1546,236 @@ } /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using inverse subtract operator. + * The shape is rendered using radial gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleInverseSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set radial gradient fill + CommonRenderingStyles.setRadialGradientFill(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using intersect operator. The shape is + * rendered using radial gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleIntersectRadialGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set radial gradient fill + CommonRenderingStyles.setRadialGradientFill(image, graphics2d); + // create area using intersect operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using XOR operator. The shape is + * rendered using radial gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleXorRadialGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set radial gradient fill + CommonRenderingStyles.setRadialGradientFill(image, graphics2d); + // create area using XOR operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using union operator. The shape is + * rendered using horizontal gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleUnionHorizontalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set horizontal gradient fill + CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using subtract operator. The shape is + * rendered using horizontal gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleSubtractHorizontalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set horizontal gradient fill + CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using inverse subtract operator. + * The shape is rendered using horizontal gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleInverseSubtractHorizontalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set horizontal gradient fill + CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingInverseSubtractOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using intersect operator. The shape is + * rendered using horizontal gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleIntersectHorizontalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set horizontal gradient fill + CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d); + // create area using intersect operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingIntersectOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using XOR operator. The shape is + * rendered using horizontal gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleXorHorizontalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set horizontal gradient fill + CommonRenderingStyles.setHorizontalGradientFill(image, graphics2d); + // create area using XOR operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingXorOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using union operator. The shape is + * rendered using vertical gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleUnionVerticalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set vertical gradient fill + CommonRenderingStyles.setVerticalGradientFill(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingUnionOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from a chord inside a rectangle using subtract operator. The shape is + * rendered using vertical gradient fill. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSmallChordInsideRectangleSubtractVerticalGradientPaint(TestImage image, Graphics2D graphics2d) + { + // set vertical gradient fill + CommonRenderingStyles.setVerticalGradientFill(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromSmallerChordInsideRectangleUsingSubtractOperator(image); + // fill the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args not used in this case From jvanek at redhat.com Fri May 2 13:34:40 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 02 May 2014 15:34:40 +0200 Subject: [rfc][icedtea-web] disconnecting httpurlconnections In-Reply-To: <53611BA3.5070505@redhat.com> References: <5360F0D1.7060003@redhat.com> <20140430152809.GE2047@redhat.com> <53611BA3.5070505@redhat.com> Message-ID: <53639EF0.7080707@redhat.com> On 04/30/2014 05:49 PM, Jiri Vanek wrote: > On 04/30/2014 05:28 PM, Omair Majid wrote: >> * Jiri Vanek [2014-04-30 08:58]: >>> I started to tweek https, and I found,that no urlconnection (which >>> is in 99% httpurlconnection) do not disconnect after calling >>> url.openConnection(). >> >> That's intentional. Please see this old thread: >> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2013-February/021847.html >> >> Thanks, >> Omair >> > Hmm. I was afraid of something like this. However. When the https connection is not closed, then > the approach you suggested on java-project (nor my trust all certificates manager) do not work, when > mixed with "correct" conenctions. > > J. Hmm.. I was playing bit with it, and I must say.. I'm not sure.... I think the overhewad with not-reusing the connection is not worthy of not disconnecting. Or maybe I just do not understand the issue properly. I will elaborate a bit more, but if you may say few more words, it would be nice:(( J. From omajid at redhat.com Fri May 2 14:25:40 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 10:25:40 -0400 Subject: [rfc][icedtea-web] disconnecting httpurlconnections In-Reply-To: <53639EF0.7080707@redhat.com> References: <5360F0D1.7060003@redhat.com> <20140430152809.GE2047@redhat.com> <53611BA3.5070505@redhat.com> <53639EF0.7080707@redhat.com> Message-ID: <20140502142540.GA2886@redhat.com> * Jiri Vanek [2014-05-02 09:34]: > I will elaborate a bit more, but if you may say few more words, it > would be nice:(( Sorry, but I know next to nothing about this area. All I know is that Adam looked into it and decided that disconnect() is best avoided. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Fri May 2 14:42:07 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 10:42:07 -0400 Subject: [rfc][icedtea-web] disconnecting httpurlconnections In-Reply-To: <20140502142540.GA2886@redhat.com> References: <5360F0D1.7060003@redhat.com> <20140430152809.GE2047@redhat.com> <53611BA3.5070505@redhat.com> <53639EF0.7080707@redhat.com> <20140502142540.GA2886@redhat.com> Message-ID: <5363AEBF.50306@redhat.com> On 05/02/2014 10:25 AM, Omair Majid wrote: > * Jiri Vanek [2014-05-02 09:34]: >> I will elaborate a bit more, but if you may say few more words, it >> would be nice:(( > Sorry, but I know next to nothing about this area. All I know is that > Adam looked into it and decided that disconnect() is best avoided. > > Thanks, > Omair > Maybe I'm just missing something but I really don't see how he came to the conclusion that disconnect() should be avoided... the initial problem seems to be that a new connection was being made and only the response code being read, nothing else. The proposed solution was to do this but then close the connection. The comment Adam refers to states that rather than simply disconnecting after reading the response code, the connection should actually do something - consume and discard it, or simply use a HEAD request in the first place - so as to not confuse these "mediocre" web servers (which presumably are expecting a GET request to actually want the response body, so they hang on sending it unless interrupted by a disconnect). Adam himself even says that it's difficult to actually reuse connections, which is AFAICT the reason they weren't disconnected to begin with. Why would it not be correct to both (1) use HEAD request with consume/discard fallback, (2) disconnect when finished, if the connection is not going to be reused later? As Jiri says, is the overhead incurred by creating new connections really that bad that we should deal with evidently flaky connection reuse? Thanks, -- Andrew A From omajid at redhat.com Fri May 2 16:44:08 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 12:44:08 -0400 Subject: [icedtea-web] RFC: Fix package name in package-info files Message-ID: <20140502164408.GC2886@redhat.com> Hi, The attached patch fixes the package name in various package-info.java files in icedtea-web. They incorrectly stated that the package prefix was 'netx'. It's just 'net'. Okay to push? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-05-02 Omair Majid + + * netx/net/sourceforge/jnlp/cache/package-info.java, + * netx/net/sourceforge/jnlp/runtime/package-info.java, + * netx/net/sourceforge/jnlp/services/package-info.java: Fix package name + by replacing 'netx' with 'net'. + 2014-04-15 Jiri Vanek Reflect possibility of disabled manifest check to unit-test diff --git a/netx/net/sourceforge/jnlp/cache/package-info.java b/netx/net/sourceforge/jnlp/cache/package-info.java --- a/netx/net/sourceforge/jnlp/cache/package-info.java +++ b/netx/net/sourceforge/jnlp/cache/package-info.java @@ -33,4 +33,4 @@ /** * This package contains the JNLP cache. */ -package netx.sourceforge.jnlp.cache; +package net.sourceforge.jnlp.cache; diff --git a/netx/net/sourceforge/jnlp/runtime/package-info.java b/netx/net/sourceforge/jnlp/runtime/package-info.java --- a/netx/net/sourceforge/jnlp/runtime/package-info.java +++ b/netx/net/sourceforge/jnlp/runtime/package-info.java @@ -34,4 +34,4 @@ * This package contains the classes that manage the secure runtime environment * for JNLP apps. */ -package netx.sourceforge.jnlp.runtime; +package net.sourceforge.jnlp.runtime; diff --git a/netx/net/sourceforge/jnlp/services/package-info.java b/netx/net/sourceforge/jnlp/services/package-info.java --- a/netx/net/sourceforge/jnlp/services/package-info.java +++ b/netx/net/sourceforge/jnlp/services/package-info.java @@ -34,4 +34,4 @@ * This package contains the classes that implement the standard services * defined by the JNLP specification. */ -package netx.sourceforge.jnlp.services; +package net.sourceforge.jnlp.services; From omajid at redhat.com Fri May 2 17:23:14 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 13:23:14 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry Message-ID: <20140502172314.GD2886@redhat.com> Hi, I had to work on CacheEntry for a few fixes (I will be posting those later) and the class seems to be doing a bit too much. The knowledge of URLConnection is especially troubling, since the metadata for a CacheEntry doesn't really match the URL in the presence of compression. The attached patch tries to reduce how much CacheEntry knows about URLConnection. Okay to push? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2014-05-02 Omair Majid + + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Use + constants for strings. + (initialize): Remove. + (getContentLength, setContentLength, getLastModified, setLastModified) + (getLongKey, setLongKey): New method. + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java: New + file. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java + (initializeResource, downloadResource): Use CacheEntry.setContentLength + and CacheEntry.setLastModified instead of CacheEntry.initialize. + 2014-05-02 Omair Majid * netx/net/sourceforge/jnlp/cache/package-info.java, diff --git a/netx/net/sourceforge/jnlp/cache/CacheEntry.java b/netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java @@ -23,7 +23,6 @@ import java.net.*; import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.runtime.*; import net.sourceforge.jnlp.util.*; /** @@ -34,6 +33,10 @@ */ public class CacheEntry { + private static final String KEY_CONTENT_LENGTH = "content-length"; + private static final String KEY_LAST_MODIFIED = "last-modified"; + private static final String KEY_LAST_UPDATED = "last-updated"; + /** the remote resource location */ private URL location; @@ -61,18 +64,6 @@ } /** - * Initialize the cache entry data from a connection to the - * remote resource (does not store data). - */ - void initialize(URLConnection connection) { - long modified = connection.getLastModified(); - long length = connection.getContentLength(); // an int - - properties.setProperty("content-length", Long.toString(length)); - properties.setProperty("last-modified", Long.toString(modified)); - } - - /** * Returns the remote location this entry caches. */ public URL getLocation() { @@ -84,11 +75,7 @@ * most recently checked for an update. */ public long getLastUpdated() { - try { - return Long.parseLong(properties.getProperty("last-updated")); - } catch (Exception ex) { - return 0; - } + return getLongKey(KEY_LAST_UPDATED); } /** @@ -96,7 +83,35 @@ * most recently checked for an update. */ public void setLastUpdated(long updatedTime) { - properties.setProperty("last-updated", Long.toString(updatedTime)); + setLongKey(KEY_LAST_UPDATED, updatedTime); + } + + public long getContentLength() { + return getLongKey(KEY_CONTENT_LENGTH); + } + + public void setContentLength(long length) { + setLongKey(KEY_CONTENT_LENGTH, length); + } + + public long getLastModified() { + return getLongKey(KEY_LAST_MODIFIED); + } + + public void setLastModified(long length) { + setLongKey(KEY_LAST_MODIFIED, length); + } + + private long getLongKey(String key) { + try { + return Long.parseLong(properties.getProperty(key)); + } catch (Exception ex) { + return 0; + } + } + + private void setLongKey(String key, long value) { + properties.setProperty(key, Long.toString(value)); } /** @@ -115,7 +130,7 @@ try { long remoteModified = connection.getLastModified(); - long cachedModified = Long.parseLong(properties.getProperty("last-modified")); + long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); if (remoteModified > 0 && remoteModified <= cachedModified) return true; @@ -141,7 +156,7 @@ try { long cachedLength = localFile.length(); - long remoteLength = Long.parseLong(properties.getProperty("content-length", "-1")); + long remoteLength = Long.parseLong(properties.getProperty(KEY_CONTENT_LENGTH, "-1")); if (remoteLength >= 0 && cachedLength != remoteLength) return false; @@ -181,4 +196,5 @@ protected void unlock() { CacheUtil.unlockFile(properties); } + } 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 @@ -695,6 +695,9 @@ byte buf[] = new byte[1024]; int rlen; + long contentLength = con.getContentLengthLong(); + long lastModified = con.getLastModified(); + InputStream in = new BufferedInputStream(con.getInputStream()); OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.downloadVersion); @@ -710,11 +713,16 @@ if (con instanceof HttpURLConnection) ((HttpURLConnection) con).disconnect(); + if (packgz || gzip) { + // TODO why not set this otherwise? + downloadEntry.setContentLength(contentLength); + downloadEntry.setLastModified(lastModified); + } + /* * If the file was compressed, uncompress it. */ if (packgz) { - downloadEntry.initialize(con); GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil .getCacheFile(downloadLocation, resource.downloadVersion))); InputStream inputStream = new BufferedInputStream(gzInputStream); @@ -729,7 +737,6 @@ inputStream.close(); gzInputStream.close(); } else if (gzip) { - downloadEntry.initialize(con); GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil .getCacheFile(downloadLocation, resource.downloadVersion))); InputStream inputStream = new BufferedInputStream(gzInputStream); @@ -823,8 +830,10 @@ } // update cache entry - if (!current) - entry.initialize(connection); + if (!current) { + entry.setContentLength(connection.getContentLengthLong()); + entry.setLastModified(connection.getLastModified()); + } entry.setLastUpdated(System.currentTimeMillis()); entry.store(); diff --git a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java new file mode 100644 --- /dev/null +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java @@ -0,0 +1,97 @@ +/* CacheEntryTest -- unit test for CacheEntry + Copyright (C) 2014 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.cache; + +import static org.junit.Assert.assertEquals; + +import java.net.MalformedURLException; +import java.net.URL; + +import net.sourceforge.jnlp.Version; + +import org.junit.Before; +import org.junit.Test; + +public class CacheEntryTest { + + private URL url; + private Version version; + + @Before + public void setUp() throws MalformedURLException { + url = new URL("http://example.com/example.jar"); + version = new Version("1.0"); + } + + @Test + public void testLocationIsSame() { + CacheEntry entry = new CacheEntry(url, version); + assertEquals(url, entry.getLocation()); + } + + @Test + public void testLastModifiedIsSetCorrectly() { + long LAST_MODIFIED = 1000; + + CacheEntry entry = new CacheEntry(url, version); + entry.setLastModified(LAST_MODIFIED); + + assertEquals(LAST_MODIFIED, entry.getLastModified()); + } + + @Test + public void testLastUpdatedIsSetCorrectly() { + long LAST_UPDATED = 1000; + + CacheEntry entry = new CacheEntry(url, version); + entry.setLastUpdated(LAST_UPDATED); + + assertEquals(LAST_UPDATED, entry.getLastUpdated()); + } + + @Test + public void testContentLengthIsSetCorrectly() { + long CONTENT_LENGTH = 1000; + + CacheEntry entry = new CacheEntry(url, version); + entry.setContentLength(CONTENT_LENGTH); + + assertEquals(CONTENT_LENGTH, entry.getContentLength()); + } + +} From aazores at redhat.com Fri May 2 18:28:25 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 14:28:25 -0400 Subject: [icedtea-web] RFC: Fix package name in package-info files In-Reply-To: <20140502164408.GC2886@redhat.com> References: <20140502164408.GC2886@redhat.com> Message-ID: <5363E3C9.3030406@redhat.com> On 05/02/2014 12:44 PM, Omair Majid wrote: > Hi, > > The attached patch fixes the package name in various package-info.java > files in icedtea-web. They incorrectly stated that the package prefix > was 'netx'. It's just 'net'. > > Okay to push? > > Thanks, > Omair > Okay to push, may as well backport too please if applicable. Thanks, -- Andrew A From aazores at redhat.com Fri May 2 18:53:30 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 14:53:30 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <20140502172314.GD2886@redhat.com> References: <20140502172314.GD2886@redhat.com> Message-ID: <5363E9AA.8000508@redhat.com> On 05/02/2014 01:23 PM, Omair Majid wrote: > Hi, > > I had to work on CacheEntry for a few fixes (I will be posting those > later) and the class seems to be doing a bit too much. The knowledge of > URLConnection is especially troubling, since the metadata for a > CacheEntry doesn't really match the URL in the presence of compression. > > The attached patch tries to reduce how much CacheEntry knows about > URLConnection. > > Okay to push? > > Thanks, > Omair > Looks good. One nit: should #getLongKey() return 0 on exception? 0 may actually be a valid result. Perhaps -1 instead, since this is being refactored anyway? And please consider logging the exception as well. Thanks, -- Andrew A From omajid at redhat.com Fri May 2 19:27:25 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 15:27:25 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <5363E9AA.8000508@redhat.com> References: <20140502172314.GD2886@redhat.com> <5363E9AA.8000508@redhat.com> Message-ID: <20140502192725.GE2886@redhat.com> Hi, Thanks for the review. * Andrew Azores [2014-05-02 14:56]: > On 05/02/2014 01:23 PM, Omair Majid wrote: > >I had to work on CacheEntry for a few fixes (I will be posting those > >later) and the class seems to be doing a bit too much. The knowledge of > >URLConnection is especially troubling, since the metadata for a > >CacheEntry doesn't really match the URL in the presence of compression. > > > >The attached patch tries to reduce how much CacheEntry knows about > >URLConnection. > > Looks good. One nit: should #getLongKey() return 0 on exception? 0 > may actually be a valid result. Perhaps -1 instead, since this is > being refactored anyway? And please consider logging the exception > as well. The existing code that was using the value (refactored into #getLongKey()) was expecting 0. My next patch introduces some code that needs other values, so I am going to change getLongKey() to return other values too. But in a separate patch. I hope that's okay. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Fri May 2 19:32:21 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 15:32:21 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <5363F260.5050606@redhat.com> References: <20140502172314.GD2886@redhat.com> <5363E9AA.8000508@redhat.com> <20140502192725.GE2886@redhat.com> <5363F260.5050606@redhat.com> Message-ID: <20140502193221.GF2886@redhat.com> * Andrew Azores [2014-05-02 15:30]: > On 05/02/2014 03:27 PM, Omair Majid wrote: > >* Andrew Azores [2014-05-02 14:56]: > >>Looks good. One nit: should #getLongKey() return 0 on exception? 0 > >>may actually be a valid result. Perhaps -1 instead, since this is > >>being refactored anyway? And please consider logging the exception > >>as well. > > > >The existing code that was using the value (refactored into > >#getLongKey()) was expecting 0. My next patch introduces some code that > >needs other values, so I am going to change getLongKey() to return other > >values too. But in a separate patch. I hope that's okay. > > Sure, sounds fine. Are you going to also log the exception being > thrown in there? I don't really see a need to, but if you think it's a good idea, I will. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Fri May 2 19:30:40 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 15:30:40 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <20140502192725.GE2886@redhat.com> References: <20140502172314.GD2886@redhat.com> <5363E9AA.8000508@redhat.com> <20140502192725.GE2886@redhat.com> Message-ID: <5363F260.5050606@redhat.com> On 05/02/2014 03:27 PM, Omair Majid wrote: > Hi, > > Thanks for the review. > > * Andrew Azores [2014-05-02 14:56]: >> On 05/02/2014 01:23 PM, Omair Majid wrote: >>> I had to work on CacheEntry for a few fixes (I will be posting those >>> later) and the class seems to be doing a bit too much. The knowledge of >>> URLConnection is especially troubling, since the metadata for a >>> CacheEntry doesn't really match the URL in the presence of compression. >>> >>> The attached patch tries to reduce how much CacheEntry knows about >>> URLConnection. >> Looks good. One nit: should #getLongKey() return 0 on exception? 0 >> may actually be a valid result. Perhaps -1 instead, since this is >> being refactored anyway? And please consider logging the exception >> as well. > The existing code that was using the value (refactored into > #getLongKey()) was expecting 0. My next patch introduces some code that > needs other values, so I am going to change getLongKey() to return other > values too. But in a separate patch. I hope that's okay. > > Thanks, > Omair > Sure, sounds fine. Are you going to also log the exception being thrown in there? Thanks, -- Andrew A From aazores at redhat.com Fri May 2 19:38:22 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 15:38:22 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <20140502193221.GF2886@redhat.com> References: <20140502172314.GD2886@redhat.com> <5363E9AA.8000508@redhat.com> <20140502192725.GE2886@redhat.com> <5363F260.5050606@redhat.com> <20140502193221.GF2886@redhat.com> Message-ID: <5363F42E.4080603@redhat.com> On 05/02/2014 03:32 PM, Omair Majid wrote: > * Andrew Azores [2014-05-02 15:30]: >> On 05/02/2014 03:27 PM, Omair Majid wrote: >>> * Andrew Azores [2014-05-02 14:56]: >>>> Looks good. One nit: should #getLongKey() return 0 on exception? 0 >>>> may actually be a valid result. Perhaps -1 instead, since this is >>>> being refactored anyway? And please consider logging the exception >>>> as well. >>> The existing code that was using the value (refactored into >>> #getLongKey()) was expecting 0. My next patch introduces some code that >>> needs other values, so I am going to change getLongKey() to return other >>> values too. But in a separate patch. I hope that's okay. >> Sure, sounds fine. Are you going to also log the exception being >> thrown in there? > I don't really see a need to, but if you think it's a good idea, I will. > > Thanks, > Omair > Well, it depends. I think it should be logged if it ends up being possible that the returned value on error is also potentially a valid response in some contexts, otherwise any potential bug stemming from bad values will be less obvious to track down. Even if the returned value is never a valid response, having the exception appear in logs could be helpful, if noisy. Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Fri May 2 19:40:45 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 02 May 2014 19:40:45 +0000 Subject: [Bug 1757] [IcedTea7] register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1757 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7-forest/hotspot?cmd=changeset;node=cdee784c401d author: andrew date: Thu May 01 22:38:19 2014 +0100 PR1757: register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From omajid at redhat.com Fri May 2 20:32:10 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 16:32:10 -0400 Subject: [icedtea-web] RFC: Fix caching of compressed content Message-ID: <20140502203210.GA28557@redhat.com> Hi, It was brought to my attention that icedtea-web was re-downloading the jars (which should have been cached) on subsequent runs of a jnlp application. I dug into it and found a real bug. To decide if an item is cached, icedtea-web does a HEAD request and compares the Content-Length with the size of the file. This works fine when the jars were not compressed. When the jars are fetched compressed and then uncompressed on disk, there is a mismatch between the sizes and icedtea-web decides the content is not cached. The attached patch stores the compressed size in the cache info file and uses that instead of the actual file size in the size-comparison. Thoughts? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2014-05-02 Omair Majid + + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Add + KEY_CONTENT_ORIGINAL_LENGTH. + (getOriginalContentLength, setOriginalContentLength) + (getLongKey(String,long)): New methods. + (isCached): Check if the original content length is recorded and use it, + if available, as the content length. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (downloadResource): + If the content was compressed, store original content length in the cache + entry. + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java + (testOriginalContentLengthIsSetCorrectly): New method. + 2014-05-02 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Use diff --git a/netx/net/sourceforge/jnlp/cache/CacheEntry.java b/netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java @@ -34,6 +34,7 @@ public class CacheEntry { private static final String KEY_CONTENT_LENGTH = "content-length"; + private static final String KEY_CONTENT_ORIGINAL_LENGTH = "content-original-length"; private static final String KEY_LAST_MODIFIED = "last-modified"; private static final String KEY_LAST_UPDATED = "last-updated"; @@ -94,6 +95,24 @@ setLongKey(KEY_CONTENT_LENGTH, length); } + /** + * Return the length of the original content that was cached. May be different + * from the actual file size due to (de)compression. + * + * @return the content length or -1 if unknown. + */ + public long getOriginalContentLength() { + return getLongKey(KEY_CONTENT_ORIGINAL_LENGTH, -1); + } + + /** + * Set the length of the original content that was cached. May be different + * from the actual file size due to (de)compression. + */ + public void setOriginalContentLength(long contentLength) { + setLongKey(KEY_CONTENT_ORIGINAL_LENGTH, contentLength); + } + public long getLastModified() { return getLongKey(KEY_LAST_MODIFIED); } @@ -103,10 +122,15 @@ } private long getLongKey(String key) { + return getLongKey(key, 0); + } + + private long getLongKey(String key, long defaultValue) { try { return Long.parseLong(properties.getProperty(key)); } catch (Exception ex) { - return 0; + OutputController.getLogger().log(ex); + return defaultValue; } } @@ -156,6 +180,11 @@ try { long cachedLength = localFile.length(); + String originalLength = properties.getProperty(KEY_CONTENT_ORIGINAL_LENGTH); + if (originalLength != null) { + cachedLength = Long.parseLong(originalLength); + } + long remoteLength = Long.parseLong(properties.getProperty(KEY_CONTENT_LENGTH, "-1")); if (remoteLength >= 0 && cachedLength != remoteLength) 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 @@ -757,6 +757,9 @@ } if (!downloadLocationFile.getPath().equals(finalFile.getPath())) { + origEntry.setOriginalContentLength(downloadEntry.getContentLength()); + origEntry.store(); + downloadEntry.markForDelete(); downloadEntry.store(); } diff --git a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java @@ -94,4 +94,14 @@ assertEquals(CONTENT_LENGTH, entry.getContentLength()); } + @Test + public void testOriginalContentLengthIsSetCorrectly() { + long ORIGINAL_CONTENT_LENGTH = 1000; + + CacheEntry entry = new CacheEntry(url, version); + entry.setOriginalContentLength(ORIGINAL_CONTENT_LENGTH); + + assertEquals(ORIGINAL_CONTENT_LENGTH, entry.getOriginalContentLength()); + } + } From omajid at redhat.com Fri May 2 20:34:59 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 16:34:59 -0400 Subject: [icedtea-web] RFC: change download window to a jdialog Message-ID: <20140502203459.GB28557@redhat.com> Hi, The current download progress indicator window in icedtea-web is a JFrame. Some window managers in Linux assume it's an actual application window and try to handle it's size and position in a more appropriate way. A tiling window manager, for example, will stretch it to fill the screen size. The attached patch makes it a JDialog so it's treated as a dialog and it's size and position are respected. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java b/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java --- a/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java +++ b/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java @@ -58,8 +58,8 @@ private static final int CLOSE_DELAY = 750; /** the display window */ - private static JFrame frame; - private static final Object frameMutex = new Object(); + private static JDialog dialog; + private static final Object dialogMutex = new Object(); /** shared constraint */ static GridBagConstraints vertical; @@ -104,9 +104,9 @@ public DownloadServiceListener getListener(ApplicationInstance app, String downloadName, URL resources[]) { DownloadPanel result = new DownloadPanel(downloadName); - synchronized (frameMutex) { - if (frame == null) { - frame=createDownloadIndicatorFrame(true); + synchronized (dialogMutex) { + if (dialog == null) { + dialog = createDownloadIndicatorWindow(true); } if (resources != null) { @@ -116,8 +116,8 @@ } } - frame.getContentPane().add(result, vertical); - frame.pack(); + dialog.getContentPane().add(result, vertical); + dialog.pack(); placeFrameToLowerRight(); result.addComponentListener(new ComponentAdapter() { @Override @@ -126,14 +126,14 @@ } }); - frame.setVisible(true); + dialog.setVisible(true); return result; } } - public static JFrame createDownloadIndicatorFrame(boolean undecorated) throws HeadlessException { - JFrame f = new JFrame(downloading + "..."); + public static JDialog createDownloadIndicatorWindow(boolean undecorated) throws HeadlessException { + JDialog f = new JDialog((JFrame)null, downloading + "..."); f.setUndecorated(undecorated); f.setIconImages(ImageResources.INSTANCE.getApplicationImages()); f.getContentPane().setLayout(new GridBagLayout()); @@ -145,8 +145,8 @@ */ private static void placeFrameToLowerRight() throws HeadlessException { Rectangle bounds = ScreenFinder.getCurrentScreenSizeWithoutBounds(); - frame.setLocation(bounds.width+bounds.x - frame.getWidth(), - bounds.height+bounds.y - frame.getHeight()); + dialog.setLocation(bounds.width+bounds.x - dialog.getWidth(), + bounds.height+bounds.y - dialog.getHeight()); } /** @@ -160,14 +160,14 @@ ActionListener hider = new ActionListener() { public void actionPerformed(ActionEvent evt) { - synchronized(frameMutex) { - frame.getContentPane().remove((DownloadPanel) listener); - frame.pack(); + synchronized(dialogMutex) { + dialog.getContentPane().remove((DownloadPanel) listener); + dialog.pack(); - if (frame.getContentPane().getComponentCount() == 0) { - frame.setVisible(false); - frame.dispose(); - frame = null; + if (dialog.getContentPane().getComponentCount() == 0) { + dialog.setVisible(false); + dialog.dispose(); + dialog = null; } } } @@ -253,14 +253,14 @@ } public void recreateFrame(boolean undecorated) throws HeadlessException { - JFrame oldFrame = frame; - frame = createDownloadIndicatorFrame(undecorated); - frame.getContentPane().add(self, vertical); - synchronized (frameMutex) { - frame.pack(); + JDialog oldFrame = dialog; + dialog = createDownloadIndicatorWindow(undecorated); + dialog.getContentPane().add(self, vertical); + synchronized (dialogMutex) { + dialog.pack(); placeFrameToLowerRight(); } - frame.setVisible(true); + dialog.setVisible(true); oldFrame.dispose(); } }); @@ -294,8 +294,8 @@ add(mainProgressPanel, verticalIndent); state=States.COLLAPSED; } - synchronized (frameMutex) { - frame.pack(); + synchronized (dialogMutex) { + dialog.pack(); placeFrameToLowerRight(); } @@ -333,7 +333,7 @@ // each update. header.setText(downloading + " " + downloadName + ": " + percent + "% " + complete + "."); Container c = header.getParent(); - //we need to adapt both panels and also frame to new length of header text + //we need to adapt both panels and also dialog to new length of header text while (c != null) { c.invalidate(); c.validate(); From aazores at redhat.com Fri May 2 20:48:31 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 16:48:31 -0400 Subject: [icedtea-web] RFC: change download window to a jdialog In-Reply-To: <20140502203459.GB28557@redhat.com> References: <20140502203459.GB28557@redhat.com> Message-ID: <5364049F.8080806@redhat.com> On 05/02/2014 04:34 PM, Omair Majid wrote: > Hi, > > The current download progress indicator window in icedtea-web is a > JFrame. Some window managers in Linux assume it's an actual application > window and try to handle it's size and position in a more appropriate > way. A tiling window manager, for example, will stretch it to fill the > screen size. > > The attached patch makes it a JDialog so it's treated as a dialog and > it's size and position are respected. > > Thanks, > Omair > Nice! There are other places that we should probably consider making this change as well. For example, the "could not launch" dialog. Reproducer - just hit cancel on the security prompt for Elluminate or something. At least with i3, that error dialog also appears to actually be a frame and is treated as a new application window. Likewise, the ITW splash screen does the same, although perhaps this one should be treated as an application window? Would you care to investigate those as well and roll it up into one patch since it's all probably the same thing over again? If not, then feel free to just push this one alone (with backport too probably) and the rest can just be fixed separately. Thanks, -- Andrew A From aazores at redhat.com Fri May 2 20:55:28 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 16:55:28 -0400 Subject: [icedtea-web] RFC: change download window to a jdialog In-Reply-To: <5364049F.8080806@redhat.com> References: <20140502203459.GB28557@redhat.com> <5364049F.8080806@redhat.com> Message-ID: <53640640.9040803@redhat.com> On 05/02/2014 04:48 PM, Andrew Azores wrote: > On 05/02/2014 04:34 PM, Omair Majid wrote: >> Hi, >> >> The current download progress indicator window in icedtea-web is a >> JFrame. Some window managers in Linux assume it's an actual application >> window and try to handle it's size and position in a more appropriate >> way. A tiling window manager, for example, will stretch it to fill the >> screen size. >> >> The attached patch makes it a JDialog so it's treated as a dialog and >> it's size and position are respected. >> >> Thanks, >> Omair >> > > Nice! > > There are other places that we should probably consider making this > change as well. For example, the "could not launch" dialog. Reproducer > - just hit cancel on the security prompt for Elluminate or something. > At least with i3, that error dialog also appears to actually be a > frame and is treated as a new application window. Likewise, the ITW > splash screen does the same, although perhaps this one should be > treated as an application window? Would you care to investigate those > as well and roll it up into one patch since it's all probably the same > thing over again? If not, then feel free to just push this one alone > (with backport too probably) and the rest can just be fixed separately. > > Thanks, > Hmm my mistake, the splash screen actually doesn't do that, I had remembered its issue incorrectly. Rather than filling the entire window, it actually shows up incredibly small! So that's probably a different fix required. The error dialog I think is the same though. Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Fri May 2 20:56:54 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 02 May 2014 20:56:54 +0000 Subject: [Bug 1759] New: Bonita Software crashes on Ubuntu 14.04 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1759 Bug ID: 1759 Summary: Bonita Software crashes on Ubuntu 14.04 Product: IcedTea Version: 7-hg Hardware: 64-bit OS: Linux Status: NEW Severity: blocker Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: henrique at arake.com.br CC: unassigned at icedtea.classpath.org Created attachment 1078 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1078&action=edit Error log It's a clean ubuntu installation and, at the first time, Bonita Software run smoothly. Now, java machine keeps crashing. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Fri May 2 20:58:26 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 02 May 2014 16:58:26 -0400 Subject: [icedtea-web] RFC: Fix caching of compressed content In-Reply-To: <20140502203210.GA28557@redhat.com> References: <20140502203210.GA28557@redhat.com> Message-ID: <536406F2.70009@redhat.com> On 05/02/2014 04:32 PM, Omair Majid wrote: > Hi, > > It was brought to my attention that icedtea-web was re-downloading the > jars (which should have been cached) on subsequent runs of a jnlp > application. I dug into it and found a real bug. > > To decide if an item is cached, icedtea-web does a HEAD request and > compares the Content-Length with the size of the file. This works fine > when the jars were not compressed. When the jars are fetched compressed > and then uncompressed on disk, there is a mismatch between the sizes and > icedtea-web decides the content is not cached. > > The attached patch stores the compressed size in the cache info file and > uses that instead of the actual file size in the size-comparison. > > Thoughts? > > Thanks, > Omair > Looks good, and I like the defaultValue param on getLongKey :) Can there be a reproducer for this? Or is there already an existing one? Manually testing looks good though, nothing appears broken and applets (eg Elluminate) don't appear to be redownloading, according to the progress bar which just jumps from 0 to 100. The delay before this happens is just the overhead from establishing a connection and waiting for the result of the HEAD request(s), right? Thanks, -- Andrew A From omajid at redhat.com Fri May 2 21:06:54 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 17:06:54 -0400 Subject: [icedtea-web] RFC: Use timeouts for checking if cache is fresh Message-ID: <20140502210654.GC28557@redhat.com> Hi, IcedTea-Web tries to check that the cached content is up-to-date by connecting to the server and doing HEAD requests. The problem is, some servers are too slow and checking that the cache is indeed up-to-date takes a very long time. One particular server was taking about 7 seconds to respond to each request, just to tell us that the cache was indeed up-to-date. The attached patch adds some basic (and I suspect incomplete) timeout functionality. IcedTea-Web will assume the cache is up-to-date if the server doesn't reply in a second or so. This significantly speeds up running cached applications. The proprietary javaws does something similar, as indicated at: http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/enhancements6.html Thoughts? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- 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 @@ -26,6 +26,7 @@ import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; +import java.net.SocketTimeoutException; import java.net.URL; import java.net.URLConnection; import java.security.AccessController; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.TimeUnit; import java.util.jar.JarOutputStream; import java.util.jar.Pack200; import java.util.jar.Pack200.Unpacker; @@ -42,6 +44,7 @@ import net.sourceforge.jnlp.DownloadOptions; import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.event.DownloadEvent; import net.sourceforge.jnlp.event.DownloadListener; import net.sourceforge.jnlp.runtime.JNLPRuntime; @@ -101,6 +104,8 @@ // separately locks on (in order of aquire order, ie, sync on prefetch never syncs on lock): // lock, prefetch, this.resources, each resource, listeners + public static final long NO_TIMEOUT = 0; + /** notified on initialization or download of a resource */ private static final Object lock = new Object(); // used to lock static structures @@ -147,11 +152,17 @@ /** whether to download parts before requested */ private boolean prefetch; + private long timeOutInMillis = NO_TIMEOUT; + /** * Creates a resource tracker that does not prefetch resources. */ public ResourceTracker() { - this(false); + this(false, Long.valueOf(JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_UPDATE_TIMEOUT))); + } + + public ResourceTracker(boolean prefetch) { + this(prefetch, Long.valueOf(JNLPRuntime.getConfiguration().getProperty(DeploymentConfiguration.KEY_UPDATE_TIMEOUT))); } /** @@ -159,7 +170,7 @@ * * @param prefetch whether to download resources before requested. */ - public ResourceTracker(boolean prefetch) { + public ResourceTracker(boolean prefetch, long timeoutInMillis) { this.prefetch = prefetch; if (prefetch) { @@ -168,6 +179,8 @@ prefetchTrackers.trimToSize(); } } + + this.timeOutInMillis = timeoutInMillis; } /** @@ -794,20 +807,41 @@ try { File localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); - // connect - URL finalLocation = findBestUrl(resource); - - if (finalLocation == null) { - OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Attempted to download " + resource.location + ", but failed to connect!"); - throw new NullPointerException("finalLocation == null"); // Caught below + long timeout = timeOutInMillis; + if (resource.getUpdatePolicy() == UpdatePolicy.FORCE) { + timeout = NO_TIMEOUT; } - resource.setDownloadLocation(finalLocation); - URLConnection connection = finalLocation.openConnection(); // this won't change so should be okay unsynchronized - connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); + URL finalLocation = findBestUrl(resource, timeout); - int size = connection.getContentLength(); - boolean current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; + boolean current = false; + long size = -1; + URLConnection connection = null; + + // if timeout or can't connect, use the cache + if (finalLocation == null) { + current = CacheUtil.isCached(resource.location, resource.requestVersion); + if (current) { + size = entry.getContentLength(); + } + } + + if (!current) { + final long NO_TIMEOUT = 0; + finalLocation = findBestUrl(resource, NO_TIMEOUT); + if (finalLocation == null) { + throw new IOException("Unable to connect to URL"); + } + + resource.setDownloadLocation(finalLocation); + connection = finalLocation.openConnection(); // this won't change so should be okay unsynchronized + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); + + size = connection.getContentLength(); + + current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; + } + if (!current) { if (entry.isCached()) { entry.markForDelete(); @@ -824,7 +858,7 @@ synchronized (resource) { resource.localFile = localFile; // resource.connection = connection; - resource.size = size; + resource.size = (int) size; resource.changeStatus(CONNECT | CONNECTING, CONNECTED); // check if up-to-date; if so set as downloaded @@ -870,7 +904,7 @@ * @throws IOException */ static int getUrlResponseCode(URL url, Map requestProperties, String requestMethod) throws IOException { - return getUrlResponseCodeWithRedirectonResult(url, requestProperties, requestMethod).result; + return getUrlResponseCodeWithRedirectonResult(url, requestProperties, requestMethod, NO_TIMEOUT).result; } private static class CodeWithRedirect { @@ -895,12 +929,16 @@ * Connects to the given URL, and grabs a response code and redirecton if * the URL uses the HTTP protocol, or returns an arbitrary valid HTTP * response code. + * + * @param timeoutInMillis the timeout in milliseconds. {@link #NO_TIMEOUT} + * means no timeout. * * @return the response code if HTTP connection and redirection value, or - * HttpURLConnection.HTTP_OK and null if not. + * HttpURLConnection.HTTP_OK and null if not. In case of timeout, + * {@code null} is returned. * @throws IOException */ - static CodeWithRedirect getUrlResponseCodeWithRedirectonResult(URL url, Map requestProperties, String requestMethod) throws IOException { + static CodeWithRedirect getUrlResponseCodeWithRedirectonResult(URL url, Map requestProperties, String requestMethod, long timeoutInMillis) throws IOException { CodeWithRedirect result = new CodeWithRedirect(); URLConnection connection = url.openConnection(); @@ -911,14 +949,18 @@ if (connection instanceof HttpURLConnection) { HttpURLConnection httpConnection = (HttpURLConnection) connection; httpConnection.setRequestMethod(requestMethod); + httpConnection.setReadTimeout((int)timeoutInMillis); - int responseCode = httpConnection.getResponseCode(); + try { + int responseCode = httpConnection.getResponseCode(); + /* Fully consuming current request helps with connection re-use + * See http://docs.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html */ + HttpUtils.consumeAndCloseConnectionSilently(httpConnection); - /* Fully consuming current request helps with connection re-use - * See http://docs.oracle.com/javase/1.5.0/docs/guide/net/http-keepalive.html */ - HttpUtils.consumeAndCloseConnectionSilently(httpConnection); - - result.result = responseCode; + result.result = responseCode; + } catch (SocketTimeoutException ste) { + return null; + } } Map> header = connection.getHeaderFields(); @@ -945,16 +987,18 @@ * and packing, if possible. * * @param resource the resource - * @return the best URL, or null if all failed to resolve + * @param timeoutInMillis the timeout before the server is declared + * non-responsive. To avoid any timeout, use {@link #NO_TIMEOUT}. + * @return the best URL, or null if all failed to resolve, or server is too slow */ - URL findBestUrl(Resource resource) { + URL findBestUrl(Resource resource, long timeoutInMillis) { DownloadOptions options = downloadOptions.get(resource); if (options == null) { options = new DownloadOptions(false, false); } List urls = new ResourceUrlCreator(resource, options).getUrls(); - OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "All possible urls for " + OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "All possible urls for " + resource.toString() + " : " + urls); for (String requestMethod : requestMethods) { @@ -964,7 +1008,11 @@ Map requestProperties = new HashMap(); requestProperties.put("Accept-Encoding", "pack200-gzip, gzip"); - CodeWithRedirect response = getUrlResponseCodeWithRedirectonResult(url, requestProperties, requestMethod); + CodeWithRedirect response = getUrlResponseCodeWithRedirectonResult(url, requestProperties, requestMethod, timeoutInMillis); + if (response == null) { + return null; + } + if (response.shouldRedirect()){ if (response.URL == null) { OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Although " + resource.toString() + " got redirect " + response.result + " code for " + requestMethod + " request for " + url.toExternalForm() + " the target was null. Not following"); @@ -1180,8 +1228,9 @@ } } } - if (finished) + if (finished) { return true; + } // wait long waitTime = 0; From omajid at icedtea.classpath.org Fri May 2 22:03:41 2014 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Fri, 02 May 2014 22:03:41 +0000 Subject: /hg/icedtea-web: Fix package name in package-info files Message-ID: changeset 57cc65b595c2 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=57cc65b595c2 author: Omair Majid date: Fri May 02 17:48:24 2014 -0400 Fix package name in package-info files The package prefix is 'net', not 'netx'. 2014-05-02 Omair Majid * netx/net/sourceforge/jnlp/cache/package-info.java, * netx/net/sourceforge/jnlp/runtime/package-info.java, * netx/net/sourceforge/jnlp/services/package-info.java: Fix package name by replacing 'netx' with 'net'. diffstat: ChangeLog | 7 +++++++ netx/net/sourceforge/jnlp/cache/package-info.java | 2 +- netx/net/sourceforge/jnlp/runtime/package-info.java | 2 +- netx/net/sourceforge/jnlp/services/package-info.java | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diffs (41 lines): diff -r 3f9913affb06 -r 57cc65b595c2 ChangeLog --- a/ChangeLog Tue Apr 15 11:32:02 2014 +0200 +++ b/ChangeLog Fri May 02 17:48:24 2014 -0400 @@ -1,3 +1,10 @@ +2014-05-02 Omair Majid + + * netx/net/sourceforge/jnlp/cache/package-info.java, + * netx/net/sourceforge/jnlp/runtime/package-info.java, + * netx/net/sourceforge/jnlp/services/package-info.java: Fix package name + by replacing 'netx' with 'net'. + 2014-04-15 Jiri Vanek Reflect possibility of disabled manifest check to unit-test diff -r 3f9913affb06 -r 57cc65b595c2 netx/net/sourceforge/jnlp/cache/package-info.java --- a/netx/net/sourceforge/jnlp/cache/package-info.java Tue Apr 15 11:32:02 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/package-info.java Fri May 02 17:48:24 2014 -0400 @@ -33,4 +33,4 @@ /** * This package contains the JNLP cache. */ -package netx.sourceforge.jnlp.cache; +package net.sourceforge.jnlp.cache; diff -r 3f9913affb06 -r 57cc65b595c2 netx/net/sourceforge/jnlp/runtime/package-info.java --- a/netx/net/sourceforge/jnlp/runtime/package-info.java Tue Apr 15 11:32:02 2014 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/package-info.java Fri May 02 17:48:24 2014 -0400 @@ -34,4 +34,4 @@ * This package contains the classes that manage the secure runtime environment * for JNLP apps. */ -package netx.sourceforge.jnlp.runtime; +package net.sourceforge.jnlp.runtime; diff -r 3f9913affb06 -r 57cc65b595c2 netx/net/sourceforge/jnlp/services/package-info.java --- a/netx/net/sourceforge/jnlp/services/package-info.java Tue Apr 15 11:32:02 2014 +0200 +++ b/netx/net/sourceforge/jnlp/services/package-info.java Fri May 02 17:48:24 2014 -0400 @@ -34,4 +34,4 @@ * This package contains the classes that implement the standard services * defined by the JNLP specification. */ -package netx.sourceforge.jnlp.services; +package net.sourceforge.jnlp.services; From omajid at redhat.com Fri May 2 22:50:42 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 18:50:42 -0400 Subject: [icedtea-web] RFC: change download window to a jdialog In-Reply-To: <53640640.9040803@redhat.com> References: <20140502203459.GB28557@redhat.com> <5364049F.8080806@redhat.com> <53640640.9040803@redhat.com> Message-ID: <20140502225042.GD28557@redhat.com> * Andrew Azores [2014-05-02 16:55]: > On 05/02/2014 04:48 PM, Andrew Azores wrote: > >On 05/02/2014 04:34 PM, Omair Majid wrote: > >>The attached patch makes it a JDialog so it's treated as a dialog and > >>it's size and position are respected. > >> > >There are other places that we should probably consider making > >this change as well. For example, the "could not launch" dialog. > >Reproducer - just hit cancel on the security prompt for Elluminate > >or something. At least with i3, that error dialog also appears to > >actually be a frame and is treated as a new application window. > >Likewise, the ITW splash screen does the same, although perhaps > >this one should be treated as an application window? Would you > >care to investigate those as well and roll it up into one patch > >since it's all probably the same thing over again? If not, then > >feel free to just push this one alone (with backport too probably) > >and the rest can just be fixed separately. > > Hmm my mistake, the splash screen actually doesn't do that, I had > remembered its issue incorrectly. Rather than filling the entire > window, it actually shows up incredibly small! So that's probably a > different fix required. The error dialog I think is the same though. I looked at the error dialog (BasicExceptionDialog), and it's a different case. It's already a JDialog; it's the call to `JDialog.setResizable(true)` that somehow makes the window manager treat it like a JFrame. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at icedtea.classpath.org Fri May 2 23:12:24 2014 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Fri, 02 May 2014 23:12:24 +0000 Subject: /hg/icedtea-web: Change download progress indicator to a JDialog Message-ID: changeset 8012d1bbbe72 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=8012d1bbbe72 author: Omair Majid date: Fri May 02 19:11:11 2014 -0400 Change download progress indicator to a JDialog The current download progress indicator window is a JFrame. Some window managers in Linux assume it's an application window and try to handle its size and position in a more appropriate way. A tiling window manager, for example, will resize it to fill the screen. Change it to a JDialog so it's treated as a dialog and its size and position are respected. 2014-05-02 Omair Majid * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Switch to JDialog from JFrame. Rename frame to dialog and frameMutex to dialogMutex. Adjust all Callers. diffstat: ChangeLog | 6 + netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java | 56 +++++----- 2 files changed, 34 insertions(+), 28 deletions(-) diffs (143 lines): diff -r 57cc65b595c2 -r 8012d1bbbe72 ChangeLog --- a/ChangeLog Fri May 02 17:48:24 2014 -0400 +++ b/ChangeLog Fri May 02 19:11:11 2014 -0400 @@ -1,3 +1,9 @@ +2014-05-02 Omair Majid + + * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Switch to + JDialog from JFrame. Rename frame to dialog and frameMutex to dialogMutex. + Adjust all Callers. + 2014-05-02 Omair Majid * netx/net/sourceforge/jnlp/cache/package-info.java, diff -r 57cc65b595c2 -r 8012d1bbbe72 netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java --- a/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java Fri May 02 17:48:24 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java Fri May 02 19:11:11 2014 -0400 @@ -58,8 +58,8 @@ private static final int CLOSE_DELAY = 750; /** the display window */ - private static JFrame frame; - private static final Object frameMutex = new Object(); + private static JDialog dialog; + private static final Object dialogMutex = new Object(); /** shared constraint */ static GridBagConstraints vertical; @@ -104,9 +104,9 @@ public DownloadServiceListener getListener(ApplicationInstance app, String downloadName, URL resources[]) { DownloadPanel result = new DownloadPanel(downloadName); - synchronized (frameMutex) { - if (frame == null) { - frame=createDownloadIndicatorFrame(true); + synchronized (dialogMutex) { + if (dialog == null) { + dialog = createDownloadIndicatorWindow(true); } if (resources != null) { @@ -116,8 +116,8 @@ } } - frame.getContentPane().add(result, vertical); - frame.pack(); + dialog.getContentPane().add(result, vertical); + dialog.pack(); placeFrameToLowerRight(); result.addComponentListener(new ComponentAdapter() { @Override @@ -126,14 +126,14 @@ } }); - frame.setVisible(true); + dialog.setVisible(true); return result; } } - public static JFrame createDownloadIndicatorFrame(boolean undecorated) throws HeadlessException { - JFrame f = new JFrame(downloading + "..."); + public static JDialog createDownloadIndicatorWindow(boolean undecorated) throws HeadlessException { + JDialog f = new JDialog((JFrame)null, downloading + "..."); f.setUndecorated(undecorated); f.setIconImages(ImageResources.INSTANCE.getApplicationImages()); f.getContentPane().setLayout(new GridBagLayout()); @@ -145,8 +145,8 @@ */ private static void placeFrameToLowerRight() throws HeadlessException { Rectangle bounds = ScreenFinder.getCurrentScreenSizeWithoutBounds(); - frame.setLocation(bounds.width+bounds.x - frame.getWidth(), - bounds.height+bounds.y - frame.getHeight()); + dialog.setLocation(bounds.width+bounds.x - dialog.getWidth(), + bounds.height+bounds.y - dialog.getHeight()); } /** @@ -160,14 +160,14 @@ ActionListener hider = new ActionListener() { public void actionPerformed(ActionEvent evt) { - synchronized(frameMutex) { - frame.getContentPane().remove((DownloadPanel) listener); - frame.pack(); + synchronized(dialogMutex) { + dialog.getContentPane().remove((DownloadPanel) listener); + dialog.pack(); - if (frame.getContentPane().getComponentCount() == 0) { - frame.setVisible(false); - frame.dispose(); - frame = null; + if (dialog.getContentPane().getComponentCount() == 0) { + dialog.setVisible(false); + dialog.dispose(); + dialog = null; } } } @@ -253,14 +253,14 @@ } public void recreateFrame(boolean undecorated) throws HeadlessException { - JFrame oldFrame = frame; - frame = createDownloadIndicatorFrame(undecorated); - frame.getContentPane().add(self, vertical); - synchronized (frameMutex) { - frame.pack(); + JDialog oldFrame = dialog; + dialog = createDownloadIndicatorWindow(undecorated); + dialog.getContentPane().add(self, vertical); + synchronized (dialogMutex) { + dialog.pack(); placeFrameToLowerRight(); } - frame.setVisible(true); + dialog.setVisible(true); oldFrame.dispose(); } }); @@ -294,8 +294,8 @@ add(mainProgressPanel, verticalIndent); state=States.COLLAPSED; } - synchronized (frameMutex) { - frame.pack(); + synchronized (dialogMutex) { + dialog.pack(); placeFrameToLowerRight(); } @@ -333,7 +333,7 @@ // each update. header.setText(downloading + " " + downloadName + ": " + percent + "% " + complete + "."); Container c = header.getParent(); - //we need to adapt both panels and also frame to new length of header text + //we need to adapt both panels and also dialog to new length of header text while (c != null) { c.invalidate(); c.validate(); From omajid at redhat.com Fri May 2 23:17:05 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 19:17:05 -0400 Subject: [icedtea-web] RFC: change download window to a jdialog In-Reply-To: <5364049F.8080806@redhat.com> References: <20140502203459.GB28557@redhat.com> <5364049F.8080806@redhat.com> Message-ID: <20140502231705.GE28557@redhat.com> * Andrew Azores [2014-05-02 16:48]: > On 05/02/2014 04:34 PM, Omair Majid wrote: > >The current download progress indicator window in icedtea-web is a > >JFrame. Some window managers in Linux assume it's an actual application > >window and try to handle it's size and position in a more appropriate > >way. A tiling window manager, for example, will stretch it to fill the > >screen size. > > > >The attached patch makes it a JDialog so it's treated as a dialog and > >it's size and position are respected. Thanks for the review! > There are other places that we should probably consider making this > change as well. For example, the "could not launch" dialog. > Reproducer - just hit cancel on the security prompt for Elluminate > or something. At least with i3, that error dialog also appears to > actually be a frame and is treated as a new application window. Thanks, I can reproduce this issue. > Would you care to > investigate those as well and roll it up into one patch since it's > all probably the same thing over again? If not, then feel free to > just push this one alone (with backport too probably) and the rest > can just be fixed separately. I have pushed this patch; I will look at the other cases separately. The issue seems somewhat different. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Fri May 2 23:21:16 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 19:21:16 -0400 Subject: [rfc][icedtea-web] disconnecting httpurlconnections In-Reply-To: <5363AEBF.50306@redhat.com> References: <5360F0D1.7060003@redhat.com> <20140430152809.GE2047@redhat.com> <53611BA3.5070505@redhat.com> <53639EF0.7080707@redhat.com> <20140502142540.GA2886@redhat.com> <5363AEBF.50306@redhat.com> Message-ID: <20140502232115.GF28557@redhat.com> * Andrew Azores [2014-05-02 10:42]: > On 05/02/2014 10:25 AM, Omair Majid wrote: > >* Jiri Vanek [2014-05-02 09:34]: > >>I will elaborate a bit more, but if you may say few more words, it > >>would be nice:(( > >Sorry, but I know next to nothing about this area. All I know is that > >Adam looked into it and decided that disconnect() is best avoided. > > Maybe I'm just missing something but I really don't see how he came > to the conclusion that disconnect() should be avoided... the initial > problem seems to be that a new connection was being made and only > the response code being read, nothing else. The proposed solution > was to do this but then close the connection. The comment Adam > refers to states that rather than simply disconnecting after reading > the response code, the connection should actually do something - > consume and discard it, or simply use a HEAD request in the first > place - so as to not confuse these "mediocre" web servers (which > presumably are expecting a GET request to actually want the response > body, so they hang on sending it unless interrupted by a > disconnect). Adam himself even says that it's difficult to actually > reuse connections, which is AFAICT the reason they weren't > disconnected to begin with. Why would it not be correct to both (1) > use HEAD request with consume/discard fallback, (2) disconnect when > finished, if the connection is not going to be reused later? As Jiri > says, is the overhead incurred by creating new connections really > that bad that we should deal with evidently flaky connection reuse? Your explanation does make sense. My knowledge of this topic is very rudimentary and is pretty much limited to recalling that Adam avoided calls to disconnect. If the makes sense to you, then no objections from me. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Fri May 2 23:27:55 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 2 May 2014 19:27:55 -0400 Subject: [icedtea-web] RFC: Fix caching of compressed content In-Reply-To: <536406F2.70009@redhat.com> References: <20140502203210.GA28557@redhat.com> <536406F2.70009@redhat.com> Message-ID: <20140502232755.GG28557@redhat.com> Hi, * Andrew Azores [2014-05-02 16:58]: > On 05/02/2014 04:32 PM, Omair Majid wrote: > >It was brought to my attention that icedtea-web was re-downloading the > >jars (which should have been cached) on subsequent runs of a jnlp > >application. I dug into it and found a real bug. > > > >To decide if an item is cached, icedtea-web does a HEAD request and > >compares the Content-Length with the size of the file. This works fine > >when the jars were not compressed. When the jars are fetched compressed > >and then uncompressed on disk, there is a mismatch between the sizes and > >icedtea-web decides the content is not cached. > > > >The attached patch stores the compressed size in the cache info file and > >uses that instead of the actual file size in the size-comparison. > > Can there be a reproducer for this? This is not a functional change (at least, I really hope it isn't). It's a performance change. I am not sure how to write a reproducer that checks for startup speed. Any suggestions? > Or is there already an existing one? The test case that I used for this is a production server that's internal, sadly. > Manually testing looks good though, nothing appears broken and > applets (eg Elluminate) don't appear to be redownloading, according > to the progress bar which just jumps from 0 to 100. Yeah, that 0 to 100 jump means that the cache is working correctly. Were any of these test cases re-downloading before? > The delay before > this happens is just the overhead from establishing a connection and > waiting for the result of the HEAD request(s), right? Yes. This delay should be very small (I measured 0 seconds on many lookups) but can be as large as ~10 seconds. See my other patch for a timeout implementation that improves this too. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Sat May 3 03:05:30 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 03 May 2014 03:05:30 +0000 Subject: [Bug 1752] Eclipse crashed after system upgrade, and upgrade JVM. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1752 Damon Smith changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |damon.default at gmail.com --- Comment #1 from Damon Smith --- I got this too, I don't think this is an IcedTea problem, it seems to be a problem with libsoup (an http client library). This bug report has a workaround: https://bugs.eclipse.org/bugs/show_bug.cgi?id=405786 it says just add -Dorg.eclipse.swt.browser.DefaultType=mozilla to your eclipse.ini which I assume forces eclipse to use mozilla for http connections instead of libsoup. Works for me anyway. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Sat May 3 17:54:29 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 03 May 2014 17:54:29 +0000 Subject: [Bug 1752] Eclipse crashed after system upgrade, and upgrade JVM. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1752 Damian Giebas changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #2 from Damian Giebas --- It is very helpfull. Thank you. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Sat May 3 20:02:59 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 03 May 2014 20:02:59 +0000 Subject: [Bug 1760] New: a fatal error SIGSEGV (0xb) at pc=0x6a492bec, pid=17406, tid=3059387200 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1760 Bug ID: 1760 Summary: a fatal error SIGSEGV (0xb) at pc=0x6a492bec, pid=17406, tid=3059387200 Product: IcedTea Version: 7-hg Hardware: unspecified OS: Linux Status: NEW Severity: major Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: mklingen87 at gmail.com CC: unassigned at icedtea.classpath.org Created attachment 1079 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1079&action=edit log file error occured on running the open cv project in netbeans -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Mon May 5 08:45:39 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 05 May 2014 08:45:39 +0000 Subject: /hg/gfx-test: Eleven helper methods added into CommonBitmapOpera... Message-ID: changeset 6a0991824cdb in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=6a0991824cdb author: Pavel Tisnovsky date: Mon May 05 10:46:18 2014 +0200 Eleven helper methods added into CommonBitmapOperations. diffstat: ChangeLog | 5 + src/org/gfxtest/framework/CommonBitmapOperations.java | 325 +++++++++++++++++- 2 files changed, 329 insertions(+), 1 deletions(-) diffs (422 lines): diff -r 32c273c0ef64 -r 6a0991824cdb ChangeLog --- a/ChangeLog Fri May 02 09:46:53 2014 +0200 +++ b/ChangeLog Mon May 05 10:46:18 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-05 Pavel Tisnovsky + + * src/org/gfxtest/framework/CommonBitmapOperations.java: + Eleven helper methods added into CommonBitmapOperations. + 2014-05-01 Pavel Tisnovsky * src/org/gfxtest/testsuites/CAGOperationsOnChordAndRectangle.java: diff -r 32c273c0ef64 -r 6a0991824cdb src/org/gfxtest/framework/CommonBitmapOperations.java --- a/src/org/gfxtest/framework/CommonBitmapOperations.java Fri May 02 09:46:53 2014 +0200 +++ b/src/org/gfxtest/framework/CommonBitmapOperations.java Mon May 05 10:46:18 2014 +0200 @@ -2300,6 +2300,33 @@ } /** + * Create new buffered image containing horizontal yellow gradient 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithHorizontalYellowGradientImage(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createHorizontalYellowGradientImage(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing vertical yellow gradient and then perform basic BitBlt test. * * @param image @@ -2352,6 +2379,33 @@ } /** + * Create new buffered image containing vertical yellow gradient 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithVerticalYellowGradientImage(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createVerticalYellowGradientImage(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing horizontal magenta gradient and then perform basic BitBlt test. * * @param image @@ -2404,6 +2458,33 @@ } /** + * Create new buffered image containing horizontal magenta gradient 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithHorizontalMagentaGradientImage(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createHorizontalMagentaGradientImage(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing vertical magenta gradient and then perform basic BitBlt test. * * @param image @@ -2456,6 +2537,33 @@ } /** + * Create new buffered image containing vertical magenta gradient 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithVerticalMagentaGradientImage(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createVerticalMagentaGradientImage(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing horizontal cyan gradient and then perform basic BitBlt test. * * @param image @@ -2508,6 +2616,33 @@ } /** + * Create new buffered image containing horizontal cyan gradient 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithHorizontalCyanGradientImage(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createHorizontalCyanGradientImage(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing vertical cyan gradient and then perform basic BitBlt test. * * @param image @@ -2560,6 +2695,33 @@ } /** + * Create new buffered image containing vertical cyan gradient 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithVerticalCyanGradientImage(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + // bitmap should contains checker pattern + BufferedImage bufferedImage = ImageFactory.createVerticalCyanGradientImage(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing RGB pattern #1 and then perform * basic BitBlt test. * @@ -2615,6 +2777,33 @@ } /** + * Create new buffered image containing RGB pattern #1 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithRGBTexture1Image(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + BufferedImage bufferedImage = ProceduralTextureFactory.createRGBTexture1(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing RGB pattern #2 and then perform * basic BitBlt test. * @@ -2670,6 +2859,33 @@ } /** + * Create new buffered image containing RGB pattern #2 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithRGBTexture2Image(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + BufferedImage bufferedImage = ProceduralTextureFactory.createRGBTexture2(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing RGB pattern #3 and then perform * basic BitBlt test. * @@ -2725,6 +2941,33 @@ } /** + * Create new buffered image containing RGB pattern #3 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithRGBTexture3Image(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + BufferedImage bufferedImage = ProceduralTextureFactory.createRGBTexture3(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing RGB pattern #4 and then perform * basic BitBlt test. * @@ -2780,6 +3023,33 @@ } /** + * Create new buffered image containing RGB pattern #4 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithRGBTexture4Image(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + BufferedImage bufferedImage = ProceduralTextureFactory.createRGBTexture4(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing RGB pattern #5 and then perform * basic BitBlt test. * @@ -2835,6 +3105,33 @@ } /** + * Create new buffered image containing RGB pattern #5 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithRGBTexture5Image(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + BufferedImage bufferedImage = ProceduralTextureFactory.createRGBTexture5(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + + /** * Create new buffered image containing RGB pattern #6 and then perform * basic BitBlt test. * @@ -2889,5 +3186,31 @@ return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, width, height) ? TestResult.PASSED : TestResult.FAILED; } + /** + * Create new buffered image containing RGB pattern #6 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 rop + * selected raster operation + */ + public static TestResult doBitBltTestWithRGBTexture6Image(TestImage image, Graphics2D graphics2d, int imageType, BufferedImageOp rop) + { + // create new buffered bitmap with given type + BufferedImage bufferedImage = ProceduralTextureFactory.createRGBTexture6(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, no flipping and no cropping and using RescaleOp + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, rop) ? TestResult.PASSED : TestResult.FAILED; + } + } - From jvanek at redhat.com Mon May 5 10:40:57 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 05 May 2014 12:40:57 +0200 Subject: icedtea6 debug build is missing some targets Message-ID: <53676AB9.5000404@redhat.com> Hi! When I build icedtea6 normally, I have this at the end of build: .......... IcedTea is served: /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build mkdir -p stamps touch stamps/icedtea.stamp printf -- '-jamvm ERROR\n' >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg touch stamps/add-jamvm.stamp printf -- '-cacao ERROR\n' >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg touch stamps/add-cacao.stamp printf -- '-zero ERROR\n' >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg printf -- '-shark ERROR\n' >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg touch stamps/add-zero.stamp mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset grep "client IGNORE" /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg; \ if test $? -eq 0; then \ sed -e '/\/client\/libjvm.so/d' \ < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot.stp \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot.stp; \ sed -e '/\/client\/libjvm.so/d' \ < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_gc.stp \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_gc.stp; \ sed -e '/\/client\/libjvm.so/d' \ < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_jni.stp \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_jni.stp; \ else \ cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot.stp \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot.stp; \ cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_jni.stp \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_jni.stp; \ fi -client IGNORE cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/jstack.stp \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/jstack.stp touch stamps/add-systemtap.stamp mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes (cd /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java; \ /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m -source 6 -target 6 -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -bootclasspath /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/jre/lib/rt.jar:/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/jre/lib/jsse.jar \ org/classpath/icedtea/pulseaudio/*.java \ ) cp -r /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java/META-INF /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes chmod -R ug+w /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes/META-INF mkdir -p stamps touch stamps/pulse-java-class.stamp mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes; /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/jar cf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar -C /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes .; mkdir -p stamps touch stamps/pulse-java-jar.stamp mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes org.classpath.icedtea.pulseaudio.EventLoop ; \ /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes org.classpath.icedtea.pulseaudio.Stream ; \ /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes org.classpath.icedtea.pulseaudio.Operation; \ /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \ /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \ /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes org.classpath.icedtea.pulseaudio.ContextEvent; \ mkdir -p stamps touch stamps/pulse-java-headers.stamp gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/jni-common.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/jni-common.c gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_ContextEvent.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_ContextEvent.c gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_EventLoop.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Operation.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation.c gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Stream.o -c /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c gcc -shared /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/jni-common.o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_ContextEvent.o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_EventLoop.o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Operation.o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Stream.o -lpulse \ -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so mkdir -p stamps touch stamps/pulse-java.stamp cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64 cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/amd64 cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/ext cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/ext (cd /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java && \ /usr/bin/zip -qur /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/src.zip org ) touch stamps/add-pulseaudio.stamp if [ -d /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security ] ; then \ cp -v /builddir/build/BUILD/icedtea6-1.13.3/nss.cfg \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security; \ cp -v /builddir/build/BUILD/icedtea6-1.13.3/nss.cfg \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security; \ rm -f stamps/add-nss.stamp.tmp; \ touch stamps/add-nss.stamp.tmp; \ all_patches_ok=yes; \ for dir in /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/{j2sdk-image/jre,j2re-image} ; \ do \ pushd $dir ; \ cp -v $dir/lib/security/java.security{,.old} ; \ for p in patches/nss-not-enabled-config.patch ; \ do \ if test x${all_patches_ok} = "xyes" \ && echo Checking $p \ && /usr/bin/patch -l -p0 --dry-run -s -t -f -F0 \ < /builddir/build/BUILD/icedtea6-1.13.3/$p ; \ then \ echo Applying $p ; \ /usr/bin/patch -l -p0 -F0 < /builddir/build/BUILD/icedtea6-1.13.3/$p ; \ if ! grep "^\* $(basename $p)" /builddir/build/BUILD/icedtea6-1.13.3/HACKING \ >> /builddir/build/BUILD/icedtea6-1.13.3/stamps/add-nss.stamp.tmp ; \ then \ echo "* $(basename $p): UNDOCUMENTED" \ >> /builddir/build/BUILD/icedtea6-1.13.3/stamps/add-nss.stamp.tmp ; \ fi ; \ else \ test x${all_patches_ok} = "xyes" && all_patches_ok=$p ; \ fi ; \ done ; \ popd ; \ done ; \ mv stamps/add-nss.stamp.tmp stamps/add-nss.stamp ; \ if ! test x${all_patches_ok} = "xyes"; then \ echo ERROR patch ${all_patches_ok} FAILED! ; \ echo WARNING make clean-add-nss before retrying a fix ; \ exit 2; \ fi \ else \ echo "NO /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security dir"; \ fi `/builddir/build/BUILD/icedtea6-1.13.3/nss.cfg' -> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/nss.cfg' `/builddir/build/BUILD/icedtea6-1.13.3/nss.cfg' -> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/nss.cfg' ~/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre ~/build/BUILD/icedtea6-1.13.3 `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/java.security' -> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/java.security.old' Checking patches/nss-not-enabled-config.patch Applying patches/nss-not-enabled-config.patch patching file lib/security/java.security.old ~/build/BUILD/icedtea6-1.13.3 ~/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image ~/build/BUILD/icedtea6-1.13.3 `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/java.security' -> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/java.security.old' Checking patches/nss-not-enabled-config.patch Applying patches/nss-not-enabled-config.patch patching file lib/security/java.security.old ~/build/BUILD/icedtea6-1.13.3 if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib ] ; then \ cp -v /builddir/build/BUILD/icedtea6-1.13.3/tz.properties \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib ; \ fi `/builddir/build/BUILD/icedtea6-1.13.3/tz.properties' -> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/tz.properties' touch stamps/add-tzdata-support.stamp touch stamps/pax-mark-vm.stamp if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java ] ; then \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java -Xshare:dump ; \ fi Loading classes to share ... done. Rewriting and unlinking classes ... done. Calculating hash values for String objects .. done. Calculating fingerprints ... done. Removing unshareable information ... done. Moving common symbols to metadata section at 0x00002b1e0df56ae0 ... done. Moving vmSymbols to metadata section at 0x00002b1e0e166e98 ... done. Moving the remaining symbols to metadata section at 0x00002b1e0e168728 ... done. Moved 57393 symbols, 2169928 bytes. Moving pre-ordered read-only objects to shared space at 0x00002b1e0c750000 ... done. Moving read-only objects to shared space at 0x00002b1e0cd2afd8 ... done. Moving string char arrays to shared space at 0x00002b1e0cd2dc38 ... done. Moving pre-ordered read-write objects to shared space at 0x00002b1e0d150000 ... done. Moving read-write objects to shared space at 0x00002b1e0dd6f7e0 ... done. Moving String objects to shared space at 0x00002b1e0ddf1b48 ... done. Read-write space ends at 0x00002b1e0de68590, 13731216 bytes. Updating references to shared objects ... done. touch stamps/add-archive.stamp mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m -source 6 -target 6 \ -d /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build ./TestCryptoLevel.java mkdir -p stamps touch stamps/cryptocheck.stamp if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java ] ; then \ /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java -cp /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build TestCryptoLevel ; \ fi Running IcedTea with the original crypto patch. mkdir -p stamps touch stamps/check-crypto.stamp mkdir -p stamps touch stamps/icedtea-against-icedtea.stamp ++ pwd + chmod 644 /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/lib/sa-jdi.jar .......... But, when i run this in debug mode, all this is missing: .... IcedTea (debug build) is served: /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build-debug mkdir -p stamps touch stamps/icedtea-debug.stamp ++ pwd + chmod 644 /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build-debug/j2sdk-image/lib/sa-jdi.jar .... (the ++ pwd... and + chmod is already outside icedtea6 makefile) Are those targets missing in purpose? I recognize touch stamps/add-jamvm.stamp touch stamps/add-cacao.stamp touch stamps/add-zero.stamp are just touches, for case of hotspot build, but following may be missing: touch stamps/add-systemtap.stamp touch stamps/pulse-java-class.stamp stamps/pulse-java-jar.stamp touch stamps/pulse-java-headers.stamp touch stamps/pulse-java.stamp touch stamps/add-pulseaudio.stamp touch stamps/add-tzdata-support.stamp touch stamps/pax-mark-vm.stamp touch stamps/add-archive.stamp touch stamps/cryptocheck.stamp touch stamps/check-crypto.stamp touch stamps/icedtea-against-icedtea.stamp I'm especially interested in missing tapet :) J. From jvanek at redhat.com Mon May 5 10:50:48 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 05 May 2014 12:50:48 +0200 Subject: icedtea6 debug build is missing some targets In-Reply-To: <53676AB9.5000404@redhat.com> References: <53676AB9.5000404@redhat.com> Message-ID: <53676D08.2040400@redhat.com> Ouch. I was launching wrong target! icedtea-debug-against-icedtea is the right one. Sorry for noise. J. On 05/05/2014 12:40 PM, Jiri Vanek wrote: > Hi! > > When I build icedtea6 normally, I have this at the end of build: > > > .......... > IcedTea is served: /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build > mkdir -p stamps > touch stamps/icedtea.stamp > printf -- '-jamvm ERROR\n' >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg > touch stamps/add-jamvm.stamp > printf -- '-cacao ERROR\n' >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg > touch stamps/add-cacao.stamp > printf -- '-zero ERROR\n' >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg > printf -- '-shark ERROR\n' >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg > touch stamps/add-zero.stamp > mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset > grep "client IGNORE" > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg; \ > if test $? -eq 0; then \ > sed -e '/\/client\/libjvm.so/d' \ > < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot.stp \ > > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot.stp; \ > sed -e '/\/client\/libjvm.so/d' \ > < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_gc.stp \ > > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_gc.stp; \ > sed -e '/\/client\/libjvm.so/d' \ > < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_jni.stp \ > > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_jni.stp; \ > else \ > cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot.stp \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot.stp; \ > cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_jni.stp \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_jni.stp; \ > fi > -client IGNORE > cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/jstack.stp \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/jstack.stp > touch stamps/add-systemtap.stamp > mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > (cd /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java; \ > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 > -J-Xmx1024m -source 6 -target 6 -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -bootclasspath > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/jre/lib/rt.jar:/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/jre/lib/jsse.jar > \ > org/classpath/icedtea/pulseaudio/*.java \ > ) > cp -r /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java/META-INF > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > chmod -R ug+w /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes/META-INF > mkdir -p stamps > touch stamps/pulse-java-class.stamp > mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes; > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/jar cf > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar -C > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes .; > mkdir -p stamps > touch stamps/pulse-java-jar.stamp > mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > org.classpath.icedtea.pulseaudio.EventLoop ; \ > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > org.classpath.icedtea.pulseaudio.Stream ; \ > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > org.classpath.icedtea.pulseaudio.Operation; \ > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \ > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \ > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ > -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes > org.classpath.icedtea.pulseaudio.ContextEvent; \ > mkdir -p stamps > touch stamps/pulse-java-headers.stamp > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/jni-common.o -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/jni-common.c > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_ContextEvent.o > -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_ContextEvent.c > > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_EventLoop.o > -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c > > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Operation.o > -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation.c > > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.o > -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c > > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o > -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c > > gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux > -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ > -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Stream.o > -c > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c > gcc -shared /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/jni-common.o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_ContextEvent.o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_EventLoop.o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Operation.o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o > /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Stream.o > -lpulse \ > -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so > mkdir -p stamps > touch stamps/pulse-java.stamp > cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64 > cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/amd64 > cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/ext > cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/ext > (cd /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java && \ > /usr/bin/zip -qur /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/src.zip org ) > touch stamps/add-pulseaudio.stamp > if [ -d /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security ] ; then \ > cp -v /builddir/build/BUILD/icedtea6-1.13.3/nss.cfg \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security; \ > cp -v /builddir/build/BUILD/icedtea6-1.13.3/nss.cfg \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security; \ > rm -f stamps/add-nss.stamp.tmp; \ > touch stamps/add-nss.stamp.tmp; \ > all_patches_ok=yes; \ > for dir in /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/{j2sdk-image/jre,j2re-image} ; \ > do \ > pushd $dir ; \ > cp -v $dir/lib/security/java.security{,.old} ; \ > for p in patches/nss-not-enabled-config.patch ; \ > do \ > if test x${all_patches_ok} = "xyes" \ > && echo Checking $p \ > && /usr/bin/patch -l -p0 --dry-run -s -t -f -F0 \ > < /builddir/build/BUILD/icedtea6-1.13.3/$p ; \ > then \ > echo Applying $p ; \ > /usr/bin/patch -l -p0 -F0 < /builddir/build/BUILD/icedtea6-1.13.3/$p ; \ > if ! grep "^\* $(basename $p)" /builddir/build/BUILD/icedtea6-1.13.3/HACKING \ > >> /builddir/build/BUILD/icedtea6-1.13.3/stamps/add-nss.stamp.tmp ; \ > then \ > echo "* $(basename $p): UNDOCUMENTED" \ > >> /builddir/build/BUILD/icedtea6-1.13.3/stamps/add-nss.stamp.tmp ; \ > fi ; \ > else \ > test x${all_patches_ok} = "xyes" && all_patches_ok=$p ; \ > fi ; \ > done ; \ > popd ; \ > done ; \ > mv stamps/add-nss.stamp.tmp stamps/add-nss.stamp ; \ > if ! test x${all_patches_ok} = "xyes"; then \ > echo ERROR patch ${all_patches_ok} FAILED! ; \ > echo WARNING make clean-add-nss before retrying a fix ; \ > exit 2; \ > fi \ > else \ > echo "NO /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security > dir"; \ > fi > `/builddir/build/BUILD/icedtea6-1.13.3/nss.cfg' -> > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/nss.cfg' > `/builddir/build/BUILD/icedtea6-1.13.3/nss.cfg' -> > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/nss.cfg' > ~/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre ~/build/BUILD/icedtea6-1.13.3 > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/java.security' -> > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/java.security.old' > Checking patches/nss-not-enabled-config.patch > Applying patches/nss-not-enabled-config.patch > patching file lib/security/java.security.old > ~/build/BUILD/icedtea6-1.13.3 > ~/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image ~/build/BUILD/icedtea6-1.13.3 > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/java.security' -> > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/java.security.old' > Checking patches/nss-not-enabled-config.patch > Applying patches/nss-not-enabled-config.patch > patching file lib/security/java.security.old > ~/build/BUILD/icedtea6-1.13.3 > if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib ] ; then \ > cp -v /builddir/build/BUILD/icedtea6-1.13.3/tz.properties \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib ; \ > fi > `/builddir/build/BUILD/icedtea6-1.13.3/tz.properties' -> > `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/tz.properties' > touch stamps/add-tzdata-support.stamp > touch stamps/pax-mark-vm.stamp > if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java ] ; then \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java -Xshare:dump ; \ > fi > Loading classes to share ... done. > Rewriting and unlinking classes ... done. > Calculating hash values for String objects .. done. > Calculating fingerprints ... done. > Removing unshareable information ... done. > Moving common symbols to metadata section at 0x00002b1e0df56ae0 ... done. > Moving vmSymbols to metadata section at 0x00002b1e0e166e98 ... done. > Moving the remaining symbols to metadata section at 0x00002b1e0e168728 ... done. > Moved 57393 symbols, 2169928 bytes. > Moving pre-ordered read-only objects to shared space at 0x00002b1e0c750000 ... done. > Moving read-only objects to shared space at 0x00002b1e0cd2afd8 ... done. > Moving string char arrays to shared space at 0x00002b1e0cd2dc38 ... done. > Moving pre-ordered read-write objects to shared space at 0x00002b1e0d150000 ... done. > Moving read-write objects to shared space at 0x00002b1e0dd6f7e0 ... done. > Moving String objects to shared space at 0x00002b1e0ddf1b48 ... done. > Read-write space ends at 0x00002b1e0de68590, 13731216 bytes. > Updating references to shared objects ... done. > touch stamps/add-archive.stamp > mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build > /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m > -source 6 -target 6 \ > -d /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build ./TestCryptoLevel.java > mkdir -p stamps > touch stamps/cryptocheck.stamp > if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java ] ; then \ > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java -cp > /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build TestCryptoLevel ; \ > fi > Running IcedTea with the original crypto patch. > mkdir -p stamps > touch stamps/check-crypto.stamp > mkdir -p stamps > touch stamps/icedtea-against-icedtea.stamp > ++ pwd > + chmod 644 /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/lib/sa-jdi.jar > .......... > > But, when i run this in debug mode, all this is missing: > > .... > IcedTea (debug build) is served: /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build-debug > mkdir -p stamps > touch stamps/icedtea-debug.stamp > ++ pwd > + chmod 644 /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build-debug/j2sdk-image/lib/sa-jdi.jar > .... > > > (the ++ pwd... and + chmod is already outside icedtea6 makefile) > > Are those targets missing in purpose? I recognize > > touch stamps/add-jamvm.stamp > touch stamps/add-cacao.stamp > touch stamps/add-zero.stamp > are just touches, for case of hotspot build, > > but following may be missing: > > touch stamps/add-systemtap.stamp > touch stamps/pulse-java-class.stamp > stamps/pulse-java-jar.stamp > touch stamps/pulse-java-headers.stamp > touch stamps/pulse-java.stamp > touch stamps/add-pulseaudio.stamp > touch stamps/add-tzdata-support.stamp > touch stamps/pax-mark-vm.stamp > touch stamps/add-archive.stamp > touch stamps/cryptocheck.stamp > touch stamps/check-crypto.stamp > touch stamps/icedtea-against-icedtea.stamp > > I'm especially interested in missing tapet :) > > > J. > From jvanek at icedtea.classpath.org Mon May 5 13:38:42 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Mon, 05 May 2014 13:38:42 +0000 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... Message-ID: changeset e8b21e10ead6 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e8b21e10ead6 author: Jiri Vanek date: Mon May 05 15:38:16 2014 +0200 Properly disconnect all connected http connections. diffstat: ChangeLog | 21 +++ netx/net/sourceforge/jnlp/cache/CacheEntry.java | 8 +- netx/net/sourceforge/jnlp/cache/CacheUtil.java | 27 ++-- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 19 ++- netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java | 10 +- netx/net/sourceforge/jnlp/services/XBasicService.java | 15 ++- plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 11 +- tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java | 19 ++- tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 56 ++++++--- 9 files changed, 137 insertions(+), 49 deletions(-) diffs (486 lines): diff -r 8012d1bbbe72 -r e8b21e10ead6 ChangeLog --- a/ChangeLog Fri May 02 19:11:11 2014 -0400 +++ b/ChangeLog Mon May 05 15:38:16 2014 +0200 @@ -1,3 +1,24 @@ +2014-05-05 Jiri Vanek + + Properly disconnect all connected http connections + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: (isCurrent) is using + lastModified of long rather then whole url connection. Callers adapted. + * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (getReadPermission) + closed http connection. (isCurrent) retyped to use lastModified of long + rather then whole connection. Removed workaround of it. Callers adapted. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (downloadResource) + Closed http connection. + * netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java: Closed http + connection. + * netx/net/sourceforge/jnlp/services/XBasicService.java: (isOffline) Closed + http connection. + * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: Closed http + connections. + * tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java: + Adapted to URLconnection -> long signature changes. + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: Closed http + connections. + 2014-05-02 Omair Majid * netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java: Switch to diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Fri May 02 19:11:11 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 05 15:38:16 2014 +0200 @@ -82,6 +82,7 @@ /** * Returns the time in the local system clock that the file was * most recently checked for an update. + * @return */ public long getLastUpdated() { try { @@ -94,6 +95,7 @@ /** * Sets the time in the local system clock that the file was * most recently checked for an update. + * @param updatedTime */ public void setLastUpdated(long updatedTime) { properties.setProperty("last-updated", Long.toString(updatedTime)); @@ -104,17 +106,17 @@ * the cache and it is up to date. This method may not return * immediately. * - * @param connection a connection to the remote URL + * @param lastModified * @return whether the cache contains the version */ - public boolean isCurrent(URLConnection connection) { + public boolean isCurrent(long lastModified) { boolean cached = isCached(); if (!cached) return false; try { - long remoteModified = connection.getLastModified(); + long remoteModified = lastModified; long cachedModified = Long.parseLong(properties.getProperty("last-modified")); if (remoteModified > 0 && remoteModified <= cachedModified) diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/cache/CacheUtil.java --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Fri May 02 19:11:11 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Mon May 05 15:38:16 2014 +0200 @@ -27,6 +27,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; @@ -149,23 +150,30 @@ /** * Returns the Permission object necessary to access the * resource, or {@code null} if no permission is needed. + * @param location + * @param version + * @return */ public static Permission getReadPermission(URL location, Version version) { + Permission result = null; if (CacheUtil.isCacheable(location, version)) { File file = CacheUtil.getCacheFile(location, version); - - return new FilePermission(file.getPath(), "read"); + result = new FilePermission(file.getPath(), "read"); } else { try { // this is what URLClassLoader does - return location.openConnection().getPermission(); + URLConnection conn = location.openConnection(); + result = conn.getPermission(); + if (conn instanceof HttpURLConnection) { + ((HttpURLConnection) conn).disconnect(); + } } catch (java.io.IOException ioe) { // should try to figure out the permission OutputController.getLogger().log(ioe); } } - return null; + return result; } /** @@ -242,23 +250,18 @@ * * @param source the source {@link URL} * @param version the versions to check for - * @param connection a connection to the {@link URL}, or {@code null} + * @param lastModifed * @return whether the cache contains the version * @throws IllegalArgumentException if the source is not cacheable */ - public static boolean isCurrent(URL source, Version version, URLConnection connection) { + public static boolean isCurrent(URL source, Version version, long lastModifed) { if (!isCacheable(source, version)) throw new IllegalArgumentException(R("CNotCacheable", source)); try { - if (connection == null) - connection = source.openConnection(); - - connection.connect(); - CacheEntry entry = new CacheEntry(source, version); // could pool this - boolean result = entry.isCurrent(connection); + boolean result = entry.isCurrent(lastModifed); OutputController.getLogger().log("isCurrent: " + source + " = " + result); diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 02 19:11:11 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Mon May 05 15:38:16 2014 +0200 @@ -647,14 +647,14 @@ */ private void downloadResource(Resource resource) { resource.fireDownloadEvent(); // fire DOWNLOADING - + URLConnection con = null; CacheEntry origEntry = new CacheEntry(resource.location, resource.downloadVersion); // This is where the jar file will be. origEntry.lock(); try { // create out second in case in does not exist URL realLocation = resource.getDownloadLocation(); - URLConnection con = realLocation.openConnection(); + con = realLocation.openConnection(); con.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); con.connect(); @@ -689,7 +689,7 @@ CacheEntry downloadEntry = new CacheEntry(downloadLocation, resource.downloadVersion); File finalFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); // This is where extracted version will be, or downloaded file if not compressed. - if (!downloadEntry.isCurrent(con)) { + if (!downloadEntry.isCurrent(con.getLastModified())) { // Make sure we don't re-download the file. however it will wait as if it was downloading. // (This is fine because file is not ready yet anyways) byte buf[] = new byte[1024]; @@ -768,6 +768,11 @@ resource.fireDownloadEvent(); // fire ERROR } finally { origEntry.unlock(); + if (con != null) { + if (con instanceof HttpURLConnection) { + ((HttpURLConnection) con).disconnect(); + } + } } } @@ -797,7 +802,7 @@ connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); int size = connection.getContentLength(); - boolean current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; + boolean current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection.getLastModified()) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; if (!current) { if (entry.isCached()) { entry.markForDelete(); @@ -835,8 +840,9 @@ resource.fireDownloadEvent(); // fire CONNECTED // explicitly close the URLConnection. - if (connection instanceof HttpURLConnection) + if (connection instanceof HttpURLConnection) { ((HttpURLConnection) connection).disconnect(); + } } catch (Exception ex) { OutputController.getLogger().log(ex); resource.changeStatus(0, ERROR); @@ -921,6 +927,9 @@ if (possibleRedirect != null && possibleRedirect.trim().length() > 0) { result.URL = new URL(possibleRedirect); } + if (connection instanceof HttpURLConnection) { + ((HttpURLConnection) connection).disconnect(); + } return result; diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java --- a/netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java Fri May 02 19:11:11 2014 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/CachedJarFileCallback.java Mon May 05 15:38:16 2014 +0200 @@ -43,7 +43,9 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.net.HttpURLConnection; import java.net.URL; +import java.net.URLConnection; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; @@ -126,9 +128,9 @@ java.util.jar.JarFile result = null; final int BUF_SIZE = 2048; - + URLConnection conn = url.openConnection(); /* get the stream before asserting privileges */ - final InputStream in = url.openConnection().getInputStream(); + final InputStream in = conn.getInputStream(); try { result = @@ -166,6 +168,10 @@ }); } catch (PrivilegedActionException pae) { throw (IOException) pae.getException(); + } finally{ + if (conn instanceof HttpURLConnection) { + ((HttpURLConnection) conn).disconnect(); + } } return result; diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/services/XBasicService.java --- a/netx/net/sourceforge/jnlp/services/XBasicService.java Fri May 02 19:11:11 2014 -0400 +++ b/netx/net/sourceforge/jnlp/services/XBasicService.java Mon May 05 15:38:16 2014 +0200 @@ -19,8 +19,10 @@ import static net.sourceforge.jnlp.runtime.Translator.R; import java.io.IOException; +import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URL; +import java.net.URLConnection; import javax.jnlp.BasicService; import javax.swing.JOptionPane; @@ -59,6 +61,7 @@ * JAR was specified then the location of the JAR containing the * main class is returned. */ + @Override public URL getCodeBase() { ApplicationInstance app = JNLPRuntime.getApplication(); @@ -88,15 +91,21 @@ /** * Return true if the Environment is Offline */ + @Override public boolean isOffline() { URL url = findFirstURLFromJNLPFile(); - + URLConnection conn = null; try { - url.openConnection().getInputStream().close(); + conn = url.openConnection(); + conn.getInputStream().close(); return false; } catch (IOException exception) { return true; + } finally { + if (conn != null && conn instanceof HttpURLConnection) { + ((HttpURLConnection) conn).disconnect(); + } } } @@ -148,6 +157,7 @@ /** * Return true if a Web Browser is Supported */ + @Override public boolean isWebBrowserSupported() { initialize(); @@ -159,6 +169,7 @@ * * @return whether the document was opened */ + @Override public boolean showDocument(URL url) { initialize(); diff -r 8012d1bbbe72 -r e8b21e10ead6 plugin/icedteanp/java/sun/applet/PluginAppletViewer.java --- a/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Fri May 02 19:11:11 2014 -0400 +++ b/plugin/icedteanp/java/sun/applet/PluginAppletViewer.java Mon May 05 15:38:16 2014 +0200 @@ -118,6 +118,7 @@ import sun.misc.Ref; import com.sun.jndi.toolkit.url.UrlUtil; +import java.net.HttpURLConnection; import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.util.logging.OutputController; @@ -478,6 +479,9 @@ * sets it to whatever URL/codebase we ended up getting */ url = conn.getURL(); + if (conn instanceof HttpURLConnection){ + ((HttpURLConnection)conn).disconnect(); + } PluginParameters params = new PluginParameterParser().parse(width, height, paramString); @@ -1543,8 +1547,11 @@ SecurityManager security = System.getSecurityManager(); if (security != null) { try { - java.security.Permission perm = - url.openConnection().getPermission(); + URLConnection conn = url.openConnection(); + java.security.Permission perm = conn.getPermission(); + if (conn instanceof HttpURLConnection) { + ((HttpURLConnection) conn).disconnect(); + } if (perm != null) { security.checkPermission(perm); } diff -r 8012d1bbbe72 -r e8b21e10ead6 tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java --- a/tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java Fri May 02 19:11:11 2014 -0400 +++ b/tests/test-extensions-tests/net/sourceforge/jnlp/ServerAccessTest.java Mon May 05 15:38:16 2014 +0200 @@ -38,7 +38,9 @@ import java.io.File; import java.io.FileInputStream; +import java.net.HttpURLConnection; import java.net.URL; +import java.net.URLConnection; import org.junit.Assert; import org.junit.Test; @@ -158,10 +160,12 @@ String dirFileContent = ServerAccess.getContentOfStream(new FileInputStream(dirFile)); URL portUrl = new URL("http", "localhost", server.getPort(), "/server.port"); + HttpURLConnection portConn = (HttpURLConnection) portUrl.openConnection(); URL dirUrl = new URL("http", "localhost", server.getPort(), "/server.dir"); + HttpURLConnection dirConn = (HttpURLConnection) dirUrl.openConnection(); - String portUrlContent = ServerAccess.getContentOfStream(portUrl.openConnection().getInputStream()); - String dirUrlContent = ServerAccess.getContentOfStream(dirUrl.openConnection().getInputStream()); + String portUrlContent = ServerAccess.getContentOfStream(portConn.getInputStream()); + String dirUrlContent = ServerAccess.getContentOfStream(dirConn.getInputStream()); Assert.assertEquals(portUrlContent.trim(), portFileContent.trim()); Assert.assertEquals(dirUrlContent.trim(), dirFileContent.trim()); @@ -169,11 +173,18 @@ Assert.assertEquals(new Integer(portUrlContent.trim()), server.getPort()); URL fastUrl = new URL("http", "localhost", server.getPort(), "/simpletest1.jnlp"); + HttpURLConnection fastUrlConn = (HttpURLConnection) fastUrl.openConnection(); URL slowUrl = new URL("http", "localhost", server.getPort(), "/XslowXsimpletest1.jnlp"); + HttpURLConnection slowUrlConn = (HttpURLConnection) slowUrl.openConnection(); - String fastUrlcontent = ServerAccess.getContentOfStream(fastUrl.openConnection().getInputStream()); - String slowUrlContent = ServerAccess.getContentOfStream(slowUrl.openConnection().getInputStream()); + String fastUrlcontent = ServerAccess.getContentOfStream(fastUrlConn.getInputStream()); + String slowUrlContent = ServerAccess.getContentOfStream(slowUrlConn.getInputStream()); Assert.assertEquals(fastUrlcontent, slowUrlContent); + + portConn.disconnect(); + dirConn.disconnect(); + fastUrlConn.disconnect(); + slowUrlConn.disconnect(); } diff -r 8012d1bbbe72 -r e8b21e10ead6 tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Fri May 02 19:11:11 2014 -0400 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Mon May 05 15:38:16 2014 +0200 @@ -53,6 +53,7 @@ import java.net.MalformedURLException; import java.net.ServerSocket; import java.net.URL; +import java.net.URLConnection; import java.util.ArrayList; import java.util.List; import net.sourceforge.jnlp.ProcessResult; @@ -427,7 +428,7 @@ /** * utility method which can read from any stream as one long String * - * @param input stream + * @param is * @return stream as string * @throws IOException if connection can't be established or resource does not exist */ @@ -438,36 +439,53 @@ /** * utility method which can read bytes of resource from any url * - * @param resource to be located on any url + * @param u * @return individual bytes of resource * @throws IOException if connection can't be established or resource does not exist */ public static ByteArrayOutputStream getResourceAsBytes(URL u) throws IOException { - HttpURLConnection connection = (HttpURLConnection) u.openConnection(); - connection = (HttpURLConnection) u.openConnection(); - connection.setRequestMethod("GET"); - connection.setDoOutput(true); - connection.setReadTimeout(READ_TIMEOUT); - connection.connect(); - return getBytesFromStream(connection.getInputStream()); + URLConnection connection = null; + try { + connection = u.openConnection(); + if (connection instanceof HttpURLConnection) { + ((HttpURLConnection) connection).setRequestMethod("GET"); + } + connection.setDoOutput(true); + connection.setReadTimeout(READ_TIMEOUT); + connection.connect(); + return getBytesFromStream(connection.getInputStream()); + } finally { + if (connection != null && connection instanceof HttpURLConnection) { + ((HttpURLConnection) connection).disconnect(); + } + } } /** * utility method which can read string of resource from any url - * - * @param resource to be located on any url + * + * @param u * @return resource as string - * @throws IOException if connection can't be established or resource does not exist + * @throws IOException if connection can't be established or resource does + * not exist */ public static String getResourceAsString(URL u) throws IOException { - HttpURLConnection connection = (HttpURLConnection) u.openConnection(); - connection = (HttpURLConnection) u.openConnection(); - connection.setRequestMethod("GET"); - connection.setDoOutput(true); - connection.setReadTimeout(READ_TIMEOUT); - connection.connect(); - return getContentOfStream(connection.getInputStream()); + URLConnection connection = null; + try { + connection = (HttpURLConnection) u.openConnection(); + if (connection instanceof HttpURLConnection) { + ((HttpURLConnection) connection).setRequestMethod("GET"); + } + connection.setDoOutput(true); + connection.setReadTimeout(READ_TIMEOUT); + connection.connect(); + return getContentOfStream(connection.getInputStream()); + } finally { + if (connection != null && connection instanceof HttpURLConnection) { + ((HttpURLConnection) connection).disconnect(); + } + } } /** From jvanek at redhat.com Mon May 5 13:51:42 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 05 May 2014 15:51:42 +0200 Subject: Upcoming release of icedtea-web 1.5 In-Reply-To: <20140402165531.GG10338@redhat.com> References: <5319C1EF.2020801@redhat.com> <533977A6.1040809@redhat.com> <533BE5BB.7050806@redhat.com> <533C34BA.6040305@ubuntu.com> <533C3603.9010703@redhat.com> <533C3B07.9030402@ubuntu.com> <20140402163601.GF10338@redhat.com> <533C3F6E.1060907@redhat.com> <20140402165531.GG10338@redhat.com> Message-ID: <5367976E.1010507@redhat.com> On 04/02/2014 06:55 PM, Omair Majid wrote: > * Jiri Vanek [2014-04-02 12:48]: >> On 04/02/2014 06:36 PM, Omair Majid wrote: >>> * Matthias Klose [2014-04-02 12:32]: >>>> Note that AM_MAINTAINER_MODE(disable) has the same behaviour as not >>>> including the macro. It only gives the package builder the option >>>> to turn it on or off. >>> >>> You mean AM_MAINTAINER_MODE([enable]), right? > Pushed to head. It was hanging on distro--pkg-dev too long. We can remove it any time. J. From jvanek at icedtea.classpath.org Mon May 5 13:52:13 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Mon, 05 May 2014 13:52:13 +0000 Subject: /hg/icedtea-web: configure.ac: added AM_MAINTAINER_MODE([enable]... Message-ID: changeset 7e5db2ce19da in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=7e5db2ce19da author: Jiri Vanek date: Mon May 05 15:52:03 2014 +0200 configure.ac: added AM_MAINTAINER_MODE([enable]) macro diffstat: configure.ac | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diffs (11 lines): diff -r e8b21e10ead6 -r 7e5db2ce19da configure.ac --- a/configure.ac Mon May 05 15:38:16 2014 +0200 +++ b/configure.ac Mon May 05 15:52:03 2014 +0200 @@ -1,6 +1,7 @@ AC_INIT([icedtea-web],[1.6pre],[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]) +AM_MAINTAINER_MODE([enable]) # Older automake doesn't generate these correctly abs_top_builddir=`pwd -P` From jvanek at redhat.com Mon May 5 14:03:21 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 05 May 2014 16:03:21 +0200 Subject: icedtea6 debug build is missing some targets In-Reply-To: <53676D08.2040400@redhat.com> References: <53676AB9.5000404@redhat.com> <53676D08.2040400@redhat.com> Message-ID: <53679A29.6030208@redhat.com> On 05/05/2014 12:50 PM, Jiri Vanek wrote: > > Ouch. I was launching wrong target! > > icedtea-debug-against-icedtea > is the right one. Sorry for noise. Anyway, there is small bug in stamps/add-nss-debug.stamp: Patch needed to build whole debug stack is attached. Ok to push to icedtea6-head an 1.13? > > J. > > On 05/05/2014 12:40 PM, Jiri Vanek wrote: >> Hi! >> >> When I build icedtea6 normally, I have this at the end of build: >> >> >> .......... >> IcedTea is served: /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build >> mkdir -p stamps >> touch stamps/icedtea.stamp >> printf -- '-jamvm ERROR\n' >> >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg >> touch stamps/add-jamvm.stamp >> printf -- '-cacao ERROR\n' >> >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg >> touch stamps/add-cacao.stamp >> printf -- '-zero ERROR\n' >> >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg >> printf -- '-shark ERROR\n' >> >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg >> touch stamps/add-zero.stamp >> mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset >> grep "client IGNORE" >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64/jvm.cfg; \ >> if test $? -eq 0; then \ >> sed -e '/\/client\/libjvm.so/d' \ >> < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot.stp \ >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot.stp; \ >> sed -e '/\/client\/libjvm.so/d' \ >> < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_gc.stp \ >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_gc.stp; \ >> sed -e '/\/client\/libjvm.so/d' \ >> < /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_jni.stp \ >> > /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_jni.stp; \ >> else \ >> cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot.stp \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot.stp; \ >> cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/hotspot_jni.stp \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/hotspot_jni.stp; \ >> fi >> -client IGNORE >> cp /builddir/build/BUILD/icedtea6-1.13.3/tapset/jstack.stp \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/tapset/jstack.stp >> touch stamps/add-systemtap.stamp >> mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> (cd /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java; \ >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 >> -J-Xmx1024m -source 6 -target 6 -d /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -bootclasspath >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/jre/lib/rt.jar:/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/jre/lib/jsse.jar >> >> \ >> org/classpath/icedtea/pulseaudio/*.java \ >> ) >> cp -r /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java/META-INF >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> chmod -R ug+w /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes/META-INF >> mkdir -p stamps >> touch stamps/pulse-java-class.stamp >> mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes; >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/jar cf >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar -C >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes .; >> mkdir -p stamps >> touch stamps/pulse-java-jar.stamp >> mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> org.classpath.icedtea.pulseaudio.EventLoop ; \ >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> org.classpath.icedtea.pulseaudio.Stream ; \ >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> org.classpath.icedtea.pulseaudio.Operation; \ >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> org.classpath.icedtea.pulseaudio.PulseAudioSourcePort ; \ >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> org.classpath.icedtea.pulseaudio.PulseAudioTargetPort ; \ >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javah -d >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -classpath >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes \ >> -J-Xbootclasspath/p:/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/classes >> org.classpath.icedtea.pulseaudio.ContextEvent; \ >> mkdir -p stamps >> touch stamps/pulse-java-headers.stamp >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/jni-common.o -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/jni-common.c >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_ContextEvent.o >> >> -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_ContextEvent.c >> >> >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_EventLoop.o >> >> -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_EventLoop.c >> >> >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Operation.o >> >> -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Operation.c >> >> >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.o >> >> -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c >> >> >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o >> >> -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c >> >> >> gcc -g -O2 -m64 -fPIC -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include/linux >> -I/builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/include \ >> -I/builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native -o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Stream.o >> >> -c >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/native/org_classpath_icedtea_pulseaudio_Stream.c >> gcc -shared /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/jni-common.o >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_ContextEvent.o >> >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_EventLoop.o >> >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Operation.o >> >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.o >> >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.o >> >> /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/org_classpath_icedtea_pulseaudio_Stream.o >> >> -lpulse \ >> -o /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so >> mkdir -p stamps >> touch stamps/pulse-java.stamp >> cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/amd64 >> cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/native/libpulse-java.so \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/amd64 >> cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/ext >> cp -pPRf /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio.build/pulse-java.jar \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/ext >> (cd /builddir/build/BUILD/icedtea6-1.13.3/pulseaudio/src/java && \ >> /usr/bin/zip -qur /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/src.zip >> org ) >> touch stamps/add-pulseaudio.stamp >> if [ -d /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security ] ; then \ >> cp -v /builddir/build/BUILD/icedtea6-1.13.3/nss.cfg \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security; \ >> cp -v /builddir/build/BUILD/icedtea6-1.13.3/nss.cfg \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security; \ >> rm -f stamps/add-nss.stamp.tmp; \ >> touch stamps/add-nss.stamp.tmp; \ >> all_patches_ok=yes; \ >> for dir in /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/{j2sdk-image/jre,j2re-image} >> ; \ >> do \ >> pushd $dir ; \ >> cp -v $dir/lib/security/java.security{,.old} ; \ >> for p in patches/nss-not-enabled-config.patch ; \ >> do \ >> if test x${all_patches_ok} = "xyes" \ >> && echo Checking $p \ >> && /usr/bin/patch -l -p0 --dry-run -s -t -f -F0 \ >> < /builddir/build/BUILD/icedtea6-1.13.3/$p ; \ >> then \ >> echo Applying $p ; \ >> /usr/bin/patch -l -p0 -F0 < /builddir/build/BUILD/icedtea6-1.13.3/$p ; \ >> if ! grep "^\* $(basename $p)" /builddir/build/BUILD/icedtea6-1.13.3/HACKING \ >> >> /builddir/build/BUILD/icedtea6-1.13.3/stamps/add-nss.stamp.tmp ; \ >> then \ >> echo "* $(basename $p): UNDOCUMENTED" \ >> >> /builddir/build/BUILD/icedtea6-1.13.3/stamps/add-nss.stamp.tmp ; \ >> fi ; \ >> else \ >> test x${all_patches_ok} = "xyes" && all_patches_ok=$p ; \ >> fi ; \ >> done ; \ >> popd ; \ >> done ; \ >> mv stamps/add-nss.stamp.tmp stamps/add-nss.stamp ; \ >> if ! test x${all_patches_ok} = "xyes"; then \ >> echo ERROR patch ${all_patches_ok} FAILED! ; \ >> echo WARNING make clean-add-nss before retrying a fix ; \ >> exit 2; \ >> fi \ >> else \ >> echo "NO /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security >> dir"; \ >> fi >> `/builddir/build/BUILD/icedtea6-1.13.3/nss.cfg' -> >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/nss.cfg' >> `/builddir/build/BUILD/icedtea6-1.13.3/nss.cfg' -> >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/nss.cfg' >> ~/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre ~/build/BUILD/icedtea6-1.13.3 >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/java.security' -> >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/security/java.security.old' >> Checking patches/nss-not-enabled-config.patch >> Applying patches/nss-not-enabled-config.patch >> patching file lib/security/java.security.old >> ~/build/BUILD/icedtea6-1.13.3 >> ~/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image ~/build/BUILD/icedtea6-1.13.3 >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/java.security' -> >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2re-image/lib/security/java.security.old' >> Checking patches/nss-not-enabled-config.patch >> Applying patches/nss-not-enabled-config.patch >> patching file lib/security/java.security.old >> ~/build/BUILD/icedtea6-1.13.3 >> if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib ] ; then \ >> cp -v /builddir/build/BUILD/icedtea6-1.13.3/tz.properties \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib ; \ >> fi >> `/builddir/build/BUILD/icedtea6-1.13.3/tz.properties' -> >> `/builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/jre/lib/tz.properties' >> touch stamps/add-tzdata-support.stamp >> touch stamps/pax-mark-vm.stamp >> if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java ] ; then \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java -Xshare:dump ; \ >> fi >> Loading classes to share ... done. >> Rewriting and unlinking classes ... done. >> Calculating hash values for String objects .. done. >> Calculating fingerprints ... done. >> Removing unshareable information ... done. >> Moving common symbols to metadata section at 0x00002b1e0df56ae0 ... done. >> Moving vmSymbols to metadata section at 0x00002b1e0e166e98 ... done. >> Moving the remaining symbols to metadata section at 0x00002b1e0e168728 ... done. >> Moved 57393 symbols, 2169928 bytes. >> Moving pre-ordered read-only objects to shared space at 0x00002b1e0c750000 ... done. >> Moving read-only objects to shared space at 0x00002b1e0cd2afd8 ... done. >> Moving string char arrays to shared space at 0x00002b1e0cd2dc38 ... done. >> Moving pre-ordered read-write objects to shared space at 0x00002b1e0d150000 ... done. >> Moving read-write objects to shared space at 0x00002b1e0dd6f7e0 ... done. >> Moving String objects to shared space at 0x00002b1e0ddf1b48 ... done. >> Read-write space ends at 0x00002b1e0de68590, 13731216 bytes. >> Updating references to shared objects ... done. >> touch stamps/add-archive.stamp >> mkdir -p /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build >> /builddir/build/BUILD/icedtea6-1.13.3/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m >> -source 6 -target 6 \ >> -d /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build ./TestCryptoLevel.java >> mkdir -p stamps >> touch stamps/cryptocheck.stamp >> if [ -e /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java ] ; then \ >> /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/bin/java -cp >> /builddir/build/BUILD/icedtea6-1.13.3/cryptocheck.build TestCryptoLevel ; \ >> fi >> Running IcedTea with the original crypto patch. >> mkdir -p stamps >> touch stamps/check-crypto.stamp >> mkdir -p stamps >> touch stamps/icedtea-against-icedtea.stamp >> ++ pwd >> + chmod 644 /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build/j2sdk-image/lib/sa-jdi.jar >> .......... >> >> But, when i run this in debug mode, all this is missing: >> >> .... >> IcedTea (debug build) is served: /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build-debug >> mkdir -p stamps >> touch stamps/icedtea-debug.stamp >> ++ pwd >> + chmod 644 /builddir/build/BUILD/icedtea6-1.13.3/openjdk.build-debug/j2sdk-image/lib/sa-jdi.jar >> .... >> >> >> (the ++ pwd... and + chmod is already outside icedtea6 makefile) >> >> Are those targets missing in purpose? I recognize >> >> touch stamps/add-jamvm.stamp >> touch stamps/add-cacao.stamp >> touch stamps/add-zero.stamp >> are just touches, for case of hotspot build, >> >> but following may be missing: >> >> touch stamps/add-systemtap.stamp >> touch stamps/pulse-java-class.stamp >> stamps/pulse-java-jar.stamp >> touch stamps/pulse-java-headers.stamp >> touch stamps/pulse-java.stamp >> touch stamps/add-pulseaudio.stamp >> touch stamps/add-tzdata-support.stamp >> touch stamps/pax-mark-vm.stamp >> touch stamps/add-archive.stamp >> touch stamps/cryptocheck.stamp >> touch stamps/check-crypto.stamp >> touch stamps/icedtea-against-icedtea.stamp >> >> I'm especially interested in missing tapet :) >> >> >> J. >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: it6-mkfile-tmp.patch Type: text/x-patch Size: 380 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Mon May 5 14:41:37 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 05 May 2014 14:41:37 +0000 Subject: [Bug 1761] New: plugin does not start at all, or crashes after some time in sandboxes mode Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1761 Bug ID: 1761 Summary: plugin does not start at all, or crashes after some time in sandboxes mode Product: IcedTea-Web Version: unspecified Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: Plugin Assignee: dbhole at redhat.com Reporter: Benjamin.Wolsing at web.de CC: unassigned at icedtea.classpath.org Hello, I don't really know if this is a bug, but I have several problems with some java applets in my browser that occur after the update to Iced Tea Web 1.5: - You can choose two modes: Ausf??hren and Sandbox In the "Ausf??hren" mode the start of the applet fails. In the Sandboxed mode, the applet starts, but crashes after some time. IcedTea-Web Plugin version: 1.5 (fedora-2.fc20-x86_64) Mon May 05 16:30:55 CEST 2014 net.sourceforge.jnlp.LaunchException: Fatal: Initialisierungsfehler: Konnte Applet nicht initialisieren. Um weitere Information zu erhalten, bitte den Knopf ???Weitere Informationen??? klicken. at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:746) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:675) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908) Caused by: net.sourceforge.jnlp.LaunchException: The applet is signed but its manifest specifies Sandbox permissions. This is not yet supported. Try running the applet again, but choose the Sandbox run option. at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:206) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkAll(ManifestAttributesChecker.java:79) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:288) at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:351) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:418) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:394) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:711) ... 2 more Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Initialisierungsfehler: Ausf??hren im Sandkasten-Aufruf wurde zu sp??t ausgef??hrt. Der Klassenlader wurde benachrichtigt das Applet im Sandkasten auszuf??hren, aber die Sicherheitseinstellungen waren bereits initialisiert. at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.setRunInSandbox(JNLPClassLoader.java:2385) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:203) ... 8 more Chain: 1) at Mon May 05 16:27:32 CEST 2014 net.sourceforge.jnlp.LaunchException: Fatal: Initialisierungsfehler: Ausf??hren im Sandkasten-Aufruf wurde zu sp??t ausgef??hrt. Der Klassenlader wurde benachrichtigt das Applet im Sandkasten auszuf??hren, aber die Sicherheitseinstellungen waren bereits initialisiert. at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.setRunInSandbox(JNLPClassLoader.java:2385) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:203) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkAll(ManifestAttributesChecker.java:79) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:288) at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:351) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:418) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:394) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:711) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:675) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908) 2) at Mon May 05 16:27:32 CEST 2014 net.sourceforge.jnlp.LaunchException: The applet is signed but its manifest specifies Sandbox permissions. This is not yet supported. Try running the applet again, but choose the Sandbox run option. at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:206) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkAll(ManifestAttributesChecker.java:79) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:288) at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:351) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:418) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:394) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:711) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:675) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908) Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Initialisierungsfehler: Ausf??hren im Sandkasten-Aufruf wurde zu sp??t ausgef??hrt. Der Klassenlader wurde benachrichtigt das Applet im Sandkasten auszuf??hren, aber die Sicherheitseinstellungen waren bereits initialisiert. at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.setRunInSandbox(JNLPClassLoader.java:2385) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:203) ... 8 more 3) at Mon May 05 16:27:32 CEST 2014 net.sourceforge.jnlp.LaunchException: Fatal: Initialisierungsfehler: Konnte Applet nicht initialisieren. Um weitere Information zu erhalten, bitte den Knopf ???Weitere Informationen??? klicken. at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:746) at net.sourceforge.jnlp.Launcher.getApplet(Launcher.java:675) at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:908) Caused by: net.sourceforge.jnlp.LaunchException: The applet is signed but its manifest specifies Sandbox permissions. This is not yet supported. Try running the applet again, but choose the Sandbox run option. at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:206) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkAll(ManifestAttributesChecker.java:79) at net.sourceforge.jnlp.runtime.JNLPClassLoader.(JNLPClassLoader.java:288) at net.sourceforge.jnlp.runtime.JNLPClassLoader.createInstance(JNLPClassLoader.java:351) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:418) at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:394) at net.sourceforge.jnlp.Launcher.createApplet(Launcher.java:711) ... 2 more Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Initialisierungsfehler: Ausf??hren im Sandkasten-Aufruf wurde zu sp??t ausgef??hrt. Der Klassenlader wurde benachrichtigt das Applet im Sandkasten auszuf??hren, aber die Sicherheitseinstellungen waren bereits initialisiert. at net.sourceforge.jnlp.runtime.JNLPClassLoader$SecurityDelegateImpl.setRunInSandbox(JNLPClassLoader.java:2385) at net.sourceforge.jnlp.runtime.ManifestAttributesChecker.checkPermissionsAttribute(ManifestAttributesChecker.java:203) ... 8 more -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Mon May 5 14:51:40 2014 From: aazores at redhat.com (Andrew Azores) Date: Mon, 05 May 2014 10:51:40 -0400 Subject: [icedtea-web] RFC: Fix caching of compressed content In-Reply-To: <20140502232755.GG28557@redhat.com> References: <20140502203210.GA28557@redhat.com> <536406F2.70009@redhat.com> <20140502232755.GG28557@redhat.com> Message-ID: <5367A57C.8080602@redhat.com> On 05/02/2014 07:27 PM, Omair Majid wrote: > Hi, > > * Andrew Azores [2014-05-02 16:58]: >> On 05/02/2014 04:32 PM, Omair Majid wrote: >>> It was brought to my attention that icedtea-web was re-downloading the >>> jars (which should have been cached) on subsequent runs of a jnlp >>> application. I dug into it and found a real bug. >>> >>> To decide if an item is cached, icedtea-web does a HEAD request and >>> compares the Content-Length with the size of the file. This works fine >>> when the jars were not compressed. When the jars are fetched compressed >>> and then uncompressed on disk, there is a mismatch between the sizes and >>> icedtea-web decides the content is not cached. >>> >>> The attached patch stores the compressed size in the cache info file and >>> uses that instead of the actual file size in the size-comparison. >> Can there be a reproducer for this? > This is not a functional change (at least, I really hope it isn't). It's > a performance change. I am not sure how to write a reproducer that > checks for startup speed. Any suggestions? This seems to actually have fixed redownloading of at least some test cases, actually. I don't know a good way to write a reproducer for startup speed either, but the fixed caching should be testable. I didn't realize this was just a happy side effect of this patch :) > >> Or is there already an existing one? > The test case that I used for this is a production server that's > internal, sadly. > >> Manually testing looks good though, nothing appears broken and >> applets (eg Elluminate) don't appear to be redownloading, according >> to the progress bar which just jumps from 0 to 100. > Yeah, that 0 to 100 jump means that the cache is working correctly. Were > any of these test cases re-downloading before? Elluminate is the test case I noticed the caching difference with - other test cases generally load quickly enough that I suppose it wasn't as apparent. Elluminate takes long enough to download that now that I've tested it again, the lack of caching with it is definitely noticeable. > >> The delay before >> this happens is just the overhead from establishing a connection and >> waiting for the result of the HEAD request(s), right? > Yes. This delay should be very small (I measured 0 seconds on many > lookups) but can be as large as ~10 seconds. See my other patch for a > timeout implementation that improves this too. > > Thanks, > Omair > Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Mon May 5 14:53:53 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 05 May 2014 14:53:53 +0000 Subject: [Bug 1761] plugin does not start at all, or crashes after some time in sandboxes mode In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1761 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aazores at redhat.com Assignee|dbhole at redhat.com |aazores at redhat.com --- Comment #1 from Andrew Azores --- This is the stack trace you see when launching it with the normal launch, not Sandbox button, yes? Is there a log of the crash that occurs after a while in Sandbox mode? Or, better yet, are these applets publicly available so that we can test them ourselves? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at icedtea.classpath.org Mon May 5 15:12:09 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Mon, 05 May 2014 15:12:09 +0000 Subject: /hg/icedtea-web: Links in AppTrustWarningPanel are now clickable. Message-ID: changeset de898c0d6d5f in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=de898c0d6d5f author: Jiri Vanek date: Mon May 05 17:11:45 2014 +0200 Links in AppTrustWarningPanel are now clickable. diffstat: ChangeLog | 10 +++ netx/net/sourceforge/jnlp/resources/Messages.properties | 2 +- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java | 27 +++++++++- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java | 6 +- 4 files changed, 39 insertions(+), 6 deletions(-) diffs (123 lines): diff -r 7e5db2ce19da -r de898c0d6d5f ChangeLog --- a/ChangeLog Mon May 05 15:52:03 2014 +0200 +++ b/ChangeLog Mon May 05 17:11:45 2014 +0200 @@ -1,3 +1,13 @@ +2014-05-05 Jiri Vanek + + Links in AppTrustWarningPanel are now clickable. + * netx/net/sourceforge/jnlp/resources/Messages.properties: (SUnsignedDetail) + codebase and url changed to href. + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java: + infoLabel redeclared from JLabel to JEditorPane. Added hyperlinkListener. + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java: + publisher string allowed to use href. + 2014-05-05 Jiri Vanek Properly disconnect all connected http connections diff -r 7e5db2ce19da -r de898c0d6d5f netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 05 15:52:03 2014 +0200 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 05 17:11:45 2014 +0200 @@ -292,7 +292,7 @@ SRememberAppletOnly=For applet SRememberCodebase=For site {0} SUnsignedSummary=An unsigned Java application wants to run -SUnsignedDetail=An unsigned application from the following location wants to run:
  {0}
The page which made the request was:
  {1}

It is recommended you only run applications from sites you trust. +SUnsignedDetail=An unsigned application from the following location wants to run:
  {0}
The page which made the request was:
  {1}

It is recommended you only run applications from sites you trust. SUnsignedAllowedBefore=You have accepted this applet previously. SUnsignedRejectedBefore=You have rejected this applet previously. SUnsignedQuestion=Allow the applet to run? diff -r 7e5db2ce19da -r de898c0d6d5f netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java --- a/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java Mon May 05 15:52:03 2014 +0200 +++ b/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java Mon May 05 17:11:45 2014 +0200 @@ -40,12 +40,15 @@ import java.awt.BorderLayout; import java.awt.Color; +import java.awt.Desktop; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.Font; import java.awt.GridLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.IOException; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.List; @@ -56,15 +59,19 @@ import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JDialog; +import javax.swing.JEditorPane; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.SwingConstants; +import javax.swing.event.HyperlinkEvent; +import javax.swing.event.HyperlinkListener; import net.sourceforge.jnlp.JNLPFile; import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction; import net.sourceforge.jnlp.security.appletextendedsecurity.ExtendedAppletSecurityHelp; import net.sourceforge.jnlp.util.ScreenFinder; +import net.sourceforge.jnlp.util.logging.OutputController; /* * This class is meant to provide a common layout and functionality for warning dialogs @@ -212,15 +219,31 @@ } private void setupInfoPanel() { + JPanel infoPanel = new JPanel(new BorderLayout()); String titleText = getAppletTitle(); JLabel titleLabel = new JLabel(titleText); titleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, 18)); String infoLabelText = getInfoPanelText(); - JLabel infoLabel = new JLabel(infoLabelText); + JEditorPane infoLabel = new JEditorPane("text/html", htmlWrap(infoLabelText)); + infoLabel.setBackground(infoPanel.getBackground()); + infoLabel.setEditable(false); + infoLabel.addHyperlinkListener(new HyperlinkListener() { + @Override + public void hyperlinkUpdate(HyperlinkEvent e) { + try { + if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { + Desktop.getDesktop().browse(e.getURL().toURI()); + } + } catch (IOException ex) { + OutputController.getLogger().log(ex); + } catch (URISyntaxException ex) { + OutputController.getLogger().log(ex); + } + } + }); int panelHeight = titleLabel.getHeight() + INFO_PANEL_HEIGHT + INFO_PANEL_HINT_HEIGHT; - JPanel infoPanel = new JPanel(new BorderLayout()); infoPanel.add(titleLabel, BorderLayout.PAGE_START); infoPanel.add(infoLabel, BorderLayout.CENTER); infoPanel.setPreferredSize(new Dimension(PANE_WIDTH, panelHeight)); diff -r 7e5db2ce19da -r de898c0d6d5f netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java --- a/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java Mon May 05 15:52:03 2014 +0200 +++ b/netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java Mon May 05 17:11:45 2014 +0200 @@ -109,14 +109,14 @@ try { if (file instanceof PluginBridge) { - from = file.getCodeBase().getHost(); + from = file.getCodeBase().toExternalForm(); } else { - from = file.getInformation().getHomepage().toString(); + from = file.getInformation().getHomepage().toExternalForm(); } } catch (Exception e) { } - return "
" + R("Publisher") + ": " + publisher + "
" + R("From") + ": " + from; + return "
" + R("Publisher") + ": " + publisher + "
" + R("From") + ": " + from + ""; } private String getSigningInfo() { From jvanek at redhat.com Mon May 5 15:13:48 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 05 May 2014 17:13:48 +0200 Subject: [rfc][icedtea-web] replace jlabel by jeditorpane In-Reply-To: <535EAE35.1000007@redhat.com> References: <534E98C7.7050106@redhat.com> <535EAE35.1000007@redhat.com> Message-ID: <5367AAAC.3000808@redhat.com> On 04/28/2014 09:38 PM, Andrew Azores wrote: > On 04/16/2014 10:50 AM, Jiri Vanek wrote: >> This small patch is replacing label - in our favorite Extendable AppTrustWarningPanel by Jeditor >> pane. There is only reason for this. To have The links clickable. Which would be necessary for >> case if alaca or similar being rememberable and to moved forward to AppTrustWarningPanel. >> >> Thoughts? > > I like the idea and I don't know of any better way to do it (which might just be because I don't > know a lot about Swing still), and it looks fine as is, so okay by me. > > Thanks, > thanx. Pushed. Now the rest of remember alacal..:( From aazores at redhat.com Mon May 5 15:30:49 2014 From: aazores at redhat.com (Andrew Azores) Date: Mon, 05 May 2014 11:30:49 -0400 Subject: [icedtea-web] RFC: Use timeouts for checking if cache is fresh In-Reply-To: <20140502210654.GC28557@redhat.com> References: <20140502210654.GC28557@redhat.com> Message-ID: <5367AEA9.8040907@redhat.com> On 05/02/2014 05:06 PM, Omair Majid wrote: > Hi, > > IcedTea-Web tries to check that the cached content is up-to-date by > connecting to the server and doing HEAD requests. The problem is, some > servers are too slow and checking that the cache is indeed up-to-date > takes a very long time. One particular server was taking about 7 seconds > to respond to each request, just to tell us that the cache was indeed > up-to-date. > > The attached patch adds some basic (and I suspect incomplete) timeout > functionality. IcedTea-Web will assume the cache is up-to-date if the > server doesn't reply in a second or so. This significantly speeds up > running cached applications. > > The proprietary javaws does something similar, as indicated at: > http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/enhancements6.html > > Thoughts? > > Thanks, > Omair > Do you have any publicly accessible test case for this? I'm not sure if slow starting is due to the timeout not working or if it's working and the connection is established in a timely fashion but takes a long time to consume. Would the SocketTimeoutException be logged if raised, at least at debug level? The code itself looks okay to me but I'm not too familiar with this part of the codebase. I think Jiri probably knows more. Thanks, -- Andrew A From jvanek at redhat.com Tue May 6 07:42:05 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 06 May 2014 09:42:05 +0200 Subject: [icedtea-web] RFC: Use timeouts for checking if cache is fresh In-Reply-To: <5367AEA9.8040907@redhat.com> References: <20140502210654.GC28557@redhat.com> <5367AEA9.8040907@redhat.com> Message-ID: <5368924D.70007@redhat.com> On 05/05/2014 05:30 PM, Andrew Azores wrote: > On 05/02/2014 05:06 PM, Omair Majid wrote: >> Hi, >> >> IcedTea-Web tries to check that the cached content is up-to-date by >> connecting to the server and doing HEAD requests. The problem is, some >> servers are too slow and checking that the cache is indeed up-to-date >> takes a very long time. One particular server was taking about 7 seconds >> to respond to each request, just to tell us that the cache was indeed >> up-to-date. >> >> The attached patch adds some basic (and I suspect incomplete) timeout >> functionality. IcedTea-Web will assume the cache is up-to-date if the >> server doesn't reply in a second or so. This significantly speeds up >> running cached applications. >> >> The proprietary javaws does something similar, as indicated at: >> http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/enhancements6.html >> >> Thoughts? >> >> Thanks, >> Omair >> > > Do you have any publicly accessible test case for this? I'm not sure if slow starting is due to the > timeout not working or if it's working and the connection is established in a timely fashion but > takes a long time to consume. Would the SocketTimeoutException be logged if raised, at least at > debug level? Or an automated reproducer for us? O:) > > The code itself looks okay to me but I'm not too familiar with this part of the codebase. I think > Jiri probably knows more. Well code look mostly ok. As for exception, yes please log exception in debug level. J. From ptisnovs at icedtea.classpath.org Tue May 6 11:10:08 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 06 May 2014 11:10:08 +0000 Subject: /hg/gfx-test: Reformatting to prepare for local merge. Message-ID: changeset a55ed9fda1a6 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=a55ed9fda1a6 author: Pavel Tisnovsky date: Tue May 06 13:10:49 2014 +0200 Reformatting to prepare for local merge. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltBufferedImageOp.java | 51 ++++++++++++------ 2 files changed, 39 insertions(+), 17 deletions(-) diffs (185 lines): diff -r 6a0991824cdb -r a55ed9fda1a6 ChangeLog --- a/ChangeLog Mon May 05 10:46:18 2014 +0200 +++ b/ChangeLog Tue May 06 13:10:49 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-06 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: + Reformatting to prepare for local merge. + 2014-05-05 Pavel Tisnovsky * src/org/gfxtest/framework/CommonBitmapOperations.java: diff -r 6a0991824cdb -r a55ed9fda1a6 src/org/gfxtest/testsuites/BitBltBufferedImageOp.java --- a/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Mon May 05 10:46:18 2014 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Tue May 06 13:10:49 2014 +0200 @@ -1819,7 +1819,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltDiagonalStripesTypeIntRGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltDiagonalStripesTypeIntRGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, rasterOp); } @@ -1835,7 +1836,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltDiagonalStripesTypeIntARGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltDiagonalStripesTypeIntARGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, rasterOp); } @@ -1851,7 +1853,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltDiagonalStripesTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltDiagonalStripesTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, rasterOp); } @@ -1867,7 +1870,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltDiagonalStripesTypeUshort555RGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltDiagonalStripesTypeUshort555RGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, rasterOp); } @@ -1883,7 +1887,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltDiagonalStripesTypeUshort565RGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltDiagonalStripesTypeUshort565RGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, rasterOp); } @@ -1899,7 +1904,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltDiagonalStripesTypeUshortGray(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltDiagonalStripesTypeUshortGray(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithDiagonalStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, rasterOp); } @@ -1915,7 +1921,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesType3ByteBGR(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesType3ByteBGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp); } @@ -1931,7 +1938,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesType4ByteABGR(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesType4ByteABGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, rasterOp); } @@ -1947,7 +1955,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, rasterOp); } @@ -1963,7 +1972,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeByteBinary(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeByteBinary(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, rasterOp); } @@ -1979,7 +1989,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeByteIndexed(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeByteIndexed(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_INDEXED, rasterOp); } @@ -1995,7 +2006,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeByteGray(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeByteGray(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, rasterOp); } @@ -2011,7 +2023,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeIntBGR(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeIntBGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, rasterOp); } @@ -2027,7 +2040,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeIntRGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeIntRGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, rasterOp); } @@ -2043,7 +2057,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeIntARGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeIntARGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, rasterOp); } @@ -2059,7 +2074,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, rasterOp); } @@ -2075,7 +2091,8 @@ * selected raster operation * @return test result status - PASSED, FAILED or ERROR */ - protected TestResult doBitBltHorizontalColorStripesTypeUshort555RGB(TestImage image, Graphics2D graphics2d, BufferedImageOp rasterOp) + protected TestResult doBitBltHorizontalColorStripesTypeUshort555RGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) { return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, rasterOp); } From aazores at redhat.com Tue May 6 19:37:36 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 06 May 2014 15:37:36 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up Message-ID: <53693A00.7000607@redhat.com> Hi, Prompted by Omair's recent patches to fix caching, I started looking into the cache package too. I was not too happy with what I found in Resource and ResourceTracker :( here's the summary of the changes made: Resource: - stop using ints as bit fields for status flags. Use enum with EnumSet instead. isSet, changeStatus, and getStatusString heavily refactored for this. -- setStatusFlag, unsetStatusFlag, resetStatus, isInitialized, hasFlags added - made status field private - made several fields final, some others can't be made final (at least not without even more refactoring) - "transferred" and "size" long fields made volatile so that accesses are atomic !! hashCode override added, because equals was already overridden without it !! -- AND, Resource was used as the key type in a ConcurrentHashMap in ResourceTracker. Wonderful. ResourceTracker: - "import static" rather than creating copies of the status values in this class too... - Collection fields declared more generically (eg as just Collection) where possible, which was most places -- "queue" renamed "requestedDownloads" and changed from ArrayList to HashSet - the methods that provide for selecting the next resource to download from the "queue" don't even care about the ordering in the queue anyway, really, so being a List is an unnecessary restriction. I don't think we would want to allow for duplicates either, so a Set makes more sense to me unless duplicate entries are actually desired -- "resources" also now a HashSet instead of ArrayList, for similar reasoning - ordering didn't matter to begin with, and I don't see the point in allowing duplicates - SO many instances of ugly bit-fiddling to check a Resource's status cleaned up - #wait() takes a Collection rather than an array, allows for some cleanup in #waitForResources() - #findBestUrl() formatting fixed, no actual changes made here - #selectByFlag() renamed to #selectByStatus(), extracted most logic into #selectByFilter() (required since there is no more explicit UNINITIALIZED status flag) There's still a lot of fixing that can be done in ResourceTracker however. eg using a proper ThreadPool, proper synchronization rather than the global "lock" object and locking on a few other important fields. I'll start looking into that after this goes in. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: resource-enumset.patch Type: text/x-patch Size: 43949 bytes Desc: not available URL: From gnu.andrew at redhat.com Wed May 7 06:36:24 2014 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Wed, 7 May 2014 02:36:24 -0400 (EDT) Subject: icedtea6 debug build is missing some targets In-Reply-To: <53679A29.6030208@redhat.com> References: <53676AB9.5000404@redhat.com> <53676D08.2040400@redhat.com> <53679A29.6030208@redhat.com> Message-ID: <1933484879.1617046.1399444584752.JavaMail.zimbra@redhat.com> ----- Original Message ----- > On 05/05/2014 12:50 PM, Jiri Vanek wrote: > > > > Ouch. I was launching wrong target! > > > > icedtea-debug-against-icedtea > > is the right one. Sorry for noise. > > Anyway, there is small bug in stamps/add-nss-debug.stamp: > > Patch needed to build whole debug stack is attached. > > Ok to push to icedtea6-head an 1.13? > Ah, copy and paste error :) Yes, go ahead. > > > > -- 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 ptisnovs at icedtea.classpath.org Wed May 7 07:43:04 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 07 May 2014 07:43:04 +0000 Subject: /hg/gfx-test: Ten new tests added into BitBltBufferedImageOp. Message-ID: changeset f1e3b87d9d8a in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=f1e3b87d9d8a author: Pavel Tisnovsky date: Wed May 07 09:43:47 2014 +0200 Ten new tests added into BitBltBufferedImageOp. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltBufferedImageOp.java | 170 ++++++++++++++++++ 2 files changed, 175 insertions(+), 0 deletions(-) diffs (192 lines): diff -r a55ed9fda1a6 -r f1e3b87d9d8a ChangeLog --- a/ChangeLog Tue May 06 13:10:49 2014 +0200 +++ b/ChangeLog Wed May 07 09:43:47 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-07 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: + Ten new tests added into BitBltBufferedImageOp. + 2014-05-06 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: diff -r a55ed9fda1a6 -r f1e3b87d9d8a src/org/gfxtest/testsuites/BitBltBufferedImageOp.java --- a/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Tue May 06 13:10:49 2014 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Wed May 07 09:43:47 2014 +0200 @@ -2098,6 +2098,176 @@ } /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_565_RGB}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltHorizontalColorStripesTypeUshort565RGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_GRAY}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltHorizontalColorStripesTypeUshortGray(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithHorizontalColorStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_3BYTE_BGR}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesType3ByteBGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesType4ByteABGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR_PRE}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_BYTE_BINARY}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeByteBinary(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_BYTE_INDEXED}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeByteIndexed(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_INDEXED, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_BYTE_GRAY}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeByteGray(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_GRAY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_BGR}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeIntBGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_BGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_RGB}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeIntRGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_RGB, rasterOp); + } + + /** * Entry point to the test suite. * * @param args not used in this case From omajid at redhat.com Wed May 7 07:51:31 2014 From: omajid at redhat.com (Omair Majid) Date: Wed, 7 May 2014 03:51:31 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <53693A00.7000607@redhat.com> References: <53693A00.7000607@redhat.com> Message-ID: <20140507075131.GA2066@redhat.com> Hi, * Andrew Azores [2014-05-06 15:38]: > Prompted by Omair's recent patches to fix caching, I started looking > into the cache package too. I was not too happy with what I found in > Resource and ResourceTracker :( here's the summary of the changes > made: The patch looks okay to me. In the future, though, please try and keep separate changes as separate. At least formatting changes should be done as a separate patch. Also, would it be possible to add tests? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From jvanek at redhat.com Wed May 7 08:21:12 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 07 May 2014 10:21:12 +0200 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <53693A00.7000607@redhat.com> References: <53693A00.7000607@redhat.com> Message-ID: <5369ECF8.9050304@redhat.com> On 05/06/2014 09:37 PM, Andrew Azores wrote: > Hi, > > Prompted by Omair's recent patches to fix caching, I started looking into the cache package too. I > was not too happy with what I found in Resource and ResourceTracker :( here's the summary of the > changes made: > > Resource: > - stop using ints as bit fields for status flags. Use enum with EnumSet instead. isSet, > changeStatus, and getStatusString heavily refactored for this. > -- setStatusFlag, unsetStatusFlag, resetStatus, isInitialized, hasFlags added > - made status field private > - made several fields final, some others can't be made final (at least not without even more > refactoring) > - "transferred" and "size" long fields made volatile so that accesses are atomic > !! hashCode override added, because equals was already overridden without it !! > -- AND, Resource was used as the key type in a ConcurrentHashMap in ResourceTracker. Wonderful. > > ResourceTracker: > - "import static" rather than creating copies of the status values in this class too... > - Collection fields declared more generically (eg as just Collection) where possible, which was most > places > -- "queue" renamed "requestedDownloads" and changed from ArrayList to HashSet - the methods that > provide for selecting the next resource to download from the "queue" don't even care about the > ordering in the queue anyway, really, so being a List is an unnecessary restriction. I don't think > we would want to allow for duplicates either, so a Set makes more sense to me unless duplicate > entries are actually desired > -- "resources" also now a HashSet instead of ArrayList, for similar reasoning - ordering didn't > matter to begin with, and I don't see the point in allowing duplicates > - SO many instances of ugly bit-fiddling to check a Resource's status cleaned up > - #wait() takes a Collection rather than an array, allows for some cleanup in #waitForResources() > - #findBestUrl() formatting fixed, no actual changes made here > - #selectByFlag() renamed to #selectByStatus(), extracted most logic into #selectByFilter() > (required since there is no more explicit UNINITIALIZED status flag) > > There's still a lot of fixing that can be done in ResourceTracker however. eg using a proper > ThreadPool, proper synchronization rather than the global "lock" object and locking on a few other > important fields. I'll start looking into that after this goes in. > > Thanks, > As omair pointed out: > In the future, though, please try and keep separate changes as separate. > At least formatting changes should be done as a separate patch. please. this is quite important. Butok n context of this patch. > Also, would it be possible to add tests? ugh... I would like to stop this being pushed until the unitttest for *original* behavior are done. And then they are adapted to new "behavior". This part of itw is lacking the tests, so here is actually no trace if behvaiour was preserved. Otherwise the patch is ok. One more nit - I'm also working n fixing the cache. So we should talk a bit so we do not duplicate an effort:) My main task is to make itw-javaws run offline. End even behind the meaning of tag, which is often misused. With some luck, also the applets will run offline :) J. From jvanek at redhat.com Wed May 7 08:26:01 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 07 May 2014 10:26:01 +0200 Subject: [rfc][icedtea-web] conditional disabling of manifes tattributes In-Reply-To: <534E8D2C.3000204@redhat.com> References: <534691EA.8030606@redhat.com> <5346AE4A.9030106@redhat.com> <5347E911.8040707@redhat.com> <53481D05.3000802@redhat.com> <534D54E2.20500@redhat.com> <534E2C8A.5080009@redhat.com> <534E8D2C.3000204@redhat.com> Message-ID: <5369EE19.1@redhat.com> On 04/16/2014 04:01 PM, Andrew Azores wrote: > On 04/16/2014 03:08 AM, Jiri Vanek wrote: >> On 04/15/2014 05:48 PM, Jiri Vanek wrote: >>> On 04/11/2014 06:49 PM, Andrew Azores wrote: >>>> On 04/11/2014 09:07 AM, Jiri Vanek wrote: >>>>> On 04/10/2014 04:44 PM, Andrew Azores wrote: >>>>>> On 04/10/2014 08:43 AM, Jiri Vanek wrote: >>>>>>> Hi! >>>>>>> >>>>>>> This patch can disable the check for new manifest attributes. >>>>>>> sevral motivations >>>>>>> - I hate this feature >>>>>>> - the remembering of this actions may take time to implement >>>>>>> - and the most important - the testsuite... >>>>>> >>>>>> Most important indeed. >>>>>> >>>>>>> >>>>>>> will go both head and 1.5. >>>>>>> >>>>>>> I'm hesitating whether to make this property public via itw-settings... Well if so, then as >>>>>>> another changeset. Any opinion about publish it in itw-settings? >>>>>>> >>>>>>> J >>>>>> >>>>>> Ok to push, so that we can clean up some of the noise in the test suite. >>>>>> >>>>>> RE putting it in itweb-settings - I think the cleanest way to do this, if it's to be done at >>>>>> all, is >>>>>> probably to add another security level. 'Minimal' or something perhaps? Because I don't think it >>>>>> makes sense to add it in as a checkbox, for example, and have it possible to set security to >>>>>> High, >>>>>> but disable manifest checks. I'm not sure if we really want to allow this, though. I can imagine >>>>>> most users leaving the security level at Minimal once they discover that this gives them the >>>>>> least >>>>>> amount of clicking to do before getting their applets to run :) >>>>> >>>>> >>>>> Oh yes, that can be correct thing to do. But looking to the issue from this perspective, it is >>>>> NO-GO argument for it as it is done. Well all correct applications should be updated to support >>>>> new attributes.. but the legaxy, and still used ones? >>> >>> I have pushed at the end. This shortcut for testsuite is needed. >>>>> >>>>> So I have another idea here - really extend ExtendedAppletsSecurity, and to allow "do not check >>>>> manifest attributes" on the application/codebase - So all those dialogs will be moreover based on >>>>> your abstraction of Extended Applets security. Also remember alaca checkbox issue will be solved >>>>> by this. >>>>> >>>>> Bu the extension of ExtendedAppletsSecurity will needed to be done really carefully - and prepared >>>>> before implementation. >>>>> >>>>> What do you think? >>>> >>>> Sounds like it could be a lot of work, but should be worthwhile in the end. I think it will be very >>>> nice if we can unify all of our dialogs like this so that they can all make use of the same >>>> remembered action storage. Or at least, the ones that need to be able to remember actions. I'm not >>>> sure about having the manifest attribute check be an option to be selected on the dialog though, >>>> even with an option to remember it... but maybe it's the right thing to do. It just seems like the >>>> dialogs are getting busier and busier and more confusing looking, but you're right that this option >>>> will (hopefully) be used mostly for allowing some old applets which haven't been updated to be used >>>> still. In that kind of situation, which I think is the target, then applying the setting to all >>>> applets/globally maybe isn't the right choice. So as ugly and cluttered as the UI might become, I >>>> suppose this really should be done on a per-applet basis (maybe in addition to having it >>>> configurable globally?). >>>> >>> >>> Hi attached patch is adding the basic support for multiple types of actions. Well it apeared that >>> the implementation itself will be quit easy (if this approach will be used) but most troubles will >>> be in itw-settings. The table will requires serious revork on level of filtering, sorting, delting >>> and especially editing of first - action - column. >>> >>> General idea is - instead of one ExecuteAppletAction unsignedAppletAction will be list of them, >>> encapsualted in AppletSecurityActions unsignedAppletAction; >>> In file it will be encoded instead of current one char, as one-word string - see the tests. >>> To read/write the correct action for given type, there will be set of getters/setters - tight now >>> there is >>> public ExecuteAppletAction getUnsignedAppletAction() { >>> + return getAction(0); >>> + } >>> + >>> + public void setUnsignedAppletAction(ExecuteAppletAction a) { >>> + actions.set(0,a); >>> + } >>> >>> And they will encapsulate the order in list. >>> >>> >>> If nothing else...This is nicely backward compatible, and scaleable for growth of "remember me" >>> dialogs :) >>> >>> Once this is aproved -if ever - I will add few more "on top of it" work like -table or rember for >>> ALACAto se hw it works - before push itself. >>> J. >>> >>> >> >> This is a bit better - get rid of paranoid constant of MAX_LENGTH. >> >> J. >> > > Just a few nits: Here we go! > > - APPEXTSECunsetAppletActionNo should probably be renamed, why is the 'No' there? fixed > -- Should also be reworded, maybe "This applet has not been visited before" kept - es expalined before > - AppletSecurityActions.fromString() - why 'break' on whitespace? I can understand if it was only > internal whitespace, but even leading whitespace? eg the string " A" means UNSET? Maybe do a > String#trim() first. well, fixed, but see the comment in code > -- Please move the private empty constructor to the top of the class as well removed completely > - ExecuteAppletAction.fromString() - the RuntimeException message here should be reworded. > "Undefined zero-length ExecuteAppletAction String representation" ? fixed > - ExecuteAppletAction should be refactored now that it has both a toChar and fromChar. I would > suggest retaining the corresponding char as a field (so make a one-arg constructor), then toChar > simply returns this and fromChar iterates over the enum values. If there is a matching enum value's > char, return that enum value, otherwise return UNSET Unless you really insist, I kept my original approach. I like it more. > - Rather than doing 'for (int i = 0; i < str.length(); i++)' and 's.charAt(i)', how about for (char > ch : s.toCharArray())? ok :) > > Thanks, > The unittest was enhanced to test backward compatibility and new feature. Thank you again. J. -------------- next part -------------- A non-text attachment was scrubbed... Name: multipleActionsBasePatch4.patch Type: text/x-patch Size: 34009 bytes Desc: not available URL: From helpcrypto at gmail.com Wed May 7 10:36:22 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 7 May 2014 12:36:22 +0200 Subject: Icedtea-web: Enable debug+logging from applet params? Message-ID: Hi. According to [1] it could be possible to enable trace and logging for the jvm using *defines* "-D". Also, [2] states that any "safe" argument could be provided using "java_arguments". With both resources in mind and using ORACLE JRE, have tried to enable logging by default, to being able to get a full debug log for users which havent enabled -manually- debugging on their control panel. Tried things like: or \ or or But none seems to work. Do Icedtea supports something similar? Is this possible? Should I fill a bug, cause its an interesting/unimplemented feature on Icedtea? To sum-up: I'll love to get a debug log, no matter if users have enabled tracing/debug on their Java Control Panel. Thanks a lot! [1] http://docs.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/tracing_logging.html [2] http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at redhat.com Wed May 7 11:26:22 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 07 May 2014 13:26:22 +0200 Subject: Icedtea-web: Enable debug+logging from applet params? In-Reply-To: References: Message-ID: <536A185E.9030400@redhat.com> On 05/07/2014 12:36 PM, helpcrypto helpcrypto wrote: > Hi. > > > According to [1] it could be possible to enable trace and logging for the jvm using /defines/ "-D". > Also, [2] states that any "safe" argument could be provided using "java_arguments". > > > With both resources in mind and using ORACLE JRE, have tried to enable logging by default, to being > able to get a full debug log for users which havent enabled -manually- debugging on their control > panel. Tried things like: > > > this is jvm switch. It should work. properly. But note it is affecting behaviourour of JVM - not of plugin or javaws - no metter of itw od plugin. Also note, that to have efect, the JVM must be forked (intiial jvm read jnl, and start second jvm with new parameter added) This logging/trace can be controlled by all way JVM's debug can be controlled. > or > \ I dont know his one:( > or > > or > No, those - plugin specific - params are not supported by ITW .... > > But none seems to work. > > Do Icedtea supports something similar? Is this possible? Should I fill a bug, cause its an > interesting/unimplemented feature on Icedtea? > > To sum-up: I'll love to get a debug log, no matter if users have enabled tracing/debug on their Java > Control Panel. ... we do it differently. So the question is what you wont to achieve? In ITW, right now, all the debug is ON by default. Just hidden. It is logging into hidden console. Pleade note, we are now speaking about controlin of output of itw (and application run inside it) In itw settings, or by environment variable you can - enable level of ST/ERR out ( just three levels, nothing, errors, all) - same for logging into file The console always receive everything. You are filtering it in runtime. - The file is disabled by default - std/err outs are showing erros - console is receiving all So first question - do you care about output of jvm? There ishrdly something what we cna do. If you care about applications/itw output, then there is a lot what we can do. To manipulate with debug settings of itw from applet tag/jnlp file - tbh I'mnot fan of it:( What is it good for? Do you need to send the logs to your machine? Shouldnt then users just send what they wont to sent? J. > > > Thanks a lot! > > > [1] > http://docs.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/tracing_logging.html > [2] http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/applet/applet_deployment.html From helpcrypto at gmail.com Wed May 7 12:36:58 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 7 May 2014 14:36:58 +0200 Subject: Icedtea-web: Enable debug+logging from applet params? In-Reply-To: <536A185E.9030400@redhat.com> References: <536A185E.9030400@redhat.com> Message-ID: Hi Jiri, thanks for your reply. As most of your explanation seems to question the purpose of this, I'll try to be clear on that. Using Oracle JRE ControlPanel you can view/hide the console and enable 3 levels of debug. As you said, ITW does something similar. Many times, users don't have such settings, and they have default (no debug enabled/hidden console) so logs are smaller or there isn't a log file. I was trying to enable -using applet params- tracing/debuglevel for my applet, so being able to ask the user for the log-file (and having a full one, not a short one). In other words: let developers being able to enable per-applet debuglevel. Did I explanied myself properly this time? Regards On Wed, May 7, 2014 at 1:26 PM, Jiri Vanek wrote: > On 05/07/2014 12:36 PM, helpcrypto helpcrypto wrote: > >> Hi. >> >> >> According to [1] it could be possible to enable trace and logging for the >> jvm using /defines/ "-D". >> >> Also, [2] states that any "safe" argument could be provided using >> "java_arguments". >> >> >> With both resources in mind and using ORACLE JRE, have tried to enable >> logging by default, to being >> able to get a full debug log for users which havent enabled -manually- >> debugging on their control >> panel. Tried things like: >> >> >> >> > > > this is jvm switch. It should work. properly. But note it is affecting > behaviourour of JVM - not of plugin or javaws - no metter of itw od plugin. > Also note, that to have efect, the JVM must be forked (intiial jvm read > jnl, and start second jvm with new parameter added) > > This logging/trace can be controlled by all way JVM's debug can be > controlled. > > or >> \ >> > > I dont know his one:( > > or >> >> or >> > /> >> > > No, those - plugin specific - params are not supported by ITW .... > > >> But none seems to work. >> >> Do Icedtea supports something similar? Is this possible? Should I fill a >> bug, cause its an >> interesting/unimplemented feature on Icedtea? >> >> To sum-up: I'll love to get a debug log, no matter if users have enabled >> tracing/debug on their Java >> Control Panel. >> > > ... we do it differently. > > > > So the question is what you wont to achieve? > > > In ITW, right now, all the debug is ON by default. Just hidden. It is > logging into hidden console. > > Pleade note, we are now speaking about controlin of output of itw (and > application run inside it) > > In itw settings, or by environment variable you can > - enable level of ST/ERR out ( just three levels, nothing, errors, all) > - same for logging into file > > The console always receive everything. You are filtering it in runtime. > - The file is disabled by default > - std/err outs are showing erros > - console is receiving all > > So first question - do you care about output of jvm? There ishrdly > something what we cna do. > If you care about applications/itw output, then there is a lot what we can > do. > > To manipulate with debug settings of itw from applet tag/jnlp file - tbh > I'mnot fan of it:( What is it good for? Do you need to send the logs to > your machine? Shouldnt then users just send what they wont to sent? > > J. > > >> >> Thanks a lot! >> >> >> [1] >> http://docs.oracle.com/javase/6/docs/technotes/guides/ >> deployment/deployment-guide/tracing_logging.html >> [2] http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/ >> applet/applet_deployment.html >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Wed May 7 14:21:48 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 07 May 2014 10:21:48 -0400 Subject: [rfc][icedtea-web] conditional disabling of manifes tattributes In-Reply-To: <5369EE19.1@redhat.com> References: <534691EA.8030606@redhat.com> <5346AE4A.9030106@redhat.com> <5347E911.8040707@redhat.com> <53481D05.3000802@redhat.com> <534D54E2.20500@redhat.com> <534E2C8A.5080009@redhat.com> <534E8D2C.3000204@redhat.com> <5369EE19.1@redhat.com> Message-ID: <536A417C.7030205@redhat.com> On 05/07/2014 04:26 AM, Jiri Vanek wrote: > On 04/16/2014 04:01 PM, Andrew Azores wrote: >> On 04/16/2014 03:08 AM, Jiri Vanek wrote: >>> On 04/15/2014 05:48 PM, Jiri Vanek wrote: >>>> On 04/11/2014 06:49 PM, Andrew Azores wrote: >>>>> On 04/11/2014 09:07 AM, Jiri Vanek wrote: >>>>>> On 04/10/2014 04:44 PM, Andrew Azores wrote: >>>>>>> On 04/10/2014 08:43 AM, Jiri Vanek wrote: >>>>>>>> Hi! >>>>>>>> >>>>>>>> This patch can disable the check for new manifest attributes. >>>>>>>> sevral motivations >>>>>>>> - I hate this feature >>>>>>>> - the remembering of this actions may take time to implement >>>>>>>> - and the most important - the testsuite... >>>>>>> >>>>>>> Most important indeed. >>>>>>> >>>>>>>> >>>>>>>> will go both head and 1.5. >>>>>>>> >>>>>>>> I'm hesitating whether to make this property public via >>>>>>>> itw-settings... Well if so, then as >>>>>>>> another changeset. Any opinion about publish it in itw-settings? >>>>>>>> >>>>>>>> J >>>>>>> >>>>>>> Ok to push, so that we can clean up some of the noise in the >>>>>>> test suite. >>>>>>> >>>>>>> RE putting it in itweb-settings - I think the cleanest way to do >>>>>>> this, if it's to be done at >>>>>>> all, is >>>>>>> probably to add another security level. 'Minimal' or something >>>>>>> perhaps? Because I don't think it >>>>>>> makes sense to add it in as a checkbox, for example, and have it >>>>>>> possible to set security to >>>>>>> High, >>>>>>> but disable manifest checks. I'm not sure if we really want to >>>>>>> allow this, though. I can imagine >>>>>>> most users leaving the security level at Minimal once they >>>>>>> discover that this gives them the >>>>>>> least >>>>>>> amount of clicking to do before getting their applets to run :) >>>>>> >>>>>> >>>>>> Oh yes, that can be correct thing to do. But looking to the issue >>>>>> from this perspective, it is >>>>>> NO-GO argument for it as it is done. Well all correct >>>>>> applications should be updated to support >>>>>> new attributes.. but the legaxy, and still used ones? >>>> >>>> I have pushed at the end. This shortcut for testsuite is needed. >>>>>> >>>>>> So I have another idea here - really extend >>>>>> ExtendedAppletsSecurity, and to allow "do not check >>>>>> manifest attributes" on the application/codebase - So all those >>>>>> dialogs will be moreover based on >>>>>> your abstraction of Extended Applets security. Also remember >>>>>> alaca checkbox issue will be solved >>>>>> by this. >>>>>> >>>>>> Bu the extension of ExtendedAppletsSecurity will needed to be >>>>>> done really carefully - and prepared >>>>>> before implementation. >>>>>> >>>>>> What do you think? >>>>> >>>>> Sounds like it could be a lot of work, but should be worthwhile in >>>>> the end. I think it will be very >>>>> nice if we can unify all of our dialogs like this so that they can >>>>> all make use of the same >>>>> remembered action storage. Or at least, the ones that need to be >>>>> able to remember actions. I'm not >>>>> sure about having the manifest attribute check be an option to be >>>>> selected on the dialog though, >>>>> even with an option to remember it... but maybe it's the right >>>>> thing to do. It just seems like the >>>>> dialogs are getting busier and busier and more confusing looking, >>>>> but you're right that this option >>>>> will (hopefully) be used mostly for allowing some old applets >>>>> which haven't been updated to be used >>>>> still. In that kind of situation, which I think is the target, >>>>> then applying the setting to all >>>>> applets/globally maybe isn't the right choice. So as ugly and >>>>> cluttered as the UI might become, I >>>>> suppose this really should be done on a per-applet basis (maybe in >>>>> addition to having it >>>>> configurable globally?). >>>>> >>>> >>>> Hi attached patch is adding the basic support for multiple types of >>>> actions. Well it apeared that >>>> the implementation itself will be quit easy (if this approach will >>>> be used) but most troubles will >>>> be in itw-settings. The table will requires serious revork on level >>>> of filtering, sorting, delting >>>> and especially editing of first - action - column. >>>> >>>> General idea is - instead of one ExecuteAppletAction >>>> unsignedAppletAction will be list of them, >>>> encapsualted in AppletSecurityActions unsignedAppletAction; >>>> In file it will be encoded instead of current one char, as one-word >>>> string - see the tests. >>>> To read/write the correct action for given type, there will be set >>>> of getters/setters - tight now >>>> there is >>>> public ExecuteAppletAction getUnsignedAppletAction() { >>>> + return getAction(0); >>>> + } >>>> + >>>> + public void setUnsignedAppletAction(ExecuteAppletAction a) { >>>> + actions.set(0,a); >>>> + } >>>> >>>> And they will encapsulate the order in list. >>>> >>>> >>>> If nothing else...This is nicely backward compatible, and scaleable >>>> for growth of "remember me" >>>> dialogs :) >>>> >>>> Once this is aproved -if ever - I will add few more "on top of it" >>>> work like -table or rember for >>>> ALACAto se hw it works - before push itself. >>>> J. >>>> >>>> >>> >>> This is a bit better - get rid of paranoid constant of MAX_LENGTH. >>> >>> J. >>> >> >> Just a few nits: > > Here we go! > >> >> - APPEXTSECunsetAppletActionNo should probably be renamed, why is the >> 'No' there? > fixed > >> -- Should also be reworded, maybe "This applet has not been visited >> before" > > kept - es expalined before > >> - AppletSecurityActions.fromString() - why 'break' on whitespace? I >> can understand if it was only >> internal whitespace, but even leading whitespace? eg the string " A" >> means UNSET? Maybe do a >> String#trim() first. > > well, fixed, but see the comment in code > >> -- Please move the private empty constructor to the top of the class >> as well > removed completely > >> - ExecuteAppletAction.fromString() - the RuntimeException message >> here should be reworded. >> "Undefined zero-length ExecuteAppletAction String representation" ? > fixed > >> - ExecuteAppletAction should be refactored now that it has both a >> toChar and fromChar. I would >> suggest retaining the corresponding char as a field (so make a >> one-arg constructor), then toChar >> simply returns this and fromChar iterates over the enum values. If >> there is a matching enum value's >> char, return that enum value, otherwise return UNSET > > > Unless you really insist, I kept my original approach. I like it more. I don't insist, I just think doing it my way might be nice because adding new kinds of action in the future doesn't require remembering to add a corresponding case to the switch. Admittedly it does make the enum itself maybe a little more difficult to read. Anyway, I'm fine with keeping it as is. > >> - Rather than doing 'for (int i = 0; i < str.length(); i++)' and >> 's.charAt(i)', how about for (char >> ch : s.toCharArray())? > > ok :) >> >> Thanks, >> > > > The unittest was enhanced to test backward compatibility and new feature. > > > Thank you again. > > J. APPEXTSECunsetAppletAction: s/have/has/ and some of the license headers say 2013, maybe they should say 2014 ;) Okay to push after that though. Thanks, -- Andrew A From aazores at redhat.com Wed May 7 16:02:33 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 07 May 2014 12:02:33 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <5369ECF8.9050304@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> Message-ID: <536A5919.4040502@redhat.com> On 05/07/2014 04:21 AM, Jiri Vanek wrote: > On 05/06/2014 09:37 PM, Andrew Azores wrote: >> Hi, >> >> Prompted by Omair's recent patches to fix caching, I started looking >> into the cache package too. I >> was not too happy with what I found in Resource and ResourceTracker >> :( here's the summary of the >> changes made: >> >> Resource: >> - stop using ints as bit fields for status flags. Use enum with >> EnumSet instead. isSet, >> changeStatus, and getStatusString heavily refactored for this. >> -- setStatusFlag, unsetStatusFlag, resetStatus, isInitialized, >> hasFlags added >> - made status field private >> - made several fields final, some others can't be made final (at >> least not without even more >> refactoring) >> - "transferred" and "size" long fields made volatile so that accesses >> are atomic >> !! hashCode override added, because equals was already overridden >> without it !! >> -- AND, Resource was used as the key type in a ConcurrentHashMap in >> ResourceTracker. Wonderful. >> >> ResourceTracker: >> - "import static" rather than creating copies of the status values in >> this class too... >> - Collection fields declared more generically (eg as just Collection) >> where possible, which was most >> places >> -- "queue" renamed "requestedDownloads" and changed from ArrayList to >> HashSet - the methods that >> provide for selecting the next resource to download from the "queue" >> don't even care about the >> ordering in the queue anyway, really, so being a List is an >> unnecessary restriction. I don't think >> we would want to allow for duplicates either, so a Set makes more >> sense to me unless duplicate >> entries are actually desired >> -- "resources" also now a HashSet instead of ArrayList, for similar >> reasoning - ordering didn't >> matter to begin with, and I don't see the point in allowing duplicates >> - SO many instances of ugly bit-fiddling to check a Resource's status >> cleaned up >> - #wait() takes a Collection rather than an array, allows for some >> cleanup in #waitForResources() >> - #findBestUrl() formatting fixed, no actual changes made here >> - #selectByFlag() renamed to #selectByStatus(), extracted most logic >> into #selectByFilter() >> (required since there is no more explicit UNINITIALIZED status flag) >> >> There's still a lot of fixing that can be done in ResourceTracker >> however. eg using a proper >> ThreadPool, proper synchronization rather than the global "lock" >> object and locking on a few other >> important fields. I'll start looking into that after this goes in. >> >> Thanks, >> > > As omair pointed out: > > > In the future, though, please try and keep separate changes as > separate. > > At least formatting changes should be done as a separate patch. > > please. this is quite important. Butok n context of this patch. > > > > Also, would it be possible to add tests? > > ugh... I would like to stop this being pushed until the unitttest for > *original* behavior are done. And then they are adapted to new > "behavior". This part of itw is lacking the tests, so here is > actually no trace if behvaiour was preserved. > > Otherwise the patch is ok. Alright. I've attached tests for Resource#status and for ResourceTracker.selectByFlag in their current state. They can be fairly easily reworked for the EnumSet patch once you verify that the tests are sufficiently guarding against behaviour changes (or find that they aren't and I fix it so they are!). These new tests should apply to HEAD and all pass currently. > > > One more nit - I'm also working n fixing the cache. So we should talk > a bit so we do not duplicate an effort:) Sure, although this isn't aimed at specifically fixing the cache. It's just an attempt to increase the quality of the code. > > My main task is to make itw-javaws run offline. End even behind the > meaning of tag, which is often misused. With some luck, also > the applets will run offline :) > > J. > Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: resource-enumset-tests-1.patch Type: text/x-patch Size: 10468 bytes Desc: not available URL: From ptisnovs at icedtea.classpath.org Fri May 9 08:42:54 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 09 May 2014 08:42:54 +0000 Subject: /hg/gfx-test: Eight new tests added into CAGOperationsOnTwoTouch... Message-ID: changeset 7223ae87ebca in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=7223ae87ebca author: Pavel Tisnovsky date: Fri May 09 10:43:39 2014 +0200 Eight new tests added into CAGOperationsOnTwoTouchingCircles. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java | 220 +++++++++- 2 files changed, 211 insertions(+), 14 deletions(-) diffs (303 lines): diff -r f1e3b87d9d8a -r 7223ae87ebca ChangeLog --- a/ChangeLog Wed May 07 09:43:47 2014 +0200 +++ b/ChangeLog Fri May 09 10:43:39 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-09 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java: + Eight new tests added into CAGOperationsOnTwoTouchingCircles. + 2014-05-07 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: diff -r f1e3b87d9d8a -r 7223ae87ebca src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java --- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java Wed May 07 09:43:47 2014 +0200 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java Fri May 09 10:43:39 2014 +0200 @@ -2482,6 +2482,98 @@ return TestResult.PASSED; } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingRGBTexture1(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture1(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d); // create area using union operator Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingUnionOperator(image); // draw the area @@ -2492,6 +2584,106 @@ /** * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two touching circles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingRGBTexture2(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingRGBTexture2(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape * constructed from two touching circles using union operator. The shape is rendered * using radial gradient paint (fill). * @@ -2517,8 +2709,8 @@ /** * Checks the process of creating and rendering new geometric shape - * constructed from two touching circles using inverse subtract operator. The shape - * is rendered using radial gradient paint (fill). + * constructed from two touching circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). * * @param image * image to which area is to be drawn @@ -2526,12 +2718,12 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testInverseSubtractRadialGradientPaint(TestImage image, Graphics2D graphics2d) + public TestResult testInverseSubtractTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) { // set stroke color CommonRenderingStyles.setStrokeColor(graphics2d); // set fill color - CommonRenderingStyles.setRadialGradientFill(image, graphics2d); + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); // create area using inverse subtract operator Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingInverseSubtractOperator(image); // draw the area @@ -2542,8 +2734,8 @@ /** * Checks the process of creating and rendering new geometric shape - * constructed from two touching circles using intersect operator. The shape is - * rendered using radial gradient paint (fill). + * constructed from two touching circles using Intersect operator. The shape is rendered + * using texture paint (fill). * * @param image * image to which area is to be drawn @@ -2551,13 +2743,13 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testIntersectRadialGradientPaint(TestImage image, Graphics2D graphics2d) + public TestResult testIntersectTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) { // set stroke color CommonRenderingStyles.setStrokeColor(graphics2d); // set fill color - CommonRenderingStyles.setRadialGradientFill(image, graphics2d); - // create area using intersect operator + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using Intersect operator Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingIntersectOperator(image); // draw the area graphics2d.fill(area); @@ -2567,8 +2759,8 @@ /** * Checks the process of creating and rendering new geometric shape - * constructed from two touching circles using XOR operator. The shape is rendered - * using radial gradient paint (fill). + * constructed from two touching circles using Xor operator. The shape is rendered + * using texture paint (fill). * * @param image * image to which area is to be drawn @@ -2576,13 +2768,13 @@ * graphics canvas * @return test result status - PASSED, FAILED or ERROR */ - public TestResult testXorRadialGradientPaint(TestImage image, Graphics2D graphics2d) + public TestResult testXorTextureFillUsingRGBTexture6(TestImage image, Graphics2D graphics2d) { // set stroke color CommonRenderingStyles.setStrokeColor(graphics2d); // set fill color - CommonRenderingStyles.setRadialGradientFill(image, graphics2d); - // create area using XOR operator + CommonRenderingStyles.setTextureFillUsingRGBTexture6(image, graphics2d); + // create area using Xor operator Area area = CommonCAGOperations.createAreaFromTwoTouchingCirclesUsingXorOperator(image); // draw the area graphics2d.fill(area); From jvanek at icedtea.classpath.org Fri May 9 11:19:41 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 09 May 2014 11:19:41 +0000 Subject: /hg/release/icedtea6-1.13: Makefile.am: (add-nss-debug.stamp): f... Message-ID: changeset c48649311b8f in /hg/release/icedtea6-1.13 details: http://icedtea.classpath.org/hg/release/icedtea6-1.13?cmd=changeset;node=c48649311b8f author: Jiri Vanek date: Fri May 09 13:19:29 2014 +0200 Makefile.am: (add-nss-debug.stamp): fixed ECJ_BUILD_OUTPUT_DIR to DEBUG_BUILD_OUTPUT_DIR. diffstat: ChangeLog | 5 +++++ Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diffs (24 lines): diff -r e9c20ef2e0fc -r c48649311b8f ChangeLog --- a/ChangeLog Thu Apr 17 02:30:59 2014 +0100 +++ b/ChangeLog Fri May 09 13:19:29 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-09 Jiri Vanek + + * Makefile.am: (add-nss-debug.stamp): fixed ECJ_BUILD_OUTPUT_DIR + to DEBUG_BUILD_OUTPUT_DIR. + 2014-04-16 Andrew John Hughes * configure.ac: Bump to 1.13.4pre. diff -r e9c20ef2e0fc -r c48649311b8f Makefile.am --- a/Makefile.am Thu Apr 17 02:30:59 2014 +0100 +++ b/Makefile.am Fri May 09 13:19:29 2014 +0200 @@ -1901,7 +1901,7 @@ rm -f stamps/add-nss-debug.stamp.tmp touch stamps/add-nss-debug.stamp.tmp all_patches_ok=yes; \ - for dir in $(ECJ_BUILD_OUTPUT_DIR)/{j2sdk-image/jre,j2re-image} ; \ + for dir in $(DEBUG_BUILD_OUTPUT_DIR)/{j2sdk-image/jre,j2re-image} ; \ do \ pushd $$dir ; \ cp -v $$dir/lib/security/java.security{,.old} ; \ From jvanek at icedtea.classpath.org Fri May 9 11:28:48 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 09 May 2014 11:28:48 +0000 Subject: /hg/icedtea6: Makefile.am: (add-nss-debug.stamp): fixed ECJ_BUIL... Message-ID: changeset 29d6e0e0c2d2 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=29d6e0e0c2d2 author: Jiri Vanek date: Fri May 09 13:28:18 2014 +0200 Makefile.am: (add-nss-debug.stamp): fixed ECJ_BUILD_OUTPUT_DIR to DEBUG_BUILD_OUTPUT_DIR. diffstat: ChangeLog | 5 +++++ Makefile.am | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diffs (24 lines): diff -r c0295bae714c -r 29d6e0e0c2d2 ChangeLog --- a/ChangeLog Thu Apr 17 02:40:37 2014 +0100 +++ b/ChangeLog Fri May 09 13:28:18 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-09 Jiri Vanek + + * Makefile.am: (add-nss-debug.stamp): fixed ECJ_BUILD_OUTPUT_DIR + to DEBUG_BUILD_OUTPUT_DIR. + 2014-04-16 Andrew John Hughes * NEWS: diff -r c0295bae714c -r 29d6e0e0c2d2 Makefile.am --- a/Makefile.am Thu Apr 17 02:40:37 2014 +0100 +++ b/Makefile.am Fri May 09 13:28:18 2014 +0200 @@ -1918,7 +1918,7 @@ rm -f stamps/add-nss-debug.stamp.tmp touch stamps/add-nss-debug.stamp.tmp all_patches_ok=yes; \ - for dir in $(ECJ_BUILD_OUTPUT_DIR)/{j2sdk-image/jre,j2re-image} ; \ + for dir in $(DEBUG_BUILD_OUTPUT_DIR)/{j2sdk-image/jre,j2re-image} ; \ do \ pushd $$dir ; \ cp -v $$dir/lib/security/java.security{,.old} ; \ From jvanek at redhat.com Fri May 9 11:30:58 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 09 May 2014 13:30:58 +0200 Subject: icedtea6 debug build is missing some targets In-Reply-To: <1933484879.1617046.1399444584752.JavaMail.zimbra@redhat.com> References: <53676AB9.5000404@redhat.com> <53676D08.2040400@redhat.com> <53679A29.6030208@redhat.com> <1933484879.1617046.1399444584752.JavaMail.zimbra@redhat.com> Message-ID: <536CBC72.4070207@redhat.com> On 05/07/2014 08:36 AM, Andrew Hughes wrote: > > > ----- Original Message ----- >> On 05/05/2014 12:50 PM, Jiri Vanek wrote: >>> >>> Ouch. I was launching wrong target! >>> >>> icedtea-debug-against-icedtea >>> is the right one. Sorry for noise. >> >> Anyway, there is small bug in stamps/add-nss-debug.stamp: >> >> Patch needed to build whole debug stack is attached. >> >> Ok to push to icedtea6-head an 1.13? >> > > Ah, copy and paste error :) > > Yes, go ahead. > Thanx pushed, http://icedtea.classpath.org/hg/release/icedtea6-1.13/rev/c48649311b8f http://icedtea.classpath.org/hg/icedtea6/rev/29d6e0e0c2d2 Well I was quite surprised seeing this duplicated code, just with different path.But I assume there is no simple codeclean:( J. From jvanek at redhat.com Fri May 9 12:24:20 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 09 May 2014 14:24:20 +0200 Subject: Icedtea-web: Enable debug+logging from applet params? In-Reply-To: References: <536A185E.9030400@redhat.com> Message-ID: <536CC8F4.9050309@redhat.com> On 05/07/2014 02:36 PM, helpcrypto helpcrypto wrote: > Hi Jiri, thanks for your reply. > > > As most of your explanation seems to question the purpose of this, I'll try to be clear on that. > > Using Oracle JRE ControlPanel you can view/hide the console and enable 3 levels of debug. As you > said, ITW does something similar. In ITW words: We can have debug on/of console can be set to show/hide (you can show it in case of error) / disable - if it is shown or hidden, console always have also debug messages (from view of console, debug is always on) - native messages from plugin must be enabled in itw-settings or by system variable to be available in console - but those are mostly not interesting for *any* plugin developer (they really are not :) - itw have also file logging, and system logging. But it is not 100% useful for this purpose. - file logging is split into native/java parts (in oposite of stdout, where is split by stdout/err) - system logging is always getting *only* fatal errors Well this should be already working in itw. As itwsettings result is just properties file, which is just merged into existing properties, you should be able to set the (eg) "-Ddeployment.console.startup.mode=SHOW" to JNLP/apllet pretty smoothly. But to be truth, I need to revisit this. It was not tested for some time. (And I'm not sure which have preference - wheter item in deployment.properties, or one from "command line") If pure "-Ddeployment.console.startup.mode=SHOW" can you try to add also "-Xmx=1g" ? This is forcing the fork of VM 100%. > Many times, users don't have such settings, and they have default (no debug enabled/hidden console) > so logs are smaller or there isn't a log file. This is just philosophical: Is better to have "-Denable.someDebu=someLevel" in jnlp/applet file, and ask user to lunch this jnlp/applet (instead of the one with normal debug) or to tell him change click itw-settings and show the console? (As you probably have to do anyway for proprietary plugin) > > I was trying to enable -using applet params- tracing/debuglevel for my applet, so being able to ask > the user for the log-file (and having a full one, not a short one). In other words: let developers > being able to enable per-applet debuglevel. > > Did I explanied myself properly this time? > > A bit better:) Thank you! If the proeprty I told upper will work for you, then please note - console have copy-all button - however, this button by default do not copy output of application. (it copy just output of ITW)) If your usecase is to get *yours* app messages, then it probably deserves to change this approach. (or explain to user) Looking forward for ideas! This looks quite interesting ;) J. -------------- next part -------------- A non-text attachment was scrubbed... Name: itwDebugSettings.png Type: image/png Size: 32936 bytes Desc: not available URL: From jvanek at icedtea.classpath.org Fri May 9 12:59:04 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 09 May 2014 12:59:04 +0000 Subject: /hg/icedtea-web: Internal implementation of ExecuteAppletAction ... Message-ID: changeset a1a59525e85e in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a1a59525e85e author: Jiri Vanek date: Fri May 09 14:58:37 2014 +0200 Internal implementation of ExecuteAppletAction now support multiple items diffstat: ChangeLog | 24 + netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java | 5 +- netx/net/sourceforge/jnlp/resources/Messages.properties | 1 + netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java | 116 +++++++ netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java | 40 +- netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java | 19 +- netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java | 2 +- tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java | 147 +++++++++ tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java | 37 ++ tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java | 151 +++++++-- 10 files changed, 490 insertions(+), 52 deletions(-) diffs (truncated from 754 to 500 lines): diff -r de898c0d6d5f -r a1a59525e85e ChangeLog --- a/ChangeLog Mon May 05 17:11:45 2014 +0200 +++ b/ChangeLog Fri May 09 14:58:37 2014 +0200 @@ -1,3 +1,27 @@ +2014-05-09 Jiri Vanek + + Internal implementation of ExecuteAppletAction now support multiple items + * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java: + Returning AppletSecurityActions instead of ExecuteAppletAction class + * netx/net/sourceforge/jnlp/resources/Messages.properties: added + APPEXTSECunsetAppletAction key. + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java: + New file, to handle multiple actions hidden in one record. + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java: Added + UNSET option, handled in (fromString) and (fromChar) and (toChar) and (toExpalnation) + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java: + instead of ExecuteAppletAction type in fromString and constructor, using + AppletSecurityActions + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java: + behaviour wrapped by AppletSecurityActions.fromAction(behaviour) + * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java: + New test for new file + * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java: + added license header + * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java: + Test adapted to new features, and to preserving old behavior. + + 2014-05-05 Jiri Vanek Links in AppTrustWarningPanel are now clickable. diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java --- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java Mon May 05 17:11:45 2014 +0200 +++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java Fri May 09 14:58:37 2014 +0200 @@ -39,6 +39,7 @@ import javax.swing.event.TableModelEvent; import javax.swing.table.AbstractTableModel; import net.sourceforge.jnlp.runtime.Translator; +import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityActions; import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction; import net.sourceforge.jnlp.security.appletextendedsecurity.UnsignedAppletActionEntry; import net.sourceforge.jnlp.security.appletextendedsecurity.UrlRegEx; @@ -75,7 +76,7 @@ @Override public Class getColumnClass(int columnIndex) { if (columnIndex == 0) { - return ExecuteAppletAction.class; + return AppletSecurityActions.class; } if (columnIndex == 1) { return Date.class; @@ -145,7 +146,7 @@ int i = getRowCount()-1; String s = "\\Qhttp://localhost:80/\\E.*"; back.add(new UnsignedAppletActionEntry( - ExecuteAppletAction.NEVER, + AppletSecurityActions.fromAction(ExecuteAppletAction.NEVER), new Date(), new UrlRegEx(s), new UrlRegEx(s), diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 05 17:11:45 2014 +0200 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Fri May 09 14:58:37 2014 +0200 @@ -818,6 +818,7 @@ APPEXTSECunsignedAppletActionYes=This applet was visited and allowed APPEXTSecunsignedAppletActionSandbox=This applet was visited and allowed to run with restricted privileges APPEXTSECunsignedAppletActionNo=This applet was visited and denied +APPEXTSECunsetAppletAction=This applet has not yet asked for this action APPEXTSECControlPanelExtendedAppletSecurityTitle=Extended applet security APPEXTSECguiTableModelTableColumnAction=Action APPEXTSECguiTableModelTableColumnDateOfAction=Date of action diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java Fri May 09 14:58:37 2014 +0200 @@ -0,0 +1,116 @@ +/* Copyright (C) 2014 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.appletextendedsecurity; + +import java.util.ArrayList; +import java.util.List; + +public class AppletSecurityActions { + private final List actions = new ArrayList<>(); + + + /* + * backward compatibility method for base, UnsignedAppletTrustConfirmation usage + * FIXME - remove + */ + public static AppletSecurityActions fromAction(ExecuteAppletAction s) { + if (s == null){ + s = ExecuteAppletAction.UNSET; + } + return fromString(s.toChar()); + } + + static AppletSecurityActions fromString(String s) { + if (s == null) { + s = ""; + } + s = s.trim(); //to not return on leading space, may be dangerous, + //but the s shouldbe already trimmed before bubbling here. + //does " A" means UNSET(1)+ALWAYS(2) or ALWAYS(1)+UNSET(2) + //or UNSET(1)+UNSET(2)? + AppletSecurityActions asas = new AppletSecurityActions(); + for (char x : s.toCharArray()){ + if (Character.isWhitespace(x)){ + break; + } + asas.actions.add(ExecuteAppletAction.fromChar(x)); + } + return asas; + } + + public ExecuteAppletAction getAction(int i) { + if (i>= actions.size()){ + return ExecuteAppletAction.UNSET; + } + return actions.get(i); + } + + void setAction(int i, ExecuteAppletAction a) { + while (actions.size() <= i){ + actions.add(ExecuteAppletAction.UNSET); + } + actions.set(i,a); + } + + + public ExecuteAppletAction getUnsignedAppletAction() { + return getAction(0); + } + + public void setUnsignedAppletAction(ExecuteAppletAction a) { + actions.set(0,a); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + for (ExecuteAppletAction executeAppletAction : actions) { + sb.append(executeAppletAction.toChar()); + } + return sb.toString(); + } + + + /** + * stub for testing + * @return + */ + List getActions() { + return actions; + } + + +} \ No newline at end of file diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java --- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java Mon May 05 17:11:45 2014 +0200 +++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/ExecuteAppletAction.java Fri May 09 14:58:37 2014 +0200 @@ -39,7 +39,7 @@ public enum ExecuteAppletAction { - ALWAYS, NEVER, YES, SANDBOX, NO; + ALWAYS, NEVER, YES, SANDBOX, NO, UNSET; public String toChar() { switch (this) { @@ -53,6 +53,8 @@ return "s"; case NO: return "n"; + case UNSET: + return "X"; } throw new RuntimeException("Unknown ExecuteUnsignedApplet"); } @@ -69,24 +71,36 @@ return Translator.R("APPEXTSECunsignedAppletActionSandbox"); case NO: return Translator.R("APPEXTSECunsignedAppletActionNo"); + case UNSET: + return Translator.R("APPEXTSECunsetAppletAction"); } throw new RuntimeException("Unknown UnsignedAppletAction"); } public static ExecuteAppletAction fromString(String s) { - if (s.startsWith("A")) { - return ExecuteAppletAction.ALWAYS; - } else if (s.startsWith("N")) { - return ExecuteAppletAction.NEVER; - } else if (s.startsWith("y")) { - return ExecuteAppletAction.YES; - } else if (s.startsWith("s")) { - return ExecuteAppletAction.SANDBOX; - } else if (s.startsWith("n")) { - return ExecuteAppletAction.NO; - } else { - throw new RuntimeException("Unknown ExecuteUnsignedApplet for " + s); + if (s.length() == 0){ + throw new RuntimeException("Undefined zero-length ExecuteAppletAction String representatio"); } + return fromChar(s.charAt(0)); + + } + + public static ExecuteAppletAction fromChar(char s) { + switch (s) { + case 'A': + return ExecuteAppletAction.ALWAYS; + case 'N': + return ExecuteAppletAction.NEVER; + case 'y': + return ExecuteAppletAction.YES; + case 's': + return ExecuteAppletAction.SANDBOX; + case 'n': + return ExecuteAppletAction.NO; + case 'X': + return ExecuteAppletAction.UNSET; + } + throw new RuntimeException("Unknown ExecuteUnsignedApplet for " + s); } @Override diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java --- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java Mon May 05 17:11:45 2014 +0200 +++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java Fri May 09 14:58:37 2014 +0200 @@ -43,7 +43,7 @@ public class UnsignedAppletActionEntry { - private ExecuteAppletAction unsignedAppletAction; + private final AppletSecurityActions unsignedAppletAction; private Date timeStamp; private UrlRegEx documentBase; private UrlRegEx codeBase; @@ -52,7 +52,7 @@ public static UnsignedAppletActionEntry createFromString(String s) { String[] split = s.split("\\s+"); UnsignedAppletActionEntry nw = new UnsignedAppletActionEntry( - ExecuteAppletAction.fromString(split[0]), + AppletSecurityActions.fromString(split[0]), new Date(new Long(split[1])), new UrlRegEx(split[2]), null, @@ -66,7 +66,7 @@ return nw; } - public UnsignedAppletActionEntry(ExecuteAppletAction unsignedAppletAction, Date timeStamp, UrlRegEx documentBase, UrlRegEx codeBase, List archives) { + public UnsignedAppletActionEntry(AppletSecurityActions unsignedAppletAction, Date timeStamp, UrlRegEx documentBase, UrlRegEx codeBase, List archives) { this.unsignedAppletAction = unsignedAppletAction; this.timeStamp = timeStamp; this.documentBase = documentBase; @@ -86,7 +86,7 @@ } private String serializeToReadableAndParseableString() { - return unsignedAppletAction.toChar() + return unsignedAppletAction.toString() + " " + ((timeStamp == null) ? "1" : timeStamp.getTime()) + " " + ((documentBase == null) ? "" : documentBase.getRegEx()) + " " + ((codeBase == null) ? "" : codeBase.getRegEx()) @@ -110,11 +110,20 @@ } public ExecuteAppletAction getUnsignedAppletAction() { + return unsignedAppletAction.getUnsignedAppletAction(); + } + + /** + * should be testing only + * + * @return + */ + public AppletSecurityActions getAppletSecurityActions() { return unsignedAppletAction; } public void setUnsignedAppletAction(ExecuteAppletAction unsignedAppletAction) { - this.unsignedAppletAction = unsignedAppletAction; + this.unsignedAppletAction.setUnsignedAppletAction(unsignedAppletAction); } public UrlRegEx getCodeBase() { diff -r de898c0d6d5f -r a1a59525e85e netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java --- a/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java Mon May 05 17:11:45 2014 +0200 +++ b/netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java Fri May 09 14:58:37 2014 +0200 @@ -148,7 +148,7 @@ } UnsignedAppletActionEntry entry = new UnsignedAppletActionEntry( - behaviour, + AppletSecurityActions.fromAction(behaviour), new Date(), documentbaseRegex, codebaseRegex, diff -r de898c0d6d5f -r a1a59525e85e tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java Fri May 09 14:58:37 2014 +0200 @@ -0,0 +1,147 @@ +/* Copyright (C) 2014 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.appletextendedsecurity; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +public class AppletSecurityActionsTest { + + @Test + public void parseMultipleItemsCorrect() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("ANynsXsnyNA"); + assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(0)); + assertEquals(ExecuteAppletAction.NEVER, a1.getAction(1)); + assertEquals(ExecuteAppletAction.YES, a1.getAction(2)); + assertEquals(ExecuteAppletAction.NO, a1.getAction(3)); + assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(4)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(5)); + assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(6)); + assertEquals(ExecuteAppletAction.NO, a1.getAction(7)); + assertEquals(ExecuteAppletAction.YES, a1.getAction(8)); + assertEquals(ExecuteAppletAction.NEVER, a1.getAction(9)); + assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(10)); + assertEquals(11, a1.getActions().size()); + } + + @Test + public void parseEmpty() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString(""); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(0)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(10)); + assertEquals(0, a1.getActions().size()); + } + + @Test + public void parseOkSetAndGetZero() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString(""); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(0)); + assertEquals(0, a1.getActions().size()); + a1.setAction(0, ExecuteAppletAction.YES); + assertEquals(ExecuteAppletAction.YES, a1.getAction(0)); + assertEquals(1, a1.getActions().size()); + } + + @Test + public void parseOkSetAndGet() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("s"); + assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(0)); + assertEquals(1, a1.getActions().size()); + a1.setAction(0, ExecuteAppletAction.NO); + assertEquals(ExecuteAppletAction.NO, a1.getAction(0)); + assertEquals(1, a1.getActions().size()); + a1.setAction(1, ExecuteAppletAction.YES); + assertEquals(ExecuteAppletAction.NO, a1.getAction(0)); + assertEquals(ExecuteAppletAction.YES, a1.getAction(1)); + assertEquals(2, a1.getActions().size()); + a1.setAction(0, ExecuteAppletAction.NO); + assertEquals(ExecuteAppletAction.NO, a1.getAction(0)); + assertEquals(2, a1.getActions().size()); + a1.setAction(4, ExecuteAppletAction.NEVER); + assertEquals(ExecuteAppletAction.NO, a1.getAction(0)); + assertEquals(ExecuteAppletAction.YES, a1.getAction(1)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(2)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(3)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(3)); + assertEquals(ExecuteAppletAction.NEVER, a1.getAction(4)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(5));//default again + assertEquals(5, a1.getActions().size()); + + } + + @Test(expected = IndexOutOfBoundsException.class) + public void parseNotOkGet() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("ANynsXsnyNA"); + a1.getAction(-1); + } + + @Test(expected = IndexOutOfBoundsException.class) + public void parseNotOkSet() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("ANynsXsnyNA"); + a1.setAction(-1, ExecuteAppletAction.NO); + } + + @Test(expected = RuntimeException.class) + public void parseMultipleItemsToSomeWrong() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("AQA"); + } + + @Test + public void parseMultipleItemsFillMissing() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("AN"); + assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(0)); + assertEquals(ExecuteAppletAction.NEVER, a1.getAction(1)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(2)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(3)); + //note, getters do not increase length + assertEquals(2, a1.getActions().size()); + } + + @Test + public void parseMultipleItemsSpaceEnd() throws Exception { + AppletSecurityActions a1 = AppletSecurityActions.fromString("ANXs AAA"); + assertEquals(ExecuteAppletAction.ALWAYS, a1.getAction(0)); + assertEquals(ExecuteAppletAction.NEVER, a1.getAction(1)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(2)); + assertEquals(ExecuteAppletAction.SANDBOX, a1.getAction(3)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(4)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(5)); + assertEquals(ExecuteAppletAction.UNSET, a1.getAction(10)); + assertEquals(4, a1.getActions().size()); + } + +} diff -r de898c0d6d5f -r a1a59525e85e tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java Mon May 05 17:11:45 2014 +0200 +++ b/tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmationTest.java Fri May 09 14:58:37 2014 +0200 @@ -1,3 +1,40 @@ +/* Copyright (C) 2014 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 jvanek at redhat.com Fri May 9 13:10:41 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 09 May 2014 15:10:41 +0200 Subject: Is australis preventing ITW splashcreen from appear? Message-ID: <536CD3D1.8020000@redhat.com> hi! Even before australis sometimes splashscreen did not appear, and sometimes allow/allow and remember frozen/crashed FF. After update to 29 the percentage of frozen pages grown up, and the splasscreen disappeared completely. Good is, that at least error screen is still visible. Other browsers are still ok. Does this happens to somebody too? J. From aazores at redhat.com Fri May 9 14:24:22 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 10:24:22 -0400 Subject: Is australis preventing ITW splashcreen from appear? In-Reply-To: <536CD3D1.8020000@redhat.com> References: <536CD3D1.8020000@redhat.com> Message-ID: <536CE516.5030607@redhat.com> On 05/09/2014 09:10 AM, Jiri Vanek wrote: > hi! > > Even before australis sometimes splashscreen did not appear, and > sometimes allow/allow and remember frozen/crashed FF. > > After update to 29 the percentage of frozen pages grown up, and the > splasscreen disappeared completely. Good is, that at least error > screen is still visible. > > Other browsers are still ok. > > > Does this happens to somebody too? > > > J. Yes, I'm seeing the same thing. Thanks -- Andrew A From andrew at icedtea.classpath.org Fri May 9 15:38:06 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 09 May 2014 15:38:06 +0000 Subject: /hg/icedtea7: 2 new changesets Message-ID: changeset eb66000601af in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=eb66000601af author: Andrew John Hughes date: Thu May 01 22:57:05 2014 +0100 PR1758: Support PPC64 JIT on ppc64le 2014-05-01 Andrew John Hughes * AUTHORS: Add Tiago. * NEWS: Updated. * acinclude.m4: (IT_SET_ARCH_SETTINGS): Expand ppc64le to its own block to avoid potential future collisions. (IT_ENABLE_ZERO_BUILD): Likewise. 2014-05-01 Tiago Sturmer Daitx * acinclude.m4: (IT_SET_ARCH_SETTINGS): Support ppc64le. (IT_ENABLE_ZERO_BUILD): Likewise and use correct host_cpu value for ppc64. changeset 4f67c07197c3 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=4f67c07197c3 author: Andrew John Hughes date: Fri May 09 16:36:34 2014 +0100 Bump to icedtea-2.6pre04. 2014-05-09 Andrew John Hughes * Makefile.am: (BUILD_VERSION): Bump to b15. (CORBA_CHANGESET): Update to icedtea-2.6pre04 tag. (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. * NEWS: Updated. * configure.ac: Bump to pre03. * hotspot.map: Bump default to icedtea-2.6pre04 tag. * patches/boot/ecj-autoboxing.patch: Regenerated. * patches/boot/ecj-diamond.patch: Regenerated and cases in ScriptManager, JDK13Services and ServiceDelegator added. * patches/boot/ecj-trywithresources.patch: Regenerated. diffstat: AUTHORS | 1 + ChangeLog | 41 + Makefile.am | 26 +- NEWS | 19 + acinclude.m4 | 9 +- configure.ac | 2 +- hotspot.map | 2 +- patches/boot/ecj-autoboxing.patch | 236 +++--- patches/boot/ecj-diamond.patch | 1138 ++++++++++++++++-------------- patches/boot/ecj-trywithresources.patch | 196 ++-- 10 files changed, 897 insertions(+), 773 deletions(-) diffs (truncated from 3990 to 500 lines): diff -r 53f3eede6777 -r 4f67c07197c3 AUTHORS --- a/AUTHORS Thu May 01 20:17:50 2014 +0100 +++ b/AUTHORS Fri May 09 16:36:34 2014 +0100 @@ -8,6 +8,7 @@ Deepak Bhole Tom Callaway Pablo del Campo +Tiago Sturmer Daitx Thomas Fitzsimmons Matthew Flaschen Michael Franz diff -r 53f3eede6777 -r 4f67c07197c3 ChangeLog --- a/ChangeLog Thu May 01 20:17:50 2014 +0100 +++ b/ChangeLog Fri May 09 16:36:34 2014 +0100 @@ -1,3 +1,44 @@ +2014-05-09 Andrew John Hughes + + * Makefile.am: + (BUILD_VERSION): Bump to b15. + (CORBA_CHANGESET): Update to icedtea-2.6pre04 tag. + (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. + * NEWS: Updated. + * configure.ac: Bump to pre03. + * hotspot.map: Bump default to icedtea-2.6pre04 tag. + * patches/boot/ecj-autoboxing.patch: Regenerated. + * patches/boot/ecj-diamond.patch: Regenerated and + cases in ScriptManager, JDK13Services and ServiceDelegator + added. + * patches/boot/ecj-trywithresources.patch: Regenerated. + +2014-05-01 Andrew John Hughes + + * AUTHORS: Add Tiago. + * NEWS: Updated. + * acinclude.m4: + (IT_SET_ARCH_SETTINGS): Expand ppc64le to its + own block to avoid potential future collisions. + (IT_ENABLE_ZERO_BUILD): Likewise. + +2014-05-01 Tiago Sturmer Daitx + + * acinclude.m4: + (IT_SET_ARCH_SETTINGS): Support ppc64le. + (IT_ENABLE_ZERO_BUILD): Likewise and use correct + host_cpu value for ppc64. + 2014-05-01 Andrew John Hughes PR1756: Bootstrap with IcedTea broken diff -r 53f3eede6777 -r 4f67c07197c3 Makefile.am --- a/Makefile.am Thu May 01 20:17:50 2014 +0100 +++ b/Makefile.am Fri May 09 16:36:34 2014 +0100 @@ -1,22 +1,22 @@ # Dependencies JDK_UPDATE_VERSION = 60 -BUILD_VERSION = b13 +BUILD_VERSION = b15 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(BUILD_VERSION) -CORBA_CHANGESET = 35fa09c49527 -JAXP_CHANGESET = 33912ce9492d -JAXWS_CHANGESET = ef698865ff56 -JDK_CHANGESET = 068d2b78bd73 -LANGTOOLS_CHANGESET = 2950924c2b80 -OPENJDK_CHANGESET = edf01342f3cb +CORBA_CHANGESET = d99431d571f8 +JAXP_CHANGESET = c3178eab3782 +JAXWS_CHANGESET = 95bbd42cadc9 +JDK_CHANGESET = b69f22ae0ef3 +LANGTOOLS_CHANGESET = fa084876cf02 +OPENJDK_CHANGESET = 9f06098d4daa -CORBA_SHA256SUM = 2aa4e5c18084eaaacecc3c5e0104286cb15053145b5c71be91f7a2c2e6d2f828 -JAXP_SHA256SUM = 0c93de8873e4609ae0e191541c3e8331addb657a491ed1ba36d9268bb2fe23f2 -JAXWS_SHA256SUM = 28991aa42190e391d45d4c79e8fca955249c3cf4b95a1783b8a36179b998c13a -JDK_SHA256SUM = aeeb18019359df6cd23ef479cfddea2ed9940572c265a65c70d15403cdc78151 -LANGTOOLS_SHA256SUM = 5f0179d4d9f55276ceff7f151d203b96698cde1b250430c4963f2a3a8525fd7e -OPENJDK_SHA256SUM = 5585a7ffce369a3f6dbbcadb86852a5a28ce0b2b0734fd734cedec611156ecc8 +CORBA_SHA256SUM = 0effb80b84fa2b601e3d9dd606d74eb46602d9434598fe251476025403947daf +JAXP_SHA256SUM = c74e2a3f3870669caf3d4cc96dbd66b229537a4a3262a568a8804b77306f64dd +JAXWS_SHA256SUM = 58031cca78172b608a6174ae9ad2e9f8fddd8b212e206185368e7860e067da44 +JDK_SHA256SUM = 2767c7195901c3df16c1558a7a7d9a42ffee57ba579b062aede8c3573b18de1b +LANGTOOLS_SHA256SUM = 8dba11b21e934c59fbe0814e4d1359c1db891484128b3465875a5ba23c350849 +OPENJDK_SHA256SUM = 6eddef0455ed71ec38269e61352f9330dd3de5189617e6f335da84af823fafa4 CACAO_VERSION = e215e36be9fc CACAO_SHA256SUM = 4966514c72ee7ed108b882d9b6e65c3adf8a8f9c2dccb029f971b3c8cb4870ab diff -r 53f3eede6777 -r 4f67c07197c3 NEWS --- a/NEWS Thu May 01 20:17:50 2014 +0100 +++ b/NEWS Fri May 09 16:36:34 2014 +0100 @@ -22,6 +22,7 @@ - S7076487: (sctp) SCTP API classes does not exist in JDK for Mac - S7084032: test/java/net/Inet6Address/B6558853.java fails on Windows XP/2003 if IPv6 - S7122142: (ann) Race condition between isAnnotationPresent and getAnnotations + - S7131153: GetDC called way too many times - causes bad performance. - S7142035: assert in j.l.instrument agents during shutdown when daemon thread is running - S7152892: some jtreg tests fail with permission denied - S7161320: TEST_BUG: java/awt/event/KeyEvent/SwallowKeyEvents/SwallowKeyEvents.java fails (Invalid key code) @@ -29,6 +30,7 @@ - S7176574: sun/security/krb5/auto/TcpTimeout.java failed with solaris-i586 - S7186887: Test T6567415.java can fail on a slow machine - S7187554: JSR 292: JVMTI PopFrame needs to handle appendix arguments + - S7190349: [macosx] Text (Label) is incorrectly drawn with a rotated g2d - S7199674: (props) user.home property does not return an accessible location in sandboxed environment [macosx] - S8002148: [TEST_BUG] The four lines printed are not the bold typeface. - S8003253: TEST_BUG: java/nio/channels/AsynchronousChannelGroup/Unbounded.java hang intermittently [win] @@ -75,8 +77,11 @@ - S8024648: 7141246 & 8016131 break Zero port - S8024675: java/net/NetworkInterface/UniqueMacAddressesTest.java fails on Windows - S8025305: Cleanup CardTableModRefBS usage in G1 + - S8025588: [macosx] Frozen AppKit thread in 7u40 - S8025796: hgforest.sh could trigger unbuffered output from hg without complicated machinations + - S8026705: [TEST_BUG] java/beans/Introspector/TestTypeResolver.java failed - S8027026: Change keytool -genkeypair to use -keyalg RSA + - S8027196: Increment minor version of HSx for 7u55 and initialize the build number - S8027212: java/nio/channels/Selector/SelectAfterRead.java fails intermittently - S8027348: (process) Enhancement of handling async close of ProcessInputStream - S8027359: XML parser returns incorrect parsing results @@ -87,11 +92,16 @@ - S8028623: SA: hash codes in SymbolTable mismatching java_lang_String::hash_code for extended characters. - S8029073: (corba) New connection reclaimed when number of connection is greater than highwatermark - S8029281: Synchronization issues in Logger and LogManager + - S8030655: Regression: 14_01 Security fix 8024306 causes test failures - S8030698: Several GUI labels in jconsole need correction - S8030712: TEST_BUG : java/lang/ProcessBuilder/BasicLauncher.java fails if java output contains VM warning + - S8030813: Signed applet fails to load when CRLs are stored in an LDAP directory - S8030822: (tz) Support tzdata2013i - S8030878: JConsole issues meaningless message if SSL connection fails + - S8031050: (thread) Change Thread initialization so that thread name is set before invoking SecurityManager - S8031061: new hotspot build - hs24.60-b07 + - S8031462: Fonts with morx tables are broken with latest ICU fixes + - S8031477: [macosx] Loading AWT native library fails - S8031572: jarsigner -verify exits with 0 when a jar file is not properly signed - S8031743: C2: loadI2L_immI broken for negative memory values - S8031764: tmtools/jmap/heap_config tests fail on Linux-ia32 because it Cant attach to the core file @@ -114,6 +124,7 @@ - S8033970: new hotspot build - hs24.80-b02 - S8034181: SIGBUS in SctpChannelImpl receive - S8034262: Test java/lang/ProcessBuilder/CloseRace.java fails + - S8034772: JDK-8028795 brought a specification change to 7u55 release and caused JCK7 signature test failure - S8034920: new hotspot build - hs24.80-b03 - S8035283: Second phase of branch shortening doesn't account for loop alignment - S8035435: new hotspot build - hs24.80-b04 @@ -123,15 +134,20 @@ - S8035973: NPE in ForwardBuilder - S8035988: 7u60 l10n resource file translation update 1 - S8036022: D3D: rendering with XOR composite causes InternalError. + - S8036027: Increment hsx 24.51 build to b04 for 7u51-b34 + - S8036147: Increment hsx 24.55 build to b02 for 7u55-b11 - S8036584: Review comments from 8035897 - S8036778: new hotspot build - hs24.80-b05 - S8036786: Update jdk7 testlibrary to match jdk8 + - S8036837: Increment hsx 24.55 build to b03 for 7u55-b12 - S8036863: Update jdk7 testlibrary to match jdk8 in hotspot - S8037012: (tz) Support tzdata2014a - S8037340: Linux semaphores to use CLOCK_REALTIME + - S8037510: CMM Testing: Min/MaxHeapFreeRatio flags should be manageable through the API - S8038481: CMM Testing: Min/MaxHeapFreeRatio flags should be manageable through the API - S8038640: new hotspot build - hs24.80-b06 - S8038785: hot workaround fix for a crash in C2 compiler at Node::rematerialize + - S8039097: Some tests fail with NPE since 7u60 b12 * PPC & AIX port - Fix handling of scalar replaced objects. - New files for template interpreter @@ -162,6 +178,9 @@ - Extend S8041658 to all files in the HotSpot build. - PR1753: Ant does not respect JAVA_HOME/jdk.home setting - PR1756: Bootstrap with IcedTea broken + - PR1758: Support PPC64 JIT on ppc64le + - PR1757: register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 + - Correct placement of S8041658 fix New in release 2.5.0 (2014-XX-XX): diff -r 53f3eede6777 -r 4f67c07197c3 acinclude.m4 --- a/acinclude.m4 Thu May 01 20:17:50 2014 +0100 +++ b/acinclude.m4 Fri May 09 16:36:34 2014 +0100 @@ -54,6 +54,12 @@ JRE_ARCH_DIR=ppc64 ARCHFLAG="-m64" ;; + powerpc64le) + BUILD_ARCH_DIR=ppc64 + INSTALL_ARCH_DIR=ppc64 + JRE_ARCH_DIR=ppc64 + ARCHFLAG="-m64" + ;; sparc) BUILD_ARCH_DIR=sparc INSTALL_ARCH_DIR=sparc @@ -703,7 +709,8 @@ i?86) ;; sparc) ;; x86_64) ;; - ppc64) ;; + powerpc64) ;; + powerpc64le) ;; *) if test "x${ENABLE_CACAO}" != xno || \ test "x${ENABLE_JAMVM}" = xyes; then diff -r 53f3eede6777 -r 4f67c07197c3 configure.ac --- a/configure.ac Thu May 01 20:17:50 2014 +0100 +++ b/configure.ac Fri May 09 16:36:34 2014 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [2.6pre03], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [2.6pre04], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 53f3eede6777 -r 4f67c07197c3 hotspot.map --- a/hotspot.map Thu May 01 20:17:50 2014 +0100 +++ b/hotspot.map Fri May 09 16:36:34 2014 +0100 @@ -1,3 +1,3 @@ # version url changeset sha256sum -default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 4ab69c6e4c85 03dad0749d7d81e3d5f9d76f9f8aa4d412d9d7ae3f6261efaefad0133ccc3428 +default http://icedtea.classpath.org/hg/icedtea7-forest/hotspot 2fd819c8b506 c654bd1163e98da2a6718368a82371f1b220740c4f8b59c150f7c0da4af8842a aarch64 http://hg.openjdk.java.net/aarch64-port/jdk7u/hotspot f50993b6c38d 64c2d0bfa71d6eecf18ab28fd64d5bd79af096f77548d80de7953c306fd9c22c diff -r 53f3eede6777 -r 4f67c07197c3 patches/boot/ecj-autoboxing.patch --- a/patches/boot/ecj-autoboxing.patch Thu May 01 20:17:50 2014 +0100 +++ b/patches/boot/ecj-autoboxing.patch Fri May 09 16:36:34 2014 +0100 @@ -1,6 +1,52 @@ +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2014-05-07 08:51:32.125735531 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2014-05-07 09:00:03.601219315 +0100 +@@ -71,11 +71,11 @@ + case 'I': + return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('I').constructor[0].invokeBasic(type, form, ValueConversions.widenSubword(x)); + case 'J': +- return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('J').constructor[0].invokeBasic(type, form, (long) x); ++ return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('J').constructor[0].invokeBasic(type, form, (Long) x); + case 'F': +- return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('F').constructor[0].invokeBasic(type, form, (float) x); ++ return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('F').constructor[0].invokeBasic(type, form, (Float) x); + case 'D': +- return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('D').constructor[0].invokeBasic(type, form, (double) x); ++ return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('D').constructor[0].invokeBasic(type, form, (Double) x); + default : throw new InternalError("unexpected xtype: " + xtype); + } + } catch (Throwable t) { +@@ -92,9 +92,9 @@ + switch (xtype) { + case 'L': return cloneExtendL(type, form, x); + case 'I': return cloneExtendI(type, form, ValueConversions.widenSubword(x)); +- case 'J': return cloneExtendJ(type, form, (long) x); +- case 'F': return cloneExtendF(type, form, (float) x); +- case 'D': return cloneExtendD(type, form, (double) x); ++ case 'J': return cloneExtendJ(type, form, (Long) x); ++ case 'F': return cloneExtendF(type, form, (Float) x); ++ case 'D': return cloneExtendD(type, form, (Double) x); + } + } catch (Throwable t) { + throw newInternalError(t); +@@ -171,10 +171,10 @@ + throw new InternalError("unexpected type: " + speciesData().types+"."+i); + } + /*non-public*/ final Object argL(int i) throws Throwable { return speciesData().getters[i].invokeBasic(this); } +- /*non-public*/ final int argI(int i) throws Throwable { return (int) speciesData().getters[i].invokeBasic(this); } +- /*non-public*/ final float argF(int i) throws Throwable { return (float) speciesData().getters[i].invokeBasic(this); } +- /*non-public*/ final double argD(int i) throws Throwable { return (double) speciesData().getters[i].invokeBasic(this); } +- /*non-public*/ final long argJ(int i) throws Throwable { return (long) speciesData().getters[i].invokeBasic(this); } ++ /*non-public*/ final int argI(int i) throws Throwable { return (Integer) speciesData().getters[i].invokeBasic(this); } ++ /*non-public*/ final float argF(int i) throws Throwable { return (Float) speciesData().getters[i].invokeBasic(this); } ++ /*non-public*/ final double argD(int i) throws Throwable { return (Double) speciesData().getters[i].invokeBasic(this); } ++ /*non-public*/ final long argJ(int i) throws Throwable { return (Long) speciesData().getters[i].invokeBasic(this); } + + // + // cloning API diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/CallSite.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/CallSite.java ---- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/CallSite.java 2012-11-30 12:17:08.000000000 +0000 -+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/CallSite.java 2012-11-30 15:01:56.540165063 +0000 +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/CallSite.java 2014-05-02 20:39:34.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/CallSite.java 2014-05-07 08:59:22.660620050 +0100 @@ -303,7 +303,7 @@ private static Object maybeReBox(Object x) { @@ -10,9 +56,77 @@ if (xi == (byte) xi) x = xi; // must rebox; see JLS 5.1.7 } +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2014-05-02 20:39:34.000000000 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2014-05-07 08:59:22.664620110 +0100 +@@ -315,11 +315,11 @@ + return; + } + if (con instanceof Integer) { +- emitIconstInsn((int) con); ++ emitIconstInsn((Integer) con); + return; + } + if (con instanceof Long) { +- long x = (long) con; ++ long x = (Long) con; + if (x == (short) x) { + emitIconstInsn((int) x); + mv.visitInsn(Opcodes.I2L); +@@ -327,7 +327,7 @@ + } + } + if (con instanceof Float) { +- float x = (float) con; ++ float x = (Float) con; + if (x == (short) x) { + emitIconstInsn((int) x); + mv.visitInsn(Opcodes.I2F); +@@ -335,7 +335,7 @@ + } + } + if (con instanceof Double) { +- double x = (double) con; ++ double x = (Double) con; + if (x == (short) x) { + emitIconstInsn((int) x); + mv.visitInsn(Opcodes.I2D); +@@ -343,7 +343,7 @@ + } + } + if (con instanceof Boolean) { +- emitIconstInsn((boolean) con ? 1 : 0); ++ emitIconstInsn((Boolean) con ? 1 : 0); + return; + } + // fall through: +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/LambdaForm.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/LambdaForm.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/LambdaForm.java 2014-05-07 08:51:32.125735531 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/LambdaForm.java 2014-05-07 08:59:22.664620110 +0100 +@@ -1444,7 +1444,7 @@ + if (a1 instanceof Integer && a2 instanceof Integer) { + if (sawInt) continue; + sawInt = true; +- if ((int)a1 < (int)a2) continue; // still might be true ++ if (((Integer)a1).intValue() < ((Integer)a2).intValue()) continue; // still might be true + } + return false; + } +diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java +--- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2014-05-07 08:51:32.961747758 +0100 ++++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2014-05-07 08:59:22.664620110 +0100 +@@ -885,7 +885,7 @@ + MH_checkCallerClass = IMPL_LOOKUP + .findStatic(THIS_CLASS, "checkCallerClass", + MethodType.methodType(boolean.class, Class.class, Class.class)); +- assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); ++ assert((Boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); + } catch (Throwable ex) { + throw newInternalError(ex); + } diff -Nru openjdk-boot.orig/jdk/src/share/classes/sun/invoke/util/ValueConversions.java openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java ---- openjdk-boot.orig/jdk/src/share/classes/sun/invoke/util/ValueConversions.java 2012-11-30 14:59:33.053919817 +0000 -+++ openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java 2012-11-30 15:02:05.216300867 +0000 +--- openjdk-boot.orig/jdk/src/share/classes/sun/invoke/util/ValueConversions.java 2014-05-07 08:51:32.133735648 +0100 ++++ openjdk-boot/jdk/src/share/classes/sun/invoke/util/ValueConversions.java 2014-05-07 08:59:22.664620110 +0100 @@ -191,9 +191,9 @@ if (x instanceof Number) { res = (Number) x; @@ -92,117 +206,3 @@ } private static MethodType boxType(Wrapper wrap) { -diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java ---- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2012-11-30 17:27:25.095740183 +0000 -+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/BoundMethodHandle.java 2012-11-30 17:29:35.229853381 +0000 -@@ -71,11 +71,11 @@ - case 'I': - return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('I').constructor[0].invokeBasic(type, form, ValueConversions.widenSubword(x)); - case 'J': -- return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('J').constructor[0].invokeBasic(type, form, (long) x); -+ return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('J').constructor[0].invokeBasic(type, form, (Long) x); - case 'F': -- return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('F').constructor[0].invokeBasic(type, form, (float) x); -+ return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('F').constructor[0].invokeBasic(type, form, (Float) x); - case 'D': -- return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('D').constructor[0].invokeBasic(type, form, (double) x); -+ return (BoundMethodHandle) SpeciesData.EMPTY.extendWithType('D').constructor[0].invokeBasic(type, form, (Double) x); - default : throw new InternalError("unexpected xtype: " + xtype); - } - } catch (Throwable t) { -@@ -92,9 +92,9 @@ - switch (xtype) { - case 'L': return cloneExtendL(type, form, x); - case 'I': return cloneExtendI(type, form, ValueConversions.widenSubword(x)); -- case 'J': return cloneExtendJ(type, form, (long) x); -- case 'F': return cloneExtendF(type, form, (float) x); -- case 'D': return cloneExtendD(type, form, (double) x); -+ case 'J': return cloneExtendJ(type, form, (Long) x); -+ case 'F': return cloneExtendF(type, form, (Float) x); -+ case 'D': return cloneExtendD(type, form, (Double) x); - } - } catch (Throwable t) { - throw newInternalError(t); -@@ -171,10 +171,10 @@ - throw new InternalError("unexpected type: " + speciesData().types+"."+i); - } - public final Object argL(int i) throws Throwable { return speciesData().getters[i].invokeBasic(this); } -- public final int argI(int i) throws Throwable { return (int) speciesData().getters[i].invokeBasic(this); } -- public final float argF(int i) throws Throwable { return (float) speciesData().getters[i].invokeBasic(this); } -- public final double argD(int i) throws Throwable { return (double) speciesData().getters[i].invokeBasic(this); } -- public final long argJ(int i) throws Throwable { return (long) speciesData().getters[i].invokeBasic(this); } -+ public final int argI(int i) throws Throwable { return (Integer) speciesData().getters[i].invokeBasic(this); } -+ public final float argF(int i) throws Throwable { return (Float) speciesData().getters[i].invokeBasic(this); } -+ public final double argD(int i) throws Throwable { return (Double) speciesData().getters[i].invokeBasic(this); } -+ public final long argJ(int i) throws Throwable { return (Long) speciesData().getters[i].invokeBasic(this); } - - // - // cloning API -diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java ---- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2012-11-30 17:25:45.038114739 +0000 -+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java 2012-11-30 17:26:34.766922659 +0000 -@@ -317,11 +317,11 @@ - return; - } - if (con instanceof Integer) { -- emitIconstInsn((int) con); -+ emitIconstInsn((Integer) con); - return; - } - if (con instanceof Long) { -- long x = (long) con; -+ long x = (Long) con; - if (x == (short) x) { - emitIconstInsn((int) x); - mv.visitInsn(Opcodes.I2L); -@@ -329,7 +329,7 @@ - } - } - if (con instanceof Float) { -- float x = (float) con; -+ float x = (Float) con; - if (x == (short) x) { - emitIconstInsn((int) x); - mv.visitInsn(Opcodes.I2F); -@@ -337,7 +337,7 @@ - } - } - if (con instanceof Double) { -- double x = (double) con; -+ double x = (Double) con; - if (x == (short) x) { - emitIconstInsn((int) x); - mv.visitInsn(Opcodes.I2D); -@@ -345,7 +345,7 @@ - } - } - if (con instanceof Boolean) { -- emitIconstInsn((boolean) con ? 1 : 0); -+ emitIconstInsn((Boolean) con ? 1 : 0); - return; - } - // fall through: -diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/LambdaForm.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/LambdaForm.java ---- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/LambdaForm.java 2012-11-30 17:23:21.555782849 +0000 -+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/LambdaForm.java 2012-11-30 17:24:24.244801829 +0000 -@@ -1440,7 +1440,7 @@ - if (a1 instanceof Integer && a2 instanceof Integer) { - if (sawInt) continue; - sawInt = true; -- if ((int)a1 < (int)a2) continue; // still might be true -+ if (((Integer)a1).intValue() < ((Integer)a2).intValue()) continue; // still might be true - } - return false; - } -diff -Nru openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java ---- openjdk-boot.orig/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-11-30 17:22:27.146898269 +0000 -+++ openjdk-boot/jdk/src/share/classes/java/lang/invoke/MethodHandleImpl.java 2012-11-30 17:22:51.067287189 +0000 -@@ -900,7 +900,7 @@ - MH_checkCallerClass = IMPL_LOOKUP - .findStatic(THIS_CLASS, "checkCallerClass", - MethodType.methodType(boolean.class, Class.class, Class.class)); -- assert((boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); -+ assert((Boolean) MH_checkCallerClass.invokeExact(THIS_CLASS, THIS_CLASS)); - } catch (Throwable ex) { - throw newInternalError(ex); - } diff -r 53f3eede6777 -r 4f67c07197c3 patches/boot/ecj-diamond.patch --- a/patches/boot/ecj-diamond.patch Thu May 01 20:17:50 2014 +0100 +++ b/patches/boot/ecj-diamond.patch Fri May 09 16:36:34 2014 +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 2014-04-03 00:38:41.000000000 +0100 -+++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2014-04-03 15:37:39.220196239 +0100 +--- openjdk-boot.orig/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2014-05-02 20:39:22.000000000 +0100 ++++ openjdk-boot/corba/src/share/classes/com/sun/corba/se/impl/encoding/CachedCodeBase.java 2014-05-07 09:16:14.295618203 +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 From bugzilla-daemon at icedtea.classpath.org Fri May 9 15:38:15 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 09 May 2014 15:38:15 +0000 Subject: [Bug 1758] [IcedTea7] Support PPC64 JIT on ppc64le In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1758 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=eb66000601af author: Andrew John Hughes date: Thu May 01 22:57:05 2014 +0100 PR1758: Support PPC64 JIT on ppc64le 2014-05-01 Andrew John Hughes * AUTHORS: Add Tiago. * NEWS: Updated. * acinclude.m4: (IT_SET_ARCH_SETTINGS): Expand ppc64le to its own block to avoid potential future collisions. (IT_ENABLE_ZERO_BUILD): Likewise. 2014-05-01 Tiago Sturmer Daitx * acinclude.m4: (IT_SET_ARCH_SETTINGS): Support ppc64le. (IT_ENABLE_ZERO_BUILD): Likewise and use correct host_cpu value for ppc64. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Fri May 9 15:57:54 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 11:57:54 -0400 Subject: [rfc][icedtea-web] A few new utils unit tests Message-ID: <536CFB02.9060603@redhat.com> Hi, Just adding a couple of unit tests for CacheUtil and FIleUtils. Many of the methods in CacheUtil actually touch the cache, so those were avoided - we have the CacheReproducer test anyway. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: cacheutil-tests.patch Type: text/x-patch Size: 2598 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fileutils-tests.patch Type: text/x-patch Size: 3811 bytes Desc: not available URL: From aazores at redhat.com Fri May 9 16:02:09 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 12:02:09 -0400 Subject: [rfc][icedtea-web] TimedHashMap Message-ID: <536CFC01.2080903@redhat.com> Hi, I've attached some quick tests for TimedHashMap to ensure that the entries actually expire as they are claimed to. Would it be worth expanding on this class to make it actually implement the Map interface, keep its composed Maps private, and refactor it to only be composed of one map rather than two? It's obviously not needed right now, but I can't help but feel that this is a pretty poor implementation of a "HashMap" that it claims to be. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: timedhashmap-1.patch Type: text/x-patch Size: 3485 bytes Desc: not available URL: From gnu.andrew at redhat.com Fri May 9 16:25:34 2014 From: gnu.andrew at redhat.com (Andrew Hughes) Date: Fri, 9 May 2014 12:25:34 -0400 (EDT) Subject: icedtea6 debug build is missing some targets In-Reply-To: <536CBC72.4070207@redhat.com> References: <53676AB9.5000404@redhat.com> <53676D08.2040400@redhat.com> <53679A29.6030208@redhat.com> <1933484879.1617046.1399444584752.JavaMail.zimbra@redhat.com> <536CBC72.4070207@redhat.com> Message-ID: <1927694285.3130710.1399652734050.JavaMail.zimbra@redhat.com> ----- Original Message ----- > On 05/07/2014 08:36 AM, Andrew Hughes wrote: > > > > > > ----- Original Message ----- > >> On 05/05/2014 12:50 PM, Jiri Vanek wrote: > >>> > >>> Ouch. I was launching wrong target! > >>> > >>> icedtea-debug-against-icedtea > >>> is the right one. Sorry for noise. > >> > >> Anyway, there is small bug in stamps/add-nss-debug.stamp: > >> > >> Patch needed to build whole debug stack is attached. > >> > >> Ok to push to icedtea6-head an 1.13? > >> > > > > Ah, copy and paste error :) > > > > Yes, go ahead. > > > Thanx pushed, > http://icedtea.classpath.org/hg/release/icedtea6-1.13/rev/c48649311b8f > http://icedtea.classpath.org/hg/icedtea6/rev/29d6e0e0c2d2 > > > Well I was quite surprised seeing this duplicated code, just with different > path.But I assume there > is no simple codeclean:( > > J. > The debug and boot variants are the same as the main ones, except the different directory names. So I imagine the ecj one was copied over, but that line got missed in fixing the directory path. -- 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 omajid at redhat.com Fri May 9 16:38:19 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 12:38:19 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <536CFC01.2080903@redhat.com> References: <536CFC01.2080903@redhat.com> Message-ID: <20140509163819.GD3326@redhat.com> * Andrew Azores [2014-05-09 12:04]: > Hi, > > I've attached some quick tests for TimedHashMap to ensure that the entries > actually expire as they are claimed to. Looks good to me. Maybe you can make the test a little faster by making the timeout 0 instead of 0.25 seconds. > Would it be worth expanding on this class to make it actually implement the > Map interface, keep its composed Maps private, and refactor it to only be > composed of one map rather than two? It's obviously not needed right now, > but I can't help but feel that this is a pretty poor implementation of a > "HashMap" that it claims to be. Depending on what it's used for, maybe a name change to clarify that this is a timed cache (with O(1) lookup but not a HashTable and not a HashMap) might be easier. But if you want to fix it to be a proper Map implementation, I dont have any real concerns. Just be prepared that things might break if more default methods are added to Map in Java 9. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Fri May 9 17:31:23 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 13:31:23 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <536A5919.4040502@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <536A5919.4040502@redhat.com> Message-ID: <20140509173123.GE3326@redhat.com> * Andrew Azores [2014-05-07 12:02]: > >ugh... I would like to stop this being pushed until the unitttest for > >*original* behavior are done. And then they are adapted to new "behavior". > >This part of itw is lacking the tests, so here is actually no trace if > >behvaiour was preserved. > > > >Otherwise the patch is ok. > > Alright. I've attached tests for Resource#status and for > ResourceTracker.selectByFlag in their current state. They can be fairly > easily reworked for the EnumSet patch once you verify that the tests are > sufficiently guarding against behaviour changes (or find that they aren't > and I fix it so they are!). These new tests should apply to HEAD and all > pass currently. Looks okay to me. Some of utility functions in the test class are unused. I assume that's intentional; please remove them if it's a mistake. > +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java > @@ -0,0 +1,155 @@ > + private static final Version VERSION1 = new Version("1.0"); This is used in one one method, and the actual version is insignificant. Maybe call it SOME_VERSION or A_VERSION and move it to the method itself? > + @Test > + public void testNewResourceIsUninitialized() throws Exception { > + Resource res = getDummyResource("NewResource"); > + assertTrue("Resource should not have had any status flags set", hasFlag(res, UNINITIALIZED)); This test reads a little funny. Normally names like 'dummy' (and 'stub', 'fake', 'temp') are for an object which is mostly incidental to the test. So a function named `getDummyResource` that returns the very thing this test is looking at seems a little odd. Maybe call it `createResource` or something? > + private static Resource getDummyResource(String testName) throws MalformedURLException { > + URL dummyUrl = new URL("http://example.com/applet" + testName + ".jar"); > + return Resource.getResource(dummyUrl, VERSION1, UpdatePolicy.ALWAYS); This doesn't create a global, right? Calling this method with the same argument multiple times returns new objects, right? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Fri May 9 17:55:37 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 13:55:37 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <20140509173123.GE3326@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <536A5919.4040502@redhat.com> <20140509173123.GE3326@redhat.com> Message-ID: <536D1699.3010501@redhat.com> On 05/09/2014 01:31 PM, Omair Majid wrote: > * Andrew Azores [2014-05-07 12:02]: >>> ugh... I would like to stop this being pushed until the unitttest for >>> *original* behavior are done. And then they are adapted to new "behavior". >>> This part of itw is lacking the tests, so here is actually no trace if >>> behvaiour was preserved. >>> >>> Otherwise the patch is ok. >> Alright. I've attached tests for Resource#status and for >> ResourceTracker.selectByFlag in their current state. They can be fairly >> easily reworked for the EnumSet patch once you verify that the tests are >> sufficiently guarding against behaviour changes (or find that they aren't >> and I fix it so they are!). These new tests should apply to HEAD and all >> pass currently. > Looks okay to me. Some of utility functions in the test class are > unused. I assume that's intentional; please remove them if it's a > mistake. Oops, yes a mistake. They were used previously but I forgot to remove them after they weren't needed anymore. > >> +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java >> @@ -0,0 +1,155 @@ >> + private static final Version VERSION1 = new Version("1.0"); > This is used in one one method, and the actual version is insignificant. > Maybe call it SOME_VERSION or A_VERSION and move it to the method > itself? Sure. > >> + @Test >> + public void testNewResourceIsUninitialized() throws Exception { >> + Resource res = getDummyResource("NewResource"); >> + assertTrue("Resource should not have had any status flags set", hasFlag(res, UNINITIALIZED)); > This test reads a little funny. Normally names like 'dummy' (and 'stub', > 'fake', 'temp') are for an object which is mostly incidental to the > test. So a function named `getDummyResource` that returns the very thing > this test is looking at seems a little odd. Maybe call it > `createResource` or something? True enough. The tests that have been written are all targeting the status field of the resource in particular and so the resource itself is "mostly incidental", but I guess when the test class is called ResourceTest... > >> + private static Resource getDummyResource(String testName) throws MalformedURLException { >> + URL dummyUrl = new URL("http://example.com/applet" + testName + ".jar"); >> + return Resource.getResource(dummyUrl, VERSION1, UpdatePolicy.ALWAYS); > This doesn't create a global, right? Calling this method with the same > argument multiple times returns new objects, right? > > Thanks, > Omair > Unfortunately... no :( the Resource constructor is private and the Resource class keeps a static list of resources, so getResource() returns an existing matching resource if it can. This is actually based only on the resource location, hence why each test is requesting a resource with a different location. It seems to me like this behaviour should probably be in the ResourceTracker rather than Resource itself, but it is what it is. Maybe that part can also be revisited later. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: resource-enumset-tests-2.patch Type: text/x-patch Size: 10036 bytes Desc: not available URL: From aazores at redhat.com Fri May 9 18:15:01 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 14:15:01 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <20140509163819.GD3326@redhat.com> References: <536CFC01.2080903@redhat.com> <20140509163819.GD3326@redhat.com> Message-ID: <536D1B25.1060901@redhat.com> On 05/09/2014 12:38 PM, Omair Majid wrote: > * Andrew Azores [2014-05-09 12:04]: >> Hi, >> >> I've attached some quick tests for TimedHashMap to ensure that the entries >> actually expire as they are claimed to. > Looks good to me. Maybe you can make the test a little faster by making > the timeout 0 instead of 0.25 seconds. Sure, that works too. > >> Would it be worth expanding on this class to make it actually implement the >> Map interface, keep its composed Maps private, and refactor it to only be >> composed of one map rather than two? It's obviously not needed right now, >> but I can't help but feel that this is a pretty poor implementation of a >> "HashMap" that it claims to be. > Depending on what it's used for, maybe a name change to clarify that > this is a timed cache (with O(1) lookup but not a HashTable and not a > HashMap) might be easier. > > But if you want to fix it to be a proper Map implementation, I dont have > any real concerns. Just be prepared that things might break if more > default methods are added to Map in Java 9. > > Thanks, > Omair > I think I actually would like to fix it, it seems like a nice little amusement. Maybe more uses will be found for it some time too. Thanks, -- Andrew A From aazores at icedtea.classpath.org Fri May 9 18:21:50 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Fri, 09 May 2014 18:21:50 +0000 Subject: /hg/icedtea-web: New tests for TimedHashMap Message-ID: changeset 6b3a610aff7d in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=6b3a610aff7d author: Andrew Azores date: Fri May 09 14:20:45 2014 -0400 New tests for TimedHashMap * netx/net/sourceforge/jnlp/util/TimedHashMap.java: (setExpiry) new method * tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java: new test class for TimedHashMap diffstat: ChangeLog | 8 +- netx/net/sourceforge/jnlp/util/TimedHashMap.java | 4 + tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java | 70 ++++++++++ 3 files changed, 81 insertions(+), 1 deletions(-) diffs (110 lines): diff -r a1a59525e85e -r 6b3a610aff7d ChangeLog --- a/ChangeLog Fri May 09 14:58:37 2014 +0200 +++ b/ChangeLog Fri May 09 14:20:45 2014 -0400 @@ -1,3 +1,10 @@ +2014-05-09 Andrew Azores + + * netx/net/sourceforge/jnlp/util/TimedHashMap.java: (setExpiry) new + method + * tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java: new + test class for TimedHashMap + 2014-05-09 Jiri Vanek Internal implementation of ExecuteAppletAction now support multiple items @@ -21,7 +28,6 @@ * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java: Test adapted to new features, and to preserving old behavior. - 2014-05-05 Jiri Vanek Links in AppTrustWarningPanel are now clickable. diff -r a1a59525e85e -r 6b3a610aff7d netx/net/sourceforge/jnlp/util/TimedHashMap.java --- a/netx/net/sourceforge/jnlp/util/TimedHashMap.java Fri May 09 14:58:37 2014 +0200 +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java Fri May 09 14:20:45 2014 -0400 @@ -56,6 +56,10 @@ HashMap timeStamps = new HashMap(); Long expiry = 10000000000L; + public void setExpiry(long expiry) { + this.expiry = expiry; + } + /** * Store the item in the map and associate a timestamp with it * diff -r a1a59525e85e -r 6b3a610aff7d tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java Fri May 09 14:20:45 2014 -0400 @@ -0,0 +1,70 @@ +/* + Copyright (C) 2014 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; 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 net.sourceforge.jnlp.util; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class TimedHashMapTest { + + @Test + public void testPutAndGet() { + final TimedHashMap map = new TimedHashMap<>(); + final Object o1 = new Object(), o2 = new Object(), o3 = new Object(), o4 = new Object(); + map.put(o1, o2); + map.put(o2, o4); + map.put(o3, o4); + assertEquals(o2, map.get(o1)); + assertEquals(o4, map.get(o2)); + assertEquals(o4, map.get(o3)); + map.put(o1, o3); + assertEquals(o3, map.get(o1)); + } + + @Test + public void testEntryExpiry() throws Exception { + final TimedHashMap map = new TimedHashMap<>(); + final Object o1 = new Object(), o2 = new Object(); + map.setExpiry(0l); // immediate expiry + map.put(o1, o2); + Thread.sleep(5); // so we don't manage to put and get in the same nanosecond + assertNull(map.get(o1)); + } + +} From bugzilla-daemon at icedtea.classpath.org Fri May 9 19:29:42 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 09 May 2014 19:29:42 +0000 Subject: [Bug 1762] New: [IcedTea7] Undefined references when building with NSS 3.16.1 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1762 Bug ID: 1762 Summary: [IcedTea7] Undefined references when building with NSS 3.16.1 Product: IcedTea Version: 7-hg Hardware: all OS: All Status: NEW Severity: normal Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org DEBUG util.py:282: Rebuilding /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/lib/amd64/libsunec.so because of /buil\ ddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/tmp/sun/sun.security.ec/obj64/.files_compiled mapfile-vers DEBUG util.py:282: /usr/bin/g++ -O2 -fPIC -DCC_NOEX -W -Wall -Wno-unused -Wno-parentheses -fno-omit-frame-pointer -D_LITTLE_\ ENDIAN -g -DNDEBUG -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.7.0_60"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -\ D_LP64=1 -DUSE_PTHREADS -I. -I/builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/tmp/sun/sun.security.ec/CClassHeaders -\ I../../../../src/solaris/javavm/export -I../../../../src/share/javavm/export -I/usr/include/nss3 -I/usr/include/nspr4 -lfreebl\ -DSYSTEM_NSS -DNSS_ENABLE_ECC -I../../../../src/share/native/common -I../../../../src/solaris/native/common -I../../../../src/\ share/native/sun/security/ec -I../../../../src/solaris/native/sun/security/ec -Xlinker -O1 -Xlinker -version-script=mapfile-v\ ers -Wl,--hash-style=both -Xlinker -z -Xlinker defs -L/builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/lib/amd64 -Wl,\ -soname=libsunec.so -shared -o /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/lib/amd64/libsunec.so /builddir/b\ uild/BUILD/icedtea-2.6pre04/openjdk.build-boot/tmp/sun/sun.security.ec/obj64/ECC_JNI.o -lstdc++ -lfreebl3 -lnssdbm3 -lsoftokn3 \ -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lc DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/tmp/sun/sun.security.ec/obj64/ECC_JNI.o: In funct\ ion `FreeECParams': DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/s\ un/security/ec/ECC_JNI.cpp:55: undefined reference to `SECITEM_FreeItem' DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/s\ un/security/ec/ECC_JNI.cpp:56: undefined reference to `SECITEM_FreeItem' DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/s\ un/security/ec/ECC_JNI.cpp:57: undefined reference to `SECITEM_FreeItem' DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/s\ un/security/ec/ECC_JNI.cpp:58: undefined reference to `SECITEM_FreeItem' DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/s\ un/security/ec/ECC_JNI.cpp:59: undefined reference to `SECITEM_FreeItem' DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/tmp/sun/sun.security.ec/obj64/ECC_JNI.o:/builddir\ /build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/sun/security/ec/ECC_JNI.cpp:60\ : more undefined references to `SECITEM_FreeItem' follow DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/tmp/sun/sun.security.ec/obj64/ECC_JNI.o: In funct\ ion `Java_sun_security_ec_ECKeyPairGenerator_generateECKeyPair': DEBUG util.py:282: /builddir/build/BUILD/icedtea-2.6pre04/openjdk-boot/jdk/make/sun/security/ec/../../../../src/share/native/s\ un/security/ec/ECC_JNI.cpp:90: undefined reference to `EC_DecodeParams' -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 9 19:30:12 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 09 May 2014 19:30:12 +0000 Subject: [Bug 1762] [IcedTea7] Undefined references when building with NSS 3.16.1 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1762 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1284 Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 9 19:30:12 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 09 May 2014 19:30:12 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1762 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From omajid at redhat.com Fri May 9 19:34:25 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 15:34:25 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <536D1B25.1060901@redhat.com> References: <536CFC01.2080903@redhat.com> <20140509163819.GD3326@redhat.com> <536D1B25.1060901@redhat.com> Message-ID: <20140509193425.GF3326@redhat.com> * Andrew Azores [2014-05-09 14:15]: > I think I actually would like to fix it, it seems like a nice little > amusement. Maybe more uses will be found for it some time too. Well, I don't see any reason to not do this. So go ahead. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Fri May 9 19:39:25 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 15:39:25 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <536D1699.3010501@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <536A5919.4040502@redhat.com> <20140509173123.GE3326@redhat.com> <536D1699.3010501@redhat.com> Message-ID: <20140509193925.GG3326@redhat.com> Hi, * Andrew Azores [2014-05-09 13:55]: > Unfortunately... no :( the Resource constructor is private and the Resource > class keeps a static list of resources, so getResource() returns an existing > matching resource if it can. This is actually based only on the resource > location, hence why each test is requesting a resource with a different > location. It seems to me like this behaviour should probably be in the > ResourceTracker rather than Resource itself, but it is what it is. Maybe > that part can also be revisited later. Yeah, this is okay for now. Please go ahead and push. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Fri May 9 20:16:12 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 16:16:12 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <20140509193425.GF3326@redhat.com> References: <536CFC01.2080903@redhat.com> <20140509163819.GD3326@redhat.com> <536D1B25.1060901@redhat.com> <20140509193425.GF3326@redhat.com> Message-ID: <536D378C.7090207@redhat.com> On 05/09/2014 03:34 PM, Omair Majid wrote: > * Andrew Azores [2014-05-09 14:15]: >> I think I actually would like to fix it, it seems like a nice little >> amusement. Maybe more uses will be found for it some time too. > Well, I don't see any reason to not do this. So go ahead. > > Cheers, > Omair > Attached patch completes the Map implementation and includes tests. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: timedhashmap-map-impl.patch Type: text/x-patch Size: 13048 bytes Desc: not available URL: From aazores at icedtea.classpath.org Fri May 9 20:19:52 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Fri, 09 May 2014 20:19:52 +0000 Subject: /hg/icedtea-web: New tests for Resource and ResourceTracker Message-ID: changeset 84fb0215c0bc in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=84fb0215c0bc author: Andrew Azores date: Fri May 09 16:19:42 2014 -0400 New tests for Resource and ResourceTracker * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (selectByFlag) made package-private * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: (testSelectByFlag) new test method * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: new test class diffstat: ChangeLog | 9 + netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 2 +- tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java | 141 ++++++++++ tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java | 26 + 4 files changed, 177 insertions(+), 1 deletions(-) diffs (217 lines): diff -r 6b3a610aff7d -r 84fb0215c0bc ChangeLog --- a/ChangeLog Fri May 09 14:20:45 2014 -0400 +++ b/ChangeLog Fri May 09 16:19:42 2014 -0400 @@ -1,3 +1,12 @@ +2014-05-09 Andrew Azores + + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (selectByFlag) + made package-private + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: + (testSelectByFlag) new test method + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: new test + class + 2014-05-09 Andrew Azores * netx/net/sourceforge/jnlp/util/TimedHashMap.java: (setExpiry) new diff -r 6b3a610aff7d -r 84fb0215c0bc netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 09 14:20:45 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 09 16:19:42 2014 -0400 @@ -1095,7 +1095,7 @@ * source list. *

*/ - private static Resource selectByFlag(List source, int flag, + static Resource selectByFlag(List source, int flag, int notflag) { Resource result = null; int score = Integer.MAX_VALUE; diff -r 6b3a610aff7d -r 84fb0215c0bc tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java Fri May 09 16:19:42 2014 -0400 @@ -0,0 +1,141 @@ +/* ResourceTest.java + Copyright (C) 2014 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.cache; + +import java.util.Arrays; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Collection; +import net.sourceforge.jnlp.Version; + +import org.junit.AfterClass; +import org.junit.Test; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; + +public class ResourceTest { + + private static final int UNINITIALIZED = Resource.UNINITIALIZED; + private static final int CONNECT = Resource.CONNECT; + private static final int CONNECTING = Resource.CONNECTING; + private static final int CONNECTED = Resource.CONNECTED; + private static final int DOWNLOAD = Resource.DOWNLOAD; + private static final int DOWNLOADING = Resource.DOWNLOADING; + private static final int DOWNLOADED = Resource.DOWNLOADED; + private static final int ERROR = Resource.ERROR; + private static final int STARTED = Resource.STARTED; + + @Test + public void testNewResourceIsUninitialized() throws Exception { + Resource res = createResource("NewResource"); + assertTrue("Resource should not have had any status flags set", hasFlag(res, UNINITIALIZED)); + } + + @Test + public void testSetFlag() throws Exception { + Resource res = createResource("SetFlag"); + setStatus(res, Arrays.asList(Integer.valueOf(CONNECT))); + assertFalse("Resource should have been initialized", hasFlag(res, UNINITIALIZED)); + assertTrue("Resource should have had CONNECT set", hasFlag(res, CONNECT)); + assertTrue("Resource should have only had CONNECT set", hasOnly(res, Arrays.asList(Integer.valueOf(CONNECT)))); + } + + @Test + public void testSetMultipleFlags() throws Exception { + Resource res = createResource("SetFlags"); + setStatus(res, Arrays.asList(Integer.valueOf(CONNECT), Integer.valueOf(DOWNLOAD))); + assertFalse("Resource should have been initialized", hasFlag(res, UNINITIALIZED)); + assertTrue("Resource should have had CONNECT set", hasFlag(res, CONNECT)); + assertTrue("Resource should have had DOWNLOAD set", hasFlag(res, DOWNLOAD)); + assertTrue("Resource should have only had CONNECT and DOWNLOAD set", hasOnly(res, Arrays.asList(Integer.valueOf(CONNECT), Integer.valueOf(DOWNLOAD)))); + } + + @Test + public void testChangeStatus() throws Exception { + Resource res = createResource("ChangeStatus"); + setStatus(res, Arrays.asList(Integer.valueOf(CONNECT))); + assertTrue("Resource should have had CONNECT set", hasFlag(res, CONNECT)); + assertTrue("Resource should have only had CONNECT set", hasOnly(res, Arrays.asList(Integer.valueOf(CONNECT)))); + + Collection downloadFlags = Arrays.asList(DOWNLOAD, DOWNLOADING, DOWNLOADED); + Collection connectFlags = Arrays.asList(CONNECT, CONNECTING, CONNECTED); + changeStatus(res, connectFlags, downloadFlags); + + assertTrue("Resource should have had DOWNLOAD set", hasFlag(res, DOWNLOAD)); + assertTrue("Resource should have had DOWNLOADING set", hasFlag(res, DOWNLOADING)); + assertTrue("Resource should have had DOWNLOADED set", hasFlag(res, DOWNLOADED)); + assertTrue("Resource should have only had DOWNLOAD{,ING,ED} flags set", hasOnly(res, downloadFlags)); + assertFalse("Resource should not have had CONNECT set", hasFlag(res, CONNECT)); + } + + private static Resource createResource(String testName) throws MalformedURLException { + URL dummyUrl = new URL("http://example.com/applet" + testName + ".jar"); + return Resource.getResource(dummyUrl, new Version("1.0"), UpdatePolicy.ALWAYS); + } + + private static void setStatus(Resource resource, Collection flags) { + for (Integer flag : flags) { + resource.status = resource.status | flag; + } + } + + private static void changeStatus(Resource resource, Collection clear, Collection add) { + int setMask = 0, unsetMask = 0; + for (Integer setFlag : add) { + setMask = setMask | setFlag; + } + for (Integer unsetFlag : clear) { + unsetMask = unsetMask | unsetFlag; + } + resource.changeStatus(unsetMask, setMask); + } + + private static boolean hasOnly(Resource resource, Collection flags) { + int mask = 0; + for (Integer flag : flags) { + mask = mask | flag; + } + return (resource.status ^ mask) == 0; + } + + private static boolean hasFlag(Resource resource, int flag) { + return resource.isSet(flag); + } + +} diff -r 6b3a610aff7d -r 84fb0215c0bc tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Fri May 09 14:20:45 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Fri May 09 16:19:42 2014 -0400 @@ -45,7 +45,9 @@ import java.net.MalformedURLException; import java.net.URISyntaxException; import java.net.URL; +import java.util.Arrays; import java.util.HashMap; +import java.util.List; import net.sourceforge.jnlp.ServerAccess; import net.sourceforge.jnlp.ServerLauncher; import net.sourceforge.jnlp.Version; @@ -67,6 +69,30 @@ private static final String nameStub2 = "test-file"; @Test + public void testSelectByFlag() throws Exception { + Resource connectedResource = Resource.getResource(new URL("http://example.com/connected.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); + connectedResource.status = Resource.CONNECTED | Resource.DOWNLOADING; + Resource erroredResource = Resource.getResource(new URL("http://example.com/errored.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); + erroredResource.status = Resource.ERROR | Resource.CONNECT; + Resource downloadingResource = Resource.getResource(new URL("http://example.com/downloading.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); + downloadingResource.status = Resource.DOWNLOADING; + Resource uninitializedResource = Resource.getResource(new URL("http://example.com/uninitialized.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); + List source = Arrays.asList(connectedResource, erroredResource, downloadingResource, uninitializedResource); + + Resource result1 = ResourceTracker.selectByFlag(source, Resource.CONNECT | Resource.CONNECTING | Resource.CONNECTED, Resource.ERROR); + Resource result2 = ResourceTracker.selectByFlag(source, Resource.DOWNLOADING, Resource.CONNECTED); + Resource result3 = ResourceTracker.selectByFlag(source, Resource.DOWNLOADED, Resource.UNINITIALIZED); + Resource result4 = ResourceTracker.selectByFlag(source, Resource.UNINITIALIZED, Integer.MAX_VALUE); + Resource result5 = ResourceTracker.selectByFlag(source, Resource.CONNECT | Resource.CONNECTING | Resource.CONNECTED, Resource.DOWNLOADING); + + Assert.assertEquals(connectedResource, result1); + Assert.assertEquals(downloadingResource, result2); + Assert.assertNull("Result 3 should have been null", result3); + Assert.assertEquals(uninitializedResource, result4); + Assert.assertEquals(erroredResource, result5); + } + + @Test public void testNormalizeUrl() throws Exception { URL[] u = getUrls(); From omajid at redhat.com Fri May 9 20:52:12 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 16:52:12 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <536D378C.7090207@redhat.com> References: <536CFC01.2080903@redhat.com> <20140509163819.GD3326@redhat.com> <536D1B25.1060901@redhat.com> <20140509193425.GF3326@redhat.com> <536D378C.7090207@redhat.com> Message-ID: <20140509205212.GK3326@redhat.com> * Andrew Azores [2014-05-09 16:16]: > +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java > +public class TimedHashMap implements Map { > > + private class TimedEntry { Can you make this class static? Otherwise, every instance of this class will hold a reference to the parent TimedHashMap instance. > + private static final long DEFAULT_TIMEOUT = 10000000000L; // 10 seconds A slightly easier-to-read version of this is to use the TimeUnit class: private static final long DEFAULT_TIMEOUT_NANOS = TimeUnit.SECONDS.toNanos(10); > + public TimedHashMap(final long timeout) { > + public void setTimeout(final long timeout) { Please make a note of the unit (either in javadocs or in the parameter name). Really nice would be using two separate parameters: value (long) and unit (TimeUnit). > + if ((entry.value == null && value == null) || entry.value.equals(value)) { Objects.equals(entry.value, value) does this check in a smaller amount of code. > + public V remove(final Object key) { > + return actualMap.remove(key).value; Does this throw a NullPointerException if the map is empty or the map does not contain the key/value? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Fri May 9 21:14:12 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 09 May 2014 17:14:12 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <20140509205212.GK3326@redhat.com> References: <536CFC01.2080903@redhat.com> <20140509163819.GD3326@redhat.com> <536D1B25.1060901@redhat.com> <20140509193425.GF3326@redhat.com> <536D378C.7090207@redhat.com> <20140509205212.GK3326@redhat.com> Message-ID: <536D4524.4080704@redhat.com> Thanks for the quick review and nice catches! On 05/09/2014 04:52 PM, Omair Majid wrote: > * Andrew Azores [2014-05-09 16:16]: >> +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java >> +public class TimedHashMap implements Map { >> >> + private class TimedEntry { > Can you make this class static? Otherwise, every instance of this class > will hold a reference to the parent TimedHashMap instance. Good catch, don't know why I missed that. > >> + private static final long DEFAULT_TIMEOUT = 10000000000L; // 10 seconds > A slightly easier-to-read version of this is to use the TimeUnit class: > > private static final long DEFAULT_TIMEOUT_NANOS = TimeUnit.SECONDS.toNanos(10); I've never heard of this before and I love it. Much better, thanks! > >> + public TimedHashMap(final long timeout) { >> + public void setTimeout(final long timeout) { > Please make a note of the unit (either in javadocs or in the parameter > name). Really nice would be using two separate parameters: value (long) and unit > (TimeUnit). > >> + if ((entry.value == null && value == null) || entry.value.equals(value)) { > Objects.equals(entry.value, value) does this check in a smaller amount > of code. I've even used this before, but forgot about it. Nice! > >> + public V remove(final Object key) { >> + return actualMap.remove(key).value; > Does this throw a NullPointerException if the map is empty or the map > does not contain the key/value? > > Thanks, > Omair > Fixed too. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: timedhashmap-map-impl-2.patch Type: text/x-patch Size: 13803 bytes Desc: not available URL: From omajid at redhat.com Fri May 9 21:25:08 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 17:25:08 -0400 Subject: [rfc][icedtea-web] TimedHashMap In-Reply-To: <536D4524.4080704@redhat.com> References: <536CFC01.2080903@redhat.com> <20140509163819.GD3326@redhat.com> <536D1B25.1060901@redhat.com> <20140509193425.GF3326@redhat.com> <536D378C.7090207@redhat.com> <20140509205212.GK3326@redhat.com> <536D4524.4080704@redhat.com> Message-ID: <20140509212508.GN3326@redhat.com> * Andrew Azores [2014-05-09 17:14]: > Thanks for the quick review and nice catches! No problem. > Fixed too. Patch looks good to me. Cheers, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at icedtea.classpath.org Fri May 9 21:31:07 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Fri, 09 May 2014 21:31:07 +0000 Subject: /hg/icedtea-web: TimedHashMap implements Map, new tests Message-ID: changeset 69dd2eb02dbf in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=69dd2eb02dbf author: Andrew Azores date: Fri May 09 17:30:54 2014 -0400 TimedHashMap implements Map, new tests * netx/net/sourceforge/jnlp/util/TimedHashMap.java: implements Map interface, added all missing methods. (timeStamps) removed, refactored to only be composed of one backing map rather than two. * tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java: new test methods added diffstat: ChangeLog | 8 + netx/net/sourceforge/jnlp/util/TimedHashMap.java | 167 ++++++++- tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java | 176 ++++++++- 3 files changed, 311 insertions(+), 40 deletions(-) diffs (427 lines): diff -r 84fb0215c0bc -r 69dd2eb02dbf ChangeLog --- a/ChangeLog Fri May 09 16:19:42 2014 -0400 +++ b/ChangeLog Fri May 09 17:30:54 2014 -0400 @@ -1,3 +1,11 @@ +2014-05-09 Andrew Azores + + * netx/net/sourceforge/jnlp/util/TimedHashMap.java: implements Map + interface, added all missing methods. (timeStamps) removed, refactored to + only be composed of one backing map rather than two. + * tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java: new + test methods added + 2014-05-09 Andrew Azores * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (selectByFlag) diff -r 84fb0215c0bc -r 69dd2eb02dbf netx/net/sourceforge/jnlp/util/TimedHashMap.java --- a/netx/net/sourceforge/jnlp/util/TimedHashMap.java Fri May 09 16:19:42 2014 -0400 +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java Fri May 09 17:30:54 2014 -0400 @@ -37,38 +37,90 @@ package net.sourceforge.jnlp.util; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import static java.util.Objects.requireNonNull; import net.sourceforge.jnlp.util.logging.OutputController; -import java.util.HashMap; - -import net.sourceforge.jnlp.runtime.JNLPRuntime; /** * Simple utility class that extends HashMap by adding an expiry to the entries. * - * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds + * This map stores entries, and returns them only if the entries were last accessed within a specified timeout period. + * Otherwise, null is returned. + * + * This map does not allow null keys but does allow null values. * * @param K The key type * @param V The Object type */ -public class TimedHashMap { +public class TimedHashMap implements Map { - HashMap actualMap = new HashMap(); - HashMap timeStamps = new HashMap(); - Long expiry = 10000000000L; + private static class TimedEntry { + private final T value; + private long timestamp; - public void setExpiry(long expiry) { - this.expiry = expiry; + public TimedEntry(final T value) { + this.value = value; + updateTimestamp(); + } + + public void updateTimestamp() { + timestamp = System.nanoTime(); + } + } + + private static final long DEFAULT_TIMEOUT = TimeUnit.SECONDS.toNanos(10); + + private final HashMap> actualMap = new HashMap<>(); + private long timeout = DEFAULT_TIMEOUT; + + public TimedHashMap() { + this(DEFAULT_TIMEOUT, TimeUnit.NANOSECONDS); } /** - * Store the item in the map and associate a timestamp with it + * Create a new map with a non-default entry timeout period + * @param unit the units of the timeout + * @param timeout the length of the timeout + */ + public TimedHashMap(final long timeout, final TimeUnit unit) { + setTimeout(timeout, unit); + } + + /** + * Specify how long (in nanoseconds) entries are valid for + * @param unit the units of the timeout + * @param timeout the length of the timeout + */ + public void setTimeout(final long timeout, final TimeUnit unit) { + this.timeout = unit.toNanos(timeout); + } + + /** + * Store the item in the map and associate a timestamp with it. null is not accepted as a key. * * @param key The key * @param value The value to store */ - public V put(K key, V value) { - timeStamps.put(key, System.nanoTime()); - return actualMap.put(key, value); + @Override + public V put(final K key, final V value) { + requireNonNull(key); + final TimedEntry oldEntry = actualMap.get(key); + final V oldValue; + if (oldEntry != null) { + oldValue = oldEntry.value; + } else { + oldValue = null; + } + actualMap.put(key, new TimedEntry<>(value)); + return oldValue; } /** @@ -79,23 +131,94 @@ * * @param key The key */ - public V get(K key) { - Long now = System.nanoTime(); + @Override + public V get(final Object key) { + final long now = System.nanoTime(); if (actualMap.containsKey(key)) { - Long age = now - timeStamps.get(key); + final TimedEntry timedEntry = actualMap.get(key); + final long age = now - timedEntry.timestamp; // Item exists. If it has not expired, renew its access time and return it - if (age <= expiry) { - OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Returning proxy " + actualMap.get(key) + " from cache for " + key); - timeStamps.put(key, System.nanoTime()); - return actualMap.get(key); + if (age <= timeout) { + OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Returning entry " + actualMap.get(key) + " from cache for " + key); + timedEntry.updateTimestamp(); + return timedEntry.value; } else { - OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Proxy cache for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); + OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Cached entry for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); } } return null; } + + @Override + public boolean containsKey(final Object key) { + return actualMap.containsKey(key); + } + + @Override + public int size() { + return actualMap.size(); + } + + @Override + public boolean isEmpty() { + return actualMap.isEmpty(); + } + + @Override + public boolean containsValue(final Object value) { + for (final TimedEntry entry : actualMap.values()) { + if (Objects.equals(entry.value, value)) { + return true; + } + } + return false; + } + + @Override + public V remove(final Object key) { + if (actualMap.containsKey(key)) { + return actualMap.remove(key).value; + } + return null; + } + + @Override + public void putAll(Map m) { + for (final Map.Entry entry : m.entrySet()) { + actualMap.put(entry.getKey(), new TimedEntry(entry.getValue())); + } + } + + @Override + public void clear() { + actualMap.clear(); + } + + @Override + public Set keySet() { + return new HashSet<>(actualMap.keySet()); + } + + @Override + public Collection values() { + final Collection values = new ArrayList<>(actualMap.size()); + for (final TimedEntry value : actualMap.values()) { + values.add(value.value); + } + return values; + } + + @Override + public Set> entrySet() { + final Map strippedMap = new HashMap<>(actualMap.size()); + for (final Map.Entry> entry : actualMap.entrySet()) { + strippedMap.put(entry.getKey(), entry.getValue().value); + } + return strippedMap.entrySet(); + } + } diff -r 84fb0215c0bc -r 69dd2eb02dbf tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java Fri May 09 16:19:42 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/util/TimedHashMapTest.java Fri May 09 17:30:54 2014 -0400 @@ -1,4 +1,4 @@ -/* +/* TimedHashMapTest.java Copyright (C) 2014 Red Hat, Inc. This file is part of IcedTea. @@ -37,34 +37,174 @@ package net.sourceforge.jnlp.util; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; + +import org.junit.Before; import org.junit.Test; -import static org.junit.Assert.*; - public class TimedHashMapTest { + private TimedHashMap testMap; + private Object o1, o2, o3, o4; + + @Before + public void resetTestMap() { + testMap = new TimedHashMap<>(); + o1 = new Object(); + o2 = new Object(); + o3 = new Object(); + o4 = new Object(); + } + @Test public void testPutAndGet() { - final TimedHashMap map = new TimedHashMap<>(); - final Object o1 = new Object(), o2 = new Object(), o3 = new Object(), o4 = new Object(); - map.put(o1, o2); - map.put(o2, o4); - map.put(o3, o4); - assertEquals(o2, map.get(o1)); - assertEquals(o4, map.get(o2)); - assertEquals(o4, map.get(o3)); - map.put(o1, o3); - assertEquals(o3, map.get(o1)); + testMap.put(o1, o2); + testMap.put(o2, o4); + testMap.put(o3, o4); + assertEquals("map[o1] != o2", o2, testMap.get(o1)); + assertEquals("map[o2] != o4", o4, testMap.get(o2)); + assertEquals("map[o3] != o4", o4, testMap.get(o3)); + testMap.put(o1, o3); + assertEquals("map[o1] != o3", o3, testMap.get(o1)); } @Test public void testEntryExpiry() throws Exception { - final TimedHashMap map = new TimedHashMap<>(); - final Object o1 = new Object(), o2 = new Object(); - map.setExpiry(0l); // immediate expiry - map.put(o1, o2); + testMap.setTimeout(0, TimeUnit.NANOSECONDS); // immediate expiry + testMap.put(o1, o2); Thread.sleep(5); // so we don't manage to put and get in the same nanosecond - assertNull(map.get(o1)); + assertNull("map[o1] should have expired", testMap.get(o1)); + } + + @Test(expected = NullPointerException.class) + public void testPutNullKey() { + testMap.put(null, o1); + } + + @Test + public void testPutNullValue() { + testMap.put(o1, null); + assertNull("map[o1] != null", testMap.get(o1)); + assertTrue("testMap should contain the key o1", testMap.containsKey(o1)); + } + + @Test + public void testContainsKey() { + testMap.put(o1, o2); + assertTrue("testMap should contain the key o1", testMap.containsKey(o1)); + } + + @Test + public void testSize() { + assertEquals(0, testMap.size()); + testMap.put(o1, o2); + assertEquals(1, testMap.size()); + } + + @Test + public void testIsEmpty() { + assertTrue("map should be empty", testMap.isEmpty()); + testMap.put(o1, o2); + assertFalse("map should not be empty", testMap.isEmpty()); + } + + @Test + public void testContainsValue() { + assertFalse("map should not contain o2", testMap.containsValue(o2)); + testMap.put(o1, o2); + assertTrue("map does not contain o2", testMap.containsValue(o2)); + } + + @Test + public void testContainsValueNull() { + assertFalse("map should not contain null value", testMap.containsValue(null)); + testMap.put(o1, null); + assertTrue("map does not contain null value", testMap.containsValue(null)); + } + + @Test + public void testRemove() { + testMap.put(o1, o2); + o3 = testMap.remove(o1); + assertEquals("o2 != o3", o2, o3); + assertFalse("map should not contain o1", testMap.containsKey(o1)); + } + + @Test + public void testRemoveFromEmpty() { + o2 = testMap.remove(o1); + assertNull("o2 should be null", o2); + } + + @Test + public void testPutAll() { + final Map newMap = new HashMap<>(); + newMap.put(o1, o2); + newMap.put(o3, o4); + testMap.putAll(newMap); + assertTrue("map should contain key o1", testMap.containsKey(o1)); + assertTrue("map should contain value o2", testMap.containsValue(o2)); + assertTrue("map should contain key o3", testMap.containsKey(o3)); + assertTrue("map should contain value o4", testMap.containsValue(o4)); + assertEquals("map[o1] != o2", o2, testMap.get(o1)); + assertEquals("map[o3] != o4", o4, testMap.get(o3)); + assertEquals(2, testMap.size()); + } + + @Test + public void testClear() { + testMap.put(o1, o2); + testMap.clear(); + assertEquals(0, testMap.size()); + assertFalse("map should not contain key o1", testMap.containsKey(o1)); + assertFalse("map should not contain value o2", testMap.containsValue(o2)); + } + + @Test + public void testKeySet() { + testMap.put(o1, o2); + Set keys = testMap.keySet(); + assertNotNull("keyset should not be null", keys); + assertTrue("keyset should contain o1", keys.contains(o1)); + assertEquals(1, keys.size()); + } + + @Test + public void testValues() { + testMap.put(o1, o2); + Collection values = testMap.values(); + assertNotNull("values collection should not be null", values); + assertTrue("values collection should contain o2", values.contains(o2)); + assertEquals(1, values.size()); + } + + @Test + public void testEntrySet() { + testMap.put(o1, o2); + testMap.put(o3, o4); + Set> entrySet = testMap.entrySet(); + assertNotNull("entryset should not be null", entrySet); + assertEquals(2, entrySet.size()); + for (final Map.Entry entry : entrySet) { + final Object key = entry.getKey(); + final Object value = entry.getValue(); + if (key.equals(o1)) { + assertEquals("entry with key o1 should have value o2", o2, value); + } + if (key.equals(o3)) { + assertEquals("entry with key o3 should have value o4", o4, value); + } + } } } From omajid at redhat.com Fri May 9 21:55:54 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 17:55:54 -0400 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: References: Message-ID: <20140509215554.GO3326@redhat.com> * jvanek at icedtea.classpath.org [2014-05-05 09:41]: > changeset e8b21e10ead6 in /hg/icedtea-web > details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e8b21e10ead6 > author: Jiri Vanek > date: Mon May 05 15:38:16 2014 +0200 > > Properly disconnect all connected http connections. When you are fixing code, please adjust surrounding code too. IcedTea-Web is written in a style that spreads information around and leaving obsolete information is really bad in the long term. > diff -r 8012d1bbbe72 -r e8b21e10ead6 netx/net/sourceforge/jnlp/cache/CacheEntry.java > --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Fri May 02 19:11:11 2014 -0400 > +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 05 15:38:16 2014 +0200 > @@ -82,6 +82,7 @@ > /** > * Returns the time in the local system clock that the file was > * most recently checked for an update. > + * @return Please don't add comments like this. They are useless. > /** > * Sets the time in the local system clock that the file was > * most recently checked for an update. > + * @param updatedTime Ditto. > * the cache and it is up to date. This method may not return > * immediately. This comment is now wrong too. Please remove/adjust it. > - * @param connection a connection to the remote URL > + * @param lastModified :( > try { > - long remoteModified = connection.getLastModified(); > + long remoteModified = lastModified; > long cachedModified = Long.parseLong(properties.getProperty("last-modified")); > > if (remoteModified > 0 && remoteModified <= cachedModified) A few lines below this, there is some code in the file that is now misleading: > } catch (Exception ex) { > OutputController.getLogger().log(ex);; > > return cached; // if can't connect return whether already in cache Please fix this. > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Mon May 05 15:38:16 2014 +0200 > + * @param location > + * @param version > + * @return > */ > public static Permission getReadPermission(URL location, Version version) { There are lots of similar empty @param's in this changeset. Please fix them all. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Sat May 10 00:11:10 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 10 May 2014 00:11:10 +0000 Subject: [Bug 1736] Awt loads gtk3 in all the look and feel configurations In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1736 --- Comment #2 from Marc-Andre Laperle --- Note that this also affects SWTBot, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=434560 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From omajid at redhat.com Sat May 10 00:14:16 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 9 May 2014 20:14:16 -0400 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 Message-ID: <20140510001415.GP3326@redhat.com> Hi, I recently tried compiling icedtea-web with java 8 and ran into more javadoc issues. Apparently, self-enclosing tags (
) are now not allowed either. The attached patch fixes the issues. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/netx/net/sourceforge/jnlp/JNLPFile.java b/netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java +++ b/netx/net/sourceforge/jnlp/JNLPFile.java @@ -267,7 +267,6 @@ /** * Create a JNLPFile from an input stream. * - * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ public JNLPFile(InputStream input, ParserSettings settings) throws ParseException { @@ -281,7 +280,6 @@ * @param input input stream of JNLP file. * @param codebase codebase to use if not specified in JNLP file.. * @param settings the {@link ParserSettings} to use when parsing - * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ public JNLPFile(InputStream input, URL codebase, ParserSettings settings) throws ParseException { diff --git a/netx/net/sourceforge/jnlp/SecurityDesc.java b/netx/net/sourceforge/jnlp/SecurityDesc.java --- a/netx/net/sourceforge/jnlp/SecurityDesc.java +++ b/netx/net/sourceforge/jnlp/SecurityDesc.java @@ -90,7 +90,7 @@ * The HTML permission level corresponding to the given String. If null is given, null comes * back. If there is no permission level that can be granted in HTML matching the given String, * null is also returned. - * @param jnlpString the JNLP permission String + * @param htmlString the JNLP permission String * @return the matching RequestedPermissionLevel */ public RequestedPermissionLevel fromHtmlString(final String htmlString) { diff --git a/netx/net/sourceforge/jnlp/util/FileUtils.java b/netx/net/sourceforge/jnlp/util/FileUtils.java --- a/netx/net/sourceforge/jnlp/util/FileUtils.java +++ b/netx/net/sourceforge/jnlp/util/FileUtils.java @@ -394,7 +394,6 @@ /** * Show a dialog informing the user that the file could not be opened * @param frame a {@link JFrame} to act as parent to this dialog - * @param filePath a {@link String} representing the path to the file we failed to open * @param message a {@link String} giving the specific reason the file could not be opened */ public static void showCouldNotOpenDialog(final Component frame, final String message) { diff --git a/netx/net/sourceforge/nanoxml/XMLElement.java b/netx/net/sourceforge/nanoxml/XMLElement.java --- a/netx/net/sourceforge/nanoxml/XMLElement.java +++ b/netx/net/sourceforge/nanoxml/XMLElement.java @@ -39,7 +39,7 @@ /** * XMLElement is a representation of an XML object. The object is able to parse * XML code. - *

+ *
*
Parsing XML Data
*
* You can parse XML data using the following code: @@ -83,7 +83,6 @@ * {@link #createAnotherElement() createAnotherElement} * which has to return a new copy of the receiver. *
- *

* * @see net.sourceforge.nanoxml.XMLParseException * @@ -178,7 +177,8 @@ private boolean ignoreWhitespace; /** - * Character read too much.
+ * Character read too much. + *

* This character provides push-back functionality to the input reader * without having to use a PushbackReader. * If there is no such character, this field is {@code '\0'}. @@ -210,7 +210,8 @@ private int parserLineNr; /** - * Creates and initializes a new XML element.
+ * Creates and initializes a new XML element. + *

* Calling the construction is equivalent to: *

  • {@code new XMLElement(new Hashtable(), false, true)}
* @@ -400,7 +401,8 @@ } /** - * Returns an attribute of the element.
+ * Returns an attribute of the element. + *

* If the attribute doesn't exist, {@code null} is returned. * * @param name The name of the attribute. @@ -535,7 +537,7 @@ * The new name. * *

Preconditions:
- *
    + *
    • {@code name != null}
    • *
    • {@code name} is a valid XML identifier
    • *
*/ @@ -597,7 +599,8 @@ } /** - * This method scans an identifier from the current reader.
+ * This method scans an identifier from the current reader. + *

* The scanned whitespace is appended to {@code result}. * * @return the next character following the whitespace. @@ -625,7 +628,8 @@ } /** - * This method scans a delimited string from the current reader.
+ * This method scans a delimited string from the current reader. + *

* The scanned string without delimiters is appended to {@code string}. * *

Preconditions:
@@ -653,8 +657,10 @@ /** * Scans a {@code #PCDATA} element. CDATA sections and entities are - * resolved.
- * The next < char is skipped.
+ * resolved. + *

+ * The next < char is skipped. + * * The scanned data is appended to {@code data}. * *

Preconditions:
@@ -831,7 +837,8 @@ } /** - * Scans the data for literal text.
+ * Scans the data for literal text. + *

* Scanning stops when a character does not match or after the complete * text has been checked, whichever comes first. * @@ -985,7 +992,8 @@ } /** - * Resolves an entity. The name of the entity is read from the reader.
+ * Resolves an entity. The name of the entity is read from the reader. + *

* The value of the entity is appended to {@code buf}. * * @param buf Where to put the entity value. diff --git a/netx/net/sourceforge/nanoxml/XMLParseException.java b/netx/net/sourceforge/nanoxml/XMLParseException.java --- a/netx/net/sourceforge/nanoxml/XMLParseException.java +++ b/netx/net/sourceforge/nanoxml/XMLParseException.java @@ -32,7 +32,8 @@ * An XMLParseException is thrown when an error occures while parsing an XML * string. *

- * $Revision: 1.1 $
+ * $Revision: 1.1 $

+ *

* $Date: 2002/08/03 04:05:32 $

* * @see net.sourceforge.nanoxml.XMLElement From gitne at gmx.de Sat May 10 02:07:46 2014 From: gitne at gmx.de (Jacob Wisor) Date: Sat, 10 May 2014 04:07:46 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <20140510001415.GP3326@redhat.com> References: <20140510001415.GP3326@redhat.com> Message-ID: <536D89F2.7050709@gmx.de> On 5/10/2014 2:14 AM Omair Majid wrote: > Hi, > > I recently tried compiling icedtea-web with java 8 and ran into more > javadoc issues. Apparently, self-enclosing tags (
) are now not > allowed either. Self-enclosing elements are actually required by the XML specification, hence also by XHTML. Please do not remove them. Jacob From jvanek at redhat.com Mon May 12 05:11:50 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 12 May 2014 07:11:50 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <536D89F2.7050709@gmx.de> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> Message-ID: <53705816.2020208@redhat.com> On 05/10/2014 04:07 AM, Jacob Wisor wrote: > On 5/10/2014 2:14 AM Omair Majid wrote: >> Hi, >> >> I recently tried compiling icedtea-web with java 8 and ran into more >> javadoc issues. Apparently, self-enclosing tags (
) are now not >> allowed either. I thought that itw javadoc can be generated in jdk8. How come it is not anymore? > > Self-enclosing elements are actually required by the XML specification, hence also by XHTML. Please > do not remove them. > Then perhaps get rid of br at all, and use

or
J. From ptisnovs at icedtea.classpath.org Mon May 12 07:37:58 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 12 May 2014 07:37:58 +0000 Subject: /hg/gfx-test: Ten new tests added into CAGOperationsOnTwoConcent... Message-ID: changeset 3c218f3b3c14 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=3c218f3b3c14 author: Pavel Tisnovsky date: Mon May 12 09:38:36 2014 +0200 Ten new tests added into CAGOperationsOnTwoConcentricCircles. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java | 250 ++++++++++ 2 files changed, 255 insertions(+), 0 deletions(-) diffs (272 lines): diff -r 7223ae87ebca -r 3c218f3b3c14 ChangeLog --- a/ChangeLog Fri May 09 10:43:39 2014 +0200 +++ b/ChangeLog Mon May 12 09:38:36 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-12 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java: + Ten new tests added into CAGOperationsOnTwoConcentricCircles. + 2014-05-09 Pavel Tisnovsky * src/org/gfxtest/testsuites/CAGOperationsOnTwoTouchingCircles.java: diff -r 7223ae87ebca -r 3c218f3b3c14 src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java --- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java Fri May 09 10:43:39 2014 +0200 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java Mon May 12 09:38:36 2014 +0200 @@ -1859,6 +1859,256 @@ } /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingVerticalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingVerticalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingVerticalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalStripesTexture(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingUnionOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingHorizontalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingHorizontalColorStripesTexture(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingUnionOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args not used in this case From jvanek at redhat.com Mon May 12 09:18:07 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 12 May 2014 11:18:07 +0200 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <537083F2.6080003@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> Message-ID: <537091CF.4080800@redhat.com> Ouch, Added Deepak instead of Distro email list list. Resent J. On 05/12/2014 10:18 AM, Jiri Vanek wrote: > On 05/09/2014 11:55 PM, Omair Majid wrote: >> * jvanek at icedtea.classpath.org [2014-05-05 09:41]: >>> changeset e8b21e10ead6 in /hg/icedtea-web >>> details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e8b21e10ead6 >>> author: Jiri Vanek >>> date: Mon May 05 15:38:16 2014 +0200 >>> >>> Properly disconnect all connected http connections. >> >> When you are fixing code, please adjust surrounding code too. > ... >> There are lots of similar empty @param's in this changeset. Please fix them >> all. > > > Thank you for kick. > > This patch is fixing javadocs from mentioned push, and adds few more, mostly javadoc, but also > imports and non final -> final changes and <> operator. where I hit it during cleaning. > > This patch have small overleap with Andrew's "[rfc][icedtea-web] Resource/ResourceTracker clean up" > and Your's urlconnection conn -> long lastMOdified+long contentLength signature change > > > J. > -------------- next part -------------- A non-text attachment was scrubbed... Name: javadocCleaning.patch Type: text/x-patch Size: 30506 bytes Desc: not available URL: From sgehwolf at redhat.com Mon May 12 12:41:06 2014 From: sgehwolf at redhat.com (Severin Gehwolf) Date: Mon, 12 May 2014 14:41:06 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <536D89F2.7050709@gmx.de> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> Message-ID: <1399898466.3188.16.camel@localhost.localdomain> On Sat, 2014-05-10 at 04:07 +0200, Jacob Wisor wrote: > On 5/10/2014 2:14 AM Omair Majid wrote: > > Hi, > > > > I recently tried compiling icedtea-web with java 8 and ran into more > > javadoc issues. Apparently, self-enclosing tags (
) are now not > > allowed either. > > Self-enclosing elements are actually required by the XML specification, hence > also by XHTML. Please do not remove them. The premises on which doclint warnings are based is HTML 4.01 Transitional Loose[1]. Hence, it depends on the Doctype. XHTML or HTML 5 have different doctypes which would actually require the self-closing "
". More info here[2]. IMHO, the patch is fine. Cheers, Severin [1] To be precise: [2] http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-July/019269.html From andrew at icedtea.classpath.org Mon May 12 13:06:53 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 12 May 2014 13:06:53 +0000 Subject: /hg/icedtea7: PR1762: Undefined references when building with NS... Message-ID: changeset 7ae2b1ac339d in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=7ae2b1ac339d author: Andrew John Hughes date: Fri May 09 20:34:40 2014 +0100 PR1762: Undefined references when building with NSS 3.16.1 2014-05-09 Andrew John Hughes * NEWS: Updated. * acinclude.m4: (IT_ENABLE_SUNEC): For NSS >= 3.16.1, add -lfreebl to SUNEC_LIBS, not SUNEC_CFLAGS, and use NSS_LIBS as the base, not NSS_SOFTOKN_LIBS. diffstat: ChangeLog | 9 +++++++++ NEWS | 1 + acinclude.m4 | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diffs (41 lines): diff -r 4f67c07197c3 -r 7ae2b1ac339d ChangeLog --- a/ChangeLog Fri May 09 16:36:34 2014 +0100 +++ b/ChangeLog Fri May 09 20:34:40 2014 +0100 @@ -1,3 +1,12 @@ +2014-05-09 Andrew John Hughes + + PR1762: Undefined references when building with NSS 3.16.1 + * NEWS: Updated. + * acinclude.m4: + (IT_ENABLE_SUNEC): For NSS >= 3.16.1, add -lfreebl + to SUNEC_LIBS, not SUNEC_CFLAGS, and use NSS_LIBS as + the base, not NSS_SOFTOKN_LIBS. + 2014-05-09 Andrew John Hughes * Makefile.am: diff -r 4f67c07197c3 -r 7ae2b1ac339d NEWS --- a/NEWS Fri May 09 16:36:34 2014 +0100 +++ b/NEWS Fri May 09 20:34:40 2014 +0100 @@ -181,6 +181,7 @@ - PR1758: Support PPC64 JIT on ppc64le - PR1757: register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 - Correct placement of S8041658 fix + - PR1762: Undefined references when building with NSS 3.16.1 New in release 2.5.0 (2014-XX-XX): diff -r 4f67c07197c3 -r 7ae2b1ac339d acinclude.m4 --- a/acinclude.m4 Fri May 09 16:36:34 2014 +0100 +++ b/acinclude.m4 Fri May 09 20:34:40 2014 +0100 @@ -2730,8 +2730,8 @@ PKG_CHECK_MODULES(NSS_SOFTOKN, nss-softokn >= 3.16.1, [NSS_SOFTOKN_FOUND=yes], [NSS_SOFTOKN_FOUND=no]) PKG_CHECK_MODULES(NSS_JAVA, nss-java, [NSS_JAVA_FOUND=yes], [NSS_JAVA_FOUND=no]) if test "x${NSS_SOFTOKN_FOUND}" = "xyes"; then - SUNEC_CFLAGS="$NSS_SOFTOKN_CFLAGS -lfreebl"; - SUNEC_LIBS=$NSS_SOFTOKN_LIBS; + SUNEC_CFLAGS=$NSS_SOFTOKN_CFLAGS; + SUNEC_LIBS="$NSS_LIBS -lfreebl"; elif test "x${NSS_JAVA_FOUND}" = "xyes"; then SUNEC_CFLAGS="$NSS_JAVA_CFLAGS -DLEGACY_NSS"; SUNEC_LIBS=$NSS_JAVA_LIBS; From bugzilla-daemon at icedtea.classpath.org Mon May 12 13:07:03 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 12 May 2014 13:07:03 +0000 Subject: [Bug 1762] [IcedTea7] Undefined references when building with NSS 3.16.1 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1762 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=7ae2b1ac339d author: Andrew John Hughes date: Fri May 09 20:34:40 2014 +0100 PR1762: Undefined references when building with NSS 3.16.1 2014-05-09 Andrew John Hughes * NEWS: Updated. * acinclude.m4: (IT_ENABLE_SUNEC): For NSS >= 3.16.1, add -lfreebl to SUNEC_LIBS, not SUNEC_CFLAGS, and use NSS_LIBS as the base, not NSS_SOFTOKN_LIBS. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gitne at gmx.de Mon May 12 13:17:24 2014 From: gitne at gmx.de (Jacob Wisor) Date: Mon, 12 May 2014 15:17:24 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <1399898466.3188.16.camel@localhost.localdomain> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <1399898466.3188.16.camel@localhost.localdomain> Message-ID: <5370C9E4.7000607@gmx.de> On 05/12/2014 02:41 PM Severin Gehwolf wrote: > On 10/05/2014 04:07 AM Jacob Wisor wrote: >> On 5/10/2014 2:14 AM Omair Majid wrote: >>> Hi, >>> >>> I recently tried compiling icedtea-web with java 8 and ran into more >>> javadoc issues. Apparently, self-enclosing tags (
) are now not >>> allowed either. >> >> Self-enclosing elements are actually required by the XML specification, hence >> also by XHTML. Please do not remove them. > > The premises on which doclint warnings are based is HTML 4.01 > Transitional Loose[1]. Yes, I know. But, it /should/ transition to XHTML 1.1 and soon to XHTML 2. HTML is going to become obsolete as a standard soon, although HTML will continue to be supported by probably most browsers and tools in the foreseeable future. Nevertheless, I would advise to use XHTML compliant elements and their forms in source code documentation only. This way, the source code documentation is kept future proof. ... Yes, there are tools that help to migrating or transitioning existing HTML documents to XHTML, so this may look easy and not a problem. But, usually they have caveats and are not much help for large sets of documents. Keeping the source future proof is the best approach, I would assume. This patch is not wrong, but it is fighting a problem that is going to be fought even more so in the future when HTML becomes definitely obsolete. Jacob From gitne at gmx.de Mon May 12 13:22:23 2014 From: gitne at gmx.de (Jacob Wisor) Date: Mon, 12 May 2014 15:22:23 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <53705816.2020208@redhat.com> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <53705816.2020208@redhat.com> Message-ID: <5370CB0F.2040009@gmx.de> On 05/12/2014 07:11 AM Jiri Vanek wrote: > On 05/10/2014 04:07 AM, Jacob Wisor wrote: >> On 5/10/2014 2:14 AM Omair Majid wrote: >>> Hi, >>> >>> I recently tried compiling icedtea-web with java 8 and ran into more >>> javadoc issues. Apparently, self-enclosing tags (
) are now not >>> allowed either. > > I thought that itw javadoc can be generated in jdk8. How come it is not anymore? >> >> Self-enclosing elements are actually required by the XML specification, hence >> also by XHTML. Please >> do not remove them. >> > > Then perhaps get rid of br at all, and use

or
Good thought, but br has different semantics than p and div, so I guess it cannot be easily substituted. ;-) Jacob From jvanek at redhat.com Mon May 12 13:24:02 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 12 May 2014 15:24:02 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <5370CB0F.2040009@gmx.de> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <53705816.2020208@redhat.com> <5370CB0F.2040009@gmx.de> Message-ID: <5370CB72.7000508@redhat.com> On 05/12/2014 03:22 PM, Jacob Wisor wrote: > On 05/12/2014 07:11 AM Jiri Vanek wrote: >> On 05/10/2014 04:07 AM, Jacob Wisor wrote: >>> On 5/10/2014 2:14 AM Omair Majid wrote: >>>> Hi, >>>> >>>> I recently tried compiling icedtea-web with java 8 and ran into more >>>> javadoc issues. Apparently, self-enclosing tags (
) are now not >>>> allowed either. >> >> I thought that itw javadoc can be generated in jdk8. How come it is not anymore? >>> >>> Self-enclosing elements are actually required by the XML specification, hence >>> also by XHTML. Please >>> do not remove them. >>> >> >> Then perhaps get rid of br at all, and use

or
> > Good thought, but br has different semantics than p and div, so I guess it cannot be easily > substituted. ;-) I (Strongly) Agree. But it can fix both issues. In cases in Omair's patch it seems to be applicable. J. From omajid at redhat.com Mon May 12 13:34:06 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 09:34:06 -0400 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <536D89F2.7050709@gmx.de> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> Message-ID: <20140512133406.GB2138@redhat.com> * Jacob Wisor [2014-05-09 22:07]: > On 5/10/2014 2:14 AM Omair Majid wrote: > >Hi, > > > >I recently tried compiling icedtea-web with java 8 and ran into more > >javadoc issues. Apparently, self-enclosing tags (
) are now not > >allowed either. > > Self-enclosing elements are actually required by the XML specification, > hence also by XHTML. Please do not remove them. But they are rejected by the javadoc compiler in OpenJDK 8. Since we are now moving towards OpenJDK 7 and OpenJDk 8-support not being able to build everything with OpenJDK 8 seems like a showstopper. Is there a reason you want to keep the self-enclosing elements (aside from being valid XHTML)? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Mon May 12 13:35:09 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 09:35:09 -0400 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <53705816.2020208@redhat.com> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <53705816.2020208@redhat.com> Message-ID: <20140512133509.GC2138@redhat.com> * Jiri Vanek [2014-05-12 01:11]: > On 05/10/2014 04:07 AM, Jacob Wisor wrote: > >On 5/10/2014 2:14 AM Omair Majid wrote: > >>Hi, > >> > >>I recently tried compiling icedtea-web with java 8 and ran into more > >>javadoc issues. Apparently, self-enclosing tags (
) are now not > >>allowed either. > > I thought that itw javadoc can be generated in jdk8. How come it is not anymore? Not sure. I suspect there were slight updates to javadoc tool that I tested earlier and the latest 8u5 release. > Then perhaps get rid of br at all, and use

or
Isn't that what the patch does? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Mon May 12 13:51:25 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 09:51:25 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <20140502172314.GD2886@redhat.com> References: <20140502172314.GD2886@redhat.com> Message-ID: <20140512135122.GD2138@redhat.com> * Omair Majid [2014-05-02 13:24]: > I had to work on CacheEntry for a few fixes (I will be posting those > later) and the class seems to be doing a bit too much. The knowledge of > URLConnection is especially troubling, since the metadata for a > CacheEntry doesn't really match the URL in the presence of compression. > > The attached patch tries to reduce how much CacheEntry knows about > URLConnection. Since the other reviews asked for more unit tests, I have updated this patch to add even more. Most of the functionality in CacheEntry should now be covered by unit tests. Some of the corner cases are not, sadly. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2014-05-09 Omair Majid + + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Use + constants for strings. + (initialize): Remove. + (getRemoteContentLength, setRemoteContentLength, getLastModified) + (setLastModified, getLongKey, setLongKey): New method. + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java: New + file. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java + (initializeResource, downloadResource): Use + CacheEntry.setRemoteContentLength and CacheEntry.setLastModified instead + of CacheEntry.initialize. + 2014-05-09 Andrew Azores * netx/net/sourceforge/jnlp/util/TimedHashMap.java: implements Map diff --git a/netx/net/sourceforge/jnlp/cache/CacheEntry.java b/netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java @@ -23,7 +23,6 @@ import java.net.*; import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.runtime.*; import net.sourceforge.jnlp.util.*; /** @@ -34,6 +33,10 @@ */ public class CacheEntry { + private static final String KEY_CONTENT_LENGTH = "content-length"; + private static final String KEY_LAST_MODIFIED = "last-modified"; + private static final String KEY_LAST_UPDATED = "last-updated"; + /** the remote resource location */ private URL location; @@ -61,18 +64,6 @@ } /** - * Initialize the cache entry data from a connection to the - * remote resource (does not store data). - */ - void initialize(URLConnection connection) { - long modified = connection.getLastModified(); - long length = connection.getContentLength(); // an int - - properties.setProperty("content-length", Long.toString(length)); - properties.setProperty("last-modified", Long.toString(modified)); - } - - /** * Returns the remote location this entry caches. */ public URL getLocation() { @@ -85,11 +76,7 @@ * @return */ public long getLastUpdated() { - try { - return Long.parseLong(properties.getProperty("last-updated")); - } catch (Exception ex) { - return 0; - } + return getLongKey(KEY_LAST_UPDATED); } /** @@ -98,7 +85,35 @@ * @param updatedTime */ public void setLastUpdated(long updatedTime) { - properties.setProperty("last-updated", Long.toString(updatedTime)); + setLongKey(KEY_LAST_UPDATED, updatedTime); + } + + public long getRemoteContentLength() { + return getLongKey(KEY_CONTENT_LENGTH); + } + + public void setRemoteContentLength(long length) { + setLongKey(KEY_CONTENT_LENGTH, length); + } + + public long getLastModified() { + return getLongKey(KEY_LAST_MODIFIED); + } + + public void setLastModified(long modifyTime) { + setLongKey(KEY_LAST_MODIFIED, modifyTime); + } + + private long getLongKey(String key) { + try { + return Long.parseLong(properties.getProperty(key)); + } catch (Exception ex) { + return 0; + } + } + + private void setLongKey(String key, long value) { + properties.setProperty(key, Long.toString(value)); } /** @@ -117,7 +132,7 @@ try { long remoteModified = lastModified; - long cachedModified = Long.parseLong(properties.getProperty("last-modified")); + long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); if (remoteModified > 0 && remoteModified <= cachedModified) return true; @@ -137,13 +152,13 @@ * @return true if the resource is in the cache */ public boolean isCached() { - File localFile = CacheUtil.getCacheFile(location, version); + File localFile = getCacheFile(); if (!localFile.exists()) return false; try { long cachedLength = localFile.length(); - long remoteLength = Long.parseLong(properties.getProperty("content-length", "-1")); + long remoteLength = Long.parseLong(properties.getProperty(KEY_CONTENT_LENGTH, "-1")); if (remoteLength >= 0 && cachedLength != remoteLength) return false; @@ -157,6 +172,13 @@ } /** + * Seam for testing + */ + File getCacheFile() { + return CacheUtil.getCacheFile(location, version); + } + + /** * Save the current information for the cache entry. */ protected void store() { @@ -183,4 +205,5 @@ protected void unlock() { CacheUtil.unlockFile(properties); } + } 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 @@ -695,6 +695,9 @@ byte buf[] = new byte[1024]; int rlen; + long contentLength = con.getContentLengthLong(); + long lastModified = con.getLastModified(); + InputStream in = new BufferedInputStream(con.getInputStream()); OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.downloadVersion); @@ -710,11 +713,16 @@ if (con instanceof HttpURLConnection) ((HttpURLConnection) con).disconnect(); + if (packgz || gzip) { + // TODO why not set this otherwise? + downloadEntry.setRemoteContentLength(contentLength); + downloadEntry.setLastModified(lastModified); + } + /* * If the file was compressed, uncompress it. */ if (packgz) { - downloadEntry.initialize(con); GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil .getCacheFile(downloadLocation, resource.downloadVersion))); InputStream inputStream = new BufferedInputStream(gzInputStream); @@ -729,7 +737,6 @@ inputStream.close(); gzInputStream.close(); } else if (gzip) { - downloadEntry.initialize(con); GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil .getCacheFile(downloadLocation, resource.downloadVersion))); InputStream inputStream = new BufferedInputStream(gzInputStream); @@ -828,8 +835,10 @@ } // update cache entry - if (!current) - entry.initialize(connection); + if (!current) { + entry.setRemoteContentLength(connection.getContentLengthLong()); + entry.setLastModified(connection.getLastModified()); + } entry.setLastUpdated(System.currentTimeMillis()); entry.store(); diff --git a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java new file mode 100644 --- /dev/null +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java @@ -0,0 +1,179 @@ +/* CacheEntryTest -- unit test for CacheEntry + Copyright (C) 2014 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.cache; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.file.Files; + +import net.sourceforge.jnlp.Version; + +import org.junit.Before; +import org.junit.Test; + +public class CacheEntryTest { + + /** A custom subclass that allows supplying a predefined cache file */ + static class TestCacheEntry extends CacheEntry { + private File cacheFile; + public TestCacheEntry(URL location, Version version, File cacheFile) { + super(location, version); + this.cacheFile = cacheFile; + } + @Override + protected File getCacheFile() { + return cacheFile; + } + } + + private URL url; + private Version version; + + @Before + public void setUp() throws MalformedURLException { + url = new URL("http://example.com/example.jar"); + version = new Version("1.0"); + } + + @Test + public void verifyLocationIsSame() { + CacheEntry entry = new TestCacheEntry(url, version, null); + assertEquals(url, entry.getLocation()); + } + + @Test + public void verifyLastModifiedIsSetCorrectly() { + long LAST_MODIFIED = 1000; + + CacheEntry entry = new TestCacheEntry(url, version, null); + entry.setLastModified(LAST_MODIFIED); + + assertEquals(LAST_MODIFIED, entry.getLastModified()); + } + + @Test + public void verifyLastUpdatedIsSetCorrectly() { + long LAST_UPDATED = 1000; + + CacheEntry entry = new TestCacheEntry(url, version, null); + entry.setLastUpdated(LAST_UPDATED); + + assertEquals(LAST_UPDATED, entry.getLastUpdated()); + } + + @Test + public void verifyContentLengthIsSetCorrectly() { + long CONTENT_LENGTH = 1000; + + CacheEntry entry = new TestCacheEntry(url, version, null); + entry.setRemoteContentLength(CONTENT_LENGTH); + + assertEquals(CONTENT_LENGTH, entry.getRemoteContentLength()); + } + + @Test + public void verifyNotCachedIfFileIsAbsent() { + File doesNotExist = new File("/foo/bar/baz/spam/eggs"); + + CacheEntry entry = new TestCacheEntry(url, version, doesNotExist); + + assertFalse(entry.isCached()); + } + + @Test + public void verifyNotCachedIfContentLengthsDiffer() throws IOException { + File cachedFile = createCacheFile("Foo"); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(10000); + + assertFalse(entry.isCached()); + } + + @Test + public void verifyCachedIfContentLengthsAreSame() throws IOException { + String contents = "Foo"; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(contents.length()); + + assertTrue(entry.isCached()); + } + + @Test + public void verifyCurrentWhenCacheEntryHasSameTimeStamp() throws IOException { + long lastModified = 10; + String contents = "Foo"; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(contents.length()); + entry.setLastModified(lastModified); + + assertTrue(entry.isCurrent(lastModified)); + } + + @Test + public void verifyNotCurrentWhenRemoteContentIsNewer() throws IOException { + long oldTimeStamp = 10; + long newTimeStamp = 100; + String contents = "Foo"; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(contents.length()); + entry.setLastModified(oldTimeStamp); + + assertFalse(entry.isCurrent(newTimeStamp)); + } + + protected File createCacheFile(String contents) throws IOException { + File cachedFile = File.createTempFile("CacheEntryTest", null); + Files.write(cachedFile.toPath(), contents.getBytes()); + cachedFile.deleteOnExit(); + return cachedFile; + } + +} From jvanek at redhat.com Mon May 12 13:51:31 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 12 May 2014 15:51:31 +0200 Subject: [rfc][icedtea-web] A few new utils unit tests In-Reply-To: <536CFB02.9060603@redhat.com> References: <536CFB02.9060603@redhat.com> Message-ID: <5370D1E3.2000407@redhat.com> On 05/09/2014 05:57 PM, Andrew Azores wrote: > Hi, > > Just adding a couple of unit tests for CacheUtil and FIleUtils. Many of the methods in CacheUtil > actually touch the cache, so those were avoided - we have the CacheReproducer test anyway. > > Thanks, > I Think it is ok to go. From aazores at icedtea.classpath.org Mon May 12 13:59:46 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Mon, 12 May 2014 13:59:46 +0000 Subject: /hg/icedtea-web: 2 new changesets Message-ID: changeset f46fb24d32fb in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=f46fb24d32fb author: Andrew Azores date: Mon May 12 09:58:28 2014 -0400 Added new tests for CacheUtil * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (urlToPath) use StringBuilder, not StringBuffer * tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java: (testUrlEquals, testUrlToPath) new tests changeset b19fe5f6a442 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=b19fe5f6a442 author: Andrew Azores date: Mon May 12 09:59:34 2014 -0400 Added new tests for FileUtils * tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java: new test class for FileUtils diffstat: ChangeLog | 12 + netx/net/sourceforge/jnlp/cache/CacheUtil.java | 4 +- tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java | 18 ++ tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java | 91 +++++++++++ 4 files changed, 123 insertions(+), 2 deletions(-) diffs (171 lines): diff -r 69dd2eb02dbf -r b19fe5f6a442 ChangeLog --- a/ChangeLog Fri May 09 17:30:54 2014 -0400 +++ b/ChangeLog Mon May 12 09:59:34 2014 -0400 @@ -1,3 +1,15 @@ +2014-05-09 Andrew Azores + + * tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java: new test + class for FileUtils + +2014-05-09 Andrew Azores + + * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (urlToPath) use + StringBuilder, not StringBuffer + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java: + (testUrlEquals, testUrlToPath) new tests + 2014-05-09 Andrew Azores * netx/net/sourceforge/jnlp/util/TimedHashMap.java: implements Map diff -r 69dd2eb02dbf -r b19fe5f6a442 netx/net/sourceforge/jnlp/cache/CacheUtil.java --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Fri May 09 17:30:54 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Mon May 12 09:59:34 2014 -0400 @@ -49,9 +49,9 @@ import net.sourceforge.jnlp.runtime.ApplicationInstance; import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.util.FileUtils; -import net.sourceforge.jnlp.util.logging.OutputController; import net.sourceforge.jnlp.util.PropertiesFile; import net.sourceforge.jnlp.util.UrlUtils; +import net.sourceforge.jnlp.util.logging.OutputController; /** * Provides static methods to interact with the cache, download @@ -493,7 +493,7 @@ throw new NullPointerException(); } - StringBuffer path = new StringBuffer(); + StringBuilder path = new StringBuilder(); path.append(subdir); path.append(File.separatorChar); diff -r 69dd2eb02dbf -r b19fe5f6a442 tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java Fri May 09 17:30:54 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java Mon May 12 09:59:34 2014 -0400 @@ -36,7 +36,9 @@ */ package net.sourceforge.jnlp.cache; +import java.io.File; import java.net.URL; + import org.junit.Assert; import org.junit.Test; @@ -52,4 +54,20 @@ Assert.assertTrue("normalized form " + i + " must CacheUtil.urlEquals to its original " + i, CacheUtil.urlEquals(n[i], u[i])); } } + + @Test + public void testUrlEquals() throws Exception { + final URL n1 = null, n2 = null, u1 = new URL("http://example.com"), u2 = u1, u3 = new URL("http://example.com"); + Assert.assertTrue("Two nulls should be equal", CacheUtil.urlEquals(n1, n2)); + Assert.assertFalse("Null URL should not equal a non-null", CacheUtil.urlEquals(n1, u1)); + Assert.assertTrue("URL should equal itself (same reference)", CacheUtil.urlEquals(u1, u2)); + Assert.assertTrue("URLs should be equal when different reference but the same URL", CacheUtil.urlEquals(u1, u3)); + } + + @Test + public void testUrlToPath() throws Exception { + final URL u = new URL("https://example.com/applet/some:weird*applet?.jar"); + final File expected = new File("/tmp/https/example.com/applet/some_weird_applet"); + Assert.assertEquals(expected, CacheUtil.urlToPath(u, "/tmp")); + } } diff -r 69dd2eb02dbf -r b19fe5f6a442 tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java Mon May 12 09:59:34 2014 -0400 @@ -0,0 +1,91 @@ +/* FileUtilsTest.java +Copyright (C) 2014 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.util; + +import java.io.File; + +import org.junit.Test; + +import static org.junit.Assert.*; + +public class FileUtilsTest { + + private static final char[] INVALID = { + '\\', + '/', + ':', + '*', + '?', + '"', + '<', + '>', + '|', }; + private static final char SANITIZED = '_'; + + @Test + public void testSanitizePath() throws Exception { + for (char ch : INVALID) { + String str = File.separator + "tmp" + File.separator + "test" + ch + "path"; + String sanitized = FileUtils.sanitizePath(str); + assertFalse(ch + " should be sanitized from " + sanitized, ch != File.separatorChar && sanitized.contains(Character.toString(ch))); + assertEquals(str.replace(ch, ch == File.separatorChar ? ch : SANITIZED), sanitized); + } + } + + @Test + public void testSanitizeFilename() throws Exception { + for (char ch : INVALID) { + String str = "file" + ch + "name"; + String sanitized = FileUtils.sanitizeFileName(str); + assertFalse(ch + " should be sanitized from " + sanitized, sanitized.contains(Character.toString(ch))); + assertEquals(str.replace(ch, SANITIZED), sanitized); + } + } + + @Test + public void testCreateParentDir() throws Exception { + final File tmpdir = new File(System.getProperty("java.io.tmpdir")), testParent = new File(tmpdir, "itw_test_create_parent_dir"), testChild = new File(testParent, "test_child_dir"); + testChild.deleteOnExit(); + testParent.deleteOnExit(); + FileUtils.createParentDir(testChild); + assertTrue(tmpdir.isDirectory()); + assertTrue(testParent.isDirectory()); + assertFalse(testChild.exists()); + } + +} From gitne at gmx.de Mon May 12 14:02:40 2014 From: gitne at gmx.de (Jacob Wisor) Date: Mon, 12 May 2014 16:02:40 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <20140512133406.GB2138@redhat.com> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <20140512133406.GB2138@redhat.com> Message-ID: <5370D480.6030203@gmx.de> On 05/12/2014 03:34 PM Omair Majid wrote: > * Jacob Wisor [2014-05-09 22:07]: >> On 5/10/2014 2:14 AM Omair Majid wrote: >>> Hi, >>> >>> I recently tried compiling icedtea-web with java 8 and ran into more >>> javadoc issues. Apparently, self-enclosing tags (
) are now not >>> allowed either. >> >> Self-enclosing elements are actually required by the XML specification, >> hence also by XHTML. Please do not remove them. > > But they are rejected by the javadoc compiler in OpenJDK 8. Since we are > now moving towards OpenJDK 7 and OpenJDk 8-support not being able to > build everything with OpenJDK 8 seems like a showstopper. Is there a > reason you want to keep the self-enclosing elements (aside from being > valid XHTML)? Please read my message <5370C9E4.7000607 at gmx.de> for this. Standards compliance is my main motivation. I was hoping javadoc would have finally moved to XHTML since OpenJDK 8, but unfortunately progress has been a bit of a pain for Java during the last few years. :-\ As I mentioned earlier, your patch is not wrong but it fixes problems that will or might become a problem themselves when javadoc finally transitions to XHTML. I think, I do not need to elaborate on the human *and* machine readability benefits of XML here, so this is mainly why I would like every javadoc source code out there to be prepared for that transition. If self-enclosing elements are stopping OpenJDK 8 javadoc from digesting that Java source code documentation then I would rather assume javadoc needs to be fixed. And evidently, the time has come to give back javadoc the attention it requires, since it has been neglected for so many years. Jacob From jvanek at redhat.com Mon May 12 14:03:34 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 12 May 2014 16:03:34 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <20140512133509.GC2138@redhat.com> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <53705816.2020208@redhat.com> <20140512133509.GC2138@redhat.com> Message-ID: <5370D4B6.1000709@redhat.com> On 05/12/2014 03:35 PM, Omair Majid wrote: > * Jiri Vanek [2014-05-12 01:11]: >> On 05/10/2014 04:07 AM, Jacob Wisor wrote: >>> On 5/10/2014 2:14 AM Omair Majid wrote: >>>> Hi, >>>> >>>> I recently tried compiling icedtea-web with java 8 and ran into more >>>> javadoc issues. Apparently, self-enclosing tags (
) are now not >>>> allowed either. >> >> I thought that itw javadoc can be generated in jdk8. How come it is not anymore? > > Not sure. I suspect there were slight updates to javadoc tool that I > tested earlier and the latest 8u5 release. > >> Then perhaps get rid of br at all, and use

or
> > Isn't that what the patch does? > Ok. Then what is this discussion about? Please. Avoid any
->
changes(yes, they are there...), and go on and push. Thank you. J. From aazores at redhat.com Mon May 12 15:07:12 2014 From: aazores at redhat.com (Andrew Azores) Date: Mon, 12 May 2014 11:07:12 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <20140512135122.GD2138@redhat.com> References: <20140502172314.GD2886@redhat.com> <20140512135122.GD2138@redhat.com> Message-ID: <5370E3A0.6090600@redhat.com> On 05/12/2014 09:51 AM, Omair Majid wrote: > * Omair Majid [2014-05-02 13:24]: >> I had to work on CacheEntry for a few fixes (I will be posting those >> later) and the class seems to be doing a bit too much. The knowledge of >> URLConnection is especially troubling, since the metadata for a >> CacheEntry doesn't really match the URL in the presence of compression. >> >> The attached patch tries to reduce how much CacheEntry knows about >> URLConnection. > Since the other reviews asked for more unit tests, I have updated this > patch to add even more. Most of the functionality in CacheEntry should > now be covered by unit tests. Some of the corner cases are not, sadly. > > Thanks, > Omair > Code looks good. Only question about the tests - why @Before rather than @BeforeClass for setup()? As far as I can tell, those two fields only need to be set once. Otherwise, looks good too. OK to push once @Before is replaced with @BeforeClass (or if @Before is required and I just don't see it). Thanks, -- Andrew A From omajid at redhat.com Mon May 12 15:14:14 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 11:14:14 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <5370E3A0.6090600@redhat.com> References: <20140502172314.GD2886@redhat.com> <20140512135122.GD2138@redhat.com> <5370E3A0.6090600@redhat.com> Message-ID: <20140512151414.GF2138@redhat.com> * Andrew Azores [2014-05-12 11:07]: > Code looks good. Only question about the tests - why @Before rather than > @BeforeClass for setup()? As far as I can tell, those two fields only need > to be set once. That's right. I just have a habit of re-initializing as much of the state as possible, to avoid an accidentally broken test breaking things for other tests. I normally try and use @BeforeClass only for things that must be initialized once or are really expensive to initialize. To me, @BeforeClass indicates a departure from the ideal test process which is @Before, @Test, @After. Anyway, I can change this if you insist. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Mon May 12 15:22:33 2014 From: aazores at redhat.com (Andrew Azores) Date: Mon, 12 May 2014 11:22:33 -0400 Subject: [icedtea-web] RFC: Reduce URLConnection knowledge in CacheEntry In-Reply-To: <20140512151414.GF2138@redhat.com> References: <20140502172314.GD2886@redhat.com> <20140512135122.GD2138@redhat.com> <5370E3A0.6090600@redhat.com> <20140512151414.GF2138@redhat.com> Message-ID: <5370E739.3070703@redhat.com> On 05/12/2014 11:14 AM, Omair Majid wrote: > * Andrew Azores [2014-05-12 11:07]: >> Code looks good. Only question about the tests - why @Before rather than >> @BeforeClass for setup()? As far as I can tell, those two fields only need >> to be set once. > That's right. I just have a habit of re-initializing as much of the > state as possible, to avoid an accidentally broken test breaking things > for other tests. I normally try and use @BeforeClass only for things > that must be initialized once or are really expensive to initialize. To > me, @BeforeClass indicates a departure from the ideal test process which > is @Before, @Test, @After. > > Anyway, I can change this if you insist. > > Thanks, > Omair > Okay, fair enough. I don't insist, go on and push. Thanks, -- Andrew A From jvanek at icedtea.classpath.org Mon May 12 15:24:57 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Mon, 12 May 2014 15:24:57 +0000 Subject: /hg/icedtea-web: ALACA is now able to remember decisions. Message-ID: changeset c3fb4b493d78 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c3fb4b493d78 author: Jiri Vanek date: Mon May 12 17:24:34 2014 +0200 ALACA is now able to remember decisions. diffstat: ChangeLog | 59 +++ netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java | 26 +- netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java | 119 ++++-- netx/net/sourceforge/jnlp/resources/Messages.properties | 8 +- netx/net/sourceforge/jnlp/resources/Messages_cs.properties | 1 - netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 6 + netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java | 2 +- netx/net/sourceforge/jnlp/security/SecurityDialog.java | 5 +- netx/net/sourceforge/jnlp/security/SecurityDialogs.java | 45 ++- netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java | 84 ++++- netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java | 26 +- netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionStorage.java | 12 +- netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java | 63 ++- netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java | 24 +- netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java | 22 +- netx/net/sourceforge/jnlp/security/dialogs/MatchingALACAttributePanel.java | 165 ---------- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java | 16 +- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java | 14 +- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/MatchingALACAttributePanel.java | 133 ++++++++ netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java | 34 +- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningDialog.java | 65 --- netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningPanel.java | 25 +- tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java | 11 + tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java | 51 +- tests/netx/unit/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanelTest.java | 2 +- 25 files changed, 593 insertions(+), 425 deletions(-) diffs (truncated from 1831 to 500 lines): diff -r b19fe5f6a442 -r c3fb4b493d78 ChangeLog --- a/ChangeLog Mon May 12 09:59:34 2014 -0400 +++ b/ChangeLog Mon May 12 17:24:34 2014 +0200 @@ -1,3 +1,62 @@ +2014-05-12 Jiri Vanek + + ALACA is now able to remember decisions. + * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java: + moved columns in table. Inserted alaca between 0 and 1 + * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java: + Added handling of UNSET, fixed calls to (now) getAppletSecurityActions. + Shifted columns + * netx/net/sourceforge/jnlp/resources/Messages.properties: + (SUnsignedAllowedBefore) and (SUnsignedRejectedBefore) now handles date + (SAppletTitle) removed, was legacy + (APPEXTSECguiTableModelTableColumnActionUA) and + (APPEXTSECguiTableModelTableColumnActionMatchALACA) added. + * netx/net/sourceforge/jnlp/resources/Messages_cs.properties:(SAppletTitle) removed, was legacy + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java: Added (getLocalisedTimeStamp) + helper method. + * netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java: + Call to showMatchingALACAttributePanel dialogue now forwards whole file, not just title. + * netx/net/sourceforge/jnlp/security/SecurityDialog.java: First extras to + matchingAlaca retyped to JNLPFile + * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: MInor javadoc fixes. + (showMatchingALACAttributePanel) now have whole JNLP instead of just title. + Added handling of saved/saving value + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java: + made to recognize second record as alaca one. + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java: + unsignedAppletAction changed to appletSecurityActions + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionStorage.java: + Whole getMatchingItem family of methods get Integer id parameter, to recognize + which record is the one they care about. If id is null, then they return first + match, no meter of whether is "strong"(pernament) or week (just hint) + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java: + adapted to id in interface. Fixed bug with saving the entry. + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java: + Added handling of multiple actions, added column. + * netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java: + implemented the id change. + * netx/net/sourceforge/jnlp/security/dialogs/MatchingALACAttributePanel.java: + removed to apptrustwarningpanel + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java: + made ALCA dialog aware + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java: + added generalized impl for title handling. + * /netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/MatchingALACAttributePanel.java: + new class, derived from dialogs, now extending AppTrustWarningPanel + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java: + removed custom handling of title. Added minSize. Added usage of stored date in text + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningDialog.java: + removed, should be removed long ago when this dialogue was generalized. + * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningPanel.java: + removed custom handling of title. Added minSize. Added usage of stored date in text + * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActionsTest.java: + added test for iteration (testIterator) + * tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java: + adapted for need of id of attribute + * tests/netx/unit/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanelTest.java: + Adapted to dialog in constructor of UnsignedAppletTrustWarningPanel + + 2014-05-09 Andrew Azores * tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java: new test diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java --- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java Mon May 12 17:24:34 2014 +0200 @@ -48,7 +48,8 @@ public class UnsignedAppletActionTableModel extends AbstractTableModel { final UnsignedAppletActionStorageExtendedImpl back; - private final String[] columns = new String[]{Translator.R("APPEXTSECguiTableModelTableColumnAction"), + private final String[] columns = new String[]{Translator.R("APPEXTSECguiTableModelTableColumnActionUA"), + Translator.R("APPEXTSECguiTableModelTableColumnActionMatchALACA"), Translator.R("APPEXTSECguiTableModelTableColumnDateOfAction"), Translator.R("APPEXTSECguiTableModelTableColumnDocumentBase"), Translator.R("APPEXTSECguiTableModelTableColumnCodeBase"), @@ -79,21 +80,21 @@ return AppletSecurityActions.class; } if (columnIndex == 1) { - return Date.class; + return AppletSecurityActions.class; } if (columnIndex == 2) { - return UrlRegEx.class; + return Date.class; } if (columnIndex == 3) { return UrlRegEx.class; } if (columnIndex == 4) { - return String.class; + return UrlRegEx.class; } if (columnIndex == 5) { return String.class; } - return Object.class; + return Object.class; } @Override @@ -101,7 +102,7 @@ if (back.isReadOnly()) { return false; } - if (columnIndex == 1) { + if (columnIndex == 2) { return false; } if (columnIndex == 0) { @@ -118,18 +119,21 @@ UnsignedAppletActionEntry source = back.toArray()[rowIndex]; if (columnIndex == 0) { - return source.getUnsignedAppletAction(); + return source.getAppletSecurityActions().getUnsignedAppletAction(); } if (columnIndex == 1) { + return source.getAppletSecurityActions().getMatchingAlacaAction(); + } + if (columnIndex == 2) { return source.getTimeStamp(); } - if (columnIndex == 2) { + if (columnIndex == 3) { return source.getDocumentBase(); } - if (columnIndex == 3) { + if (columnIndex == 4) { return source.getCodeBase(); } - if (columnIndex == 4) { + if (columnIndex == 5) { return UnsignedAppletActionEntry.createArchivesString(source.getArchives()); } return null; @@ -146,7 +150,7 @@ int i = getRowCount()-1; String s = "\\Qhttp://localhost:80/\\E.*"; back.add(new UnsignedAppletActionEntry( - AppletSecurityActions.fromAction(ExecuteAppletAction.NEVER), + AppletSecurityActions.createDefault(), new Date(), new UrlRegEx(s), new UrlRegEx(s), diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java --- a/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java Mon May 12 17:24:34 2014 +0200 @@ -76,6 +76,7 @@ import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.runtime.Translator; +import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityActions; import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityLevel; import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction; import net.sourceforge.jnlp.security.appletextendedsecurity.ExtendedAppletSecurityHelp; @@ -187,7 +188,7 @@ public static String appletItemToCaption(UnsignedAppletActionEntry i, String caption) { return Translator.R("APPEXTSECguiPanelAppletInfoHederPart1", caption, i.getDocumentBase().getFilteredRegEx()) - + "\n (" + Translator.R("APPEXTSECguiPanelAppletInfoHederPart2", i.getUnsignedAppletAction(), DateFormat.getInstance().format(i.getTimeStamp())) + + "\n (" + Translator.R("APPEXTSECguiPanelAppletInfoHederPart2", i.getAppletSecurityActions().toString(), DateFormat.getInstance().format(i.getTimeStamp())) + "\n " + Translator.R("APPEXTSECguiTableModelTableColumnDocumentBase") + ": " + i.getDocumentBase().getFilteredRegEx() + "\n " + Translator.R("APPEXTSECguiTableModelTableColumnCodeBase") + ": " + i.getCodeBase().getFilteredRegEx() + "\n " + Translator.R("APPEXTSECguiTableModelTableColumnArchives") + ": " + UnsignedAppletActionEntry.createArchivesString(i.getArchives()); @@ -702,19 +703,20 @@ @Override public TableCellEditor getCellEditor(int row, int column) { int columnx = convertColumnIndexToModel(column); - if (columnx == 0) { + if (columnx == 0 || columnx == 1) { return new DefaultCellEditor(new JComboBox<>(new ExecuteAppletAction[] { ExecuteAppletAction.ALWAYS, ExecuteAppletAction.NEVER, ExecuteAppletAction.YES, - ExecuteAppletAction.NO })); + ExecuteAppletAction.NO, + ExecuteAppletAction.UNSET })); } - if (columnx == 2) { + if (columnx == 3) { column = convertColumnIndexToModel(column); row = convertRowIndexToModel(row); return new DefaultCellEditor(new MyTextField((UrlRegEx) (model.getValueAt(row, column)))); } - if (columnx == 3) { + if (columnx == 4) { column = convertColumnIndexToModel(column); row = convertRowIndexToModel(row); return new DefaultCellEditor(new MyTextField((UrlRegEx) (model.getValueAt(row, column)))); @@ -725,19 +727,19 @@ @Override public TableCellRenderer getCellRenderer(int row, int column) { int columnx = convertColumnIndexToModel(column); - if (columnx == 1) { + if (columnx == 2) { column = convertColumnIndexToModel(column); row = convertRowIndexToModel(row); return new UrlRegexCellRenderer.MyDateCellRenderer((Date) (model.getValueAt(row, column))); } - if (columnx == 2) { + if (columnx == 3) { if (!filterRegexesCheckBox.isSelected()) { column = convertColumnIndexToModel(column); row = convertRowIndexToModel(row); return new UrlRegexCellRenderer((UrlRegEx) (model.getValueAt(row, column))); } } - if (columnx == 3) { + if (columnx == 4) { if (!filterRegexesCheckBox.isSelected()) { column = convertColumnIndexToModel(column); row = convertRowIndexToModel(row); @@ -768,16 +770,18 @@ UnsignedAppletActionEntry[] items = currentModel.back.toArray(); if (askBeforeActionCheckBox.isSelected()) { List toBeDeleted = new ArrayList<>(); - for (int i = 0; i < items.length; i++) { - UnsignedAppletActionEntry unsignedAppletActionEntry = items[i]; - if (unsignedAppletActionEntry.getUnsignedAppletAction() == unsignedAppletAction) { - toBeDeleted.add(unsignedAppletActionEntry); + for (UnsignedAppletActionEntry unsignedAppletActionEntry : items) { + AppletSecurityActions actions = unsignedAppletActionEntry.getAppletSecurityActions(); + for (int j = 0; j < actions.getRealCount(); j++) { + ExecuteAppletAction action = actions.getAction(j); + if (action == unsignedAppletAction) { + toBeDeleted.add(unsignedAppletActionEntry); + } } - } String s = Translator.R("APPEXTSECguiPanelConfirmDeletionOf", toBeDeleted.size()) + ": \n"; - for (int i = 0; i < toBeDeleted.size(); i++) { - s += appletItemToCaption(toBeDeleted.get(i), " ") + "\n"; + for (UnsignedAppletActionEntry toBeDeleted1 : toBeDeleted) { + s += appletItemToCaption(toBeDeleted1, " ") + "\n"; } int a = JOptionPane.showConfirmDialog(this, s); if (a != JOptionPane.OK_OPTION) { @@ -892,10 +896,10 @@ } } - private abstract static class MyCommonSorter extends RowFilter { - - + private abstract static class MyCommonSorter extends RowFilter { + } + private static final class ByPermanencyFilter extends TableRowSorter { private static final class ShowAll extends MyCommonSorter { @@ -910,56 +914,87 @@ @Override public boolean include(Entry entry) { - ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0); - return (o.equals(ExecuteAppletAction.ALWAYS) || o.equals(ExecuteAppletAction.NEVER)); + for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) { + ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i); + if (o.equals(ExecuteAppletAction.ALWAYS) || o.equals(ExecuteAppletAction.NEVER)) { + return true; + } + } + return false; } } private static final class ShowPermanentA extends MyCommonSorter { + @Override public boolean include(Entry entry) { - ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0); - return (o.equals(ExecuteAppletAction.ALWAYS)); + for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) { + ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i); + if (o.equals(ExecuteAppletAction.ALWAYS)) { + return true; + } + } + return false; + } + + } + + private static final class ShowPermanentN extends MyCommonSorter { + + @Override + public boolean include(Entry entry) { + for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) { + ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i); + if (o.equals(ExecuteAppletAction.NEVER)) { + return true; + } + } + return false; } } - private static final class ShowPermanentN extends MyCommonSorter { + private static final class ShowTemporarilyDecisions extends MyCommonSorter { @Override public boolean include(Entry entry) { - ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0); - return (o.equals(ExecuteAppletAction.NEVER)); + for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) { + ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i); + if (o.equals(ExecuteAppletAction.YES) || o.equals(ExecuteAppletAction.NO)) { + return true; + } + } + return false; } } - private static final class ShowTemporarilyDecisions extends MyCommonSorter { + private static final class ShowHasChosenYes extends MyCommonSorter { @Override public boolean include(Entry entry) { - ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0); - return (o.equals(ExecuteAppletAction.YES) || o.equals(ExecuteAppletAction.NO)); + for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) { + ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i); + if (o.equals(ExecuteAppletAction.YES)) { + return true; + } + } + return false; } + } - private static final class ShowHasChosenYes extends MyCommonSorter { + private static final class ShowHasChosenNo extends MyCommonSorter { @Override public boolean include(Entry entry) { - ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0); - return (o.equals(ExecuteAppletAction.YES)); + for (int i = 0; i < AppletSecurityActions.REMEMBER_COLUMNS_COUNT; i++) { + ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), i); + if (o.equals(ExecuteAppletAction.NO)) { + return true; + } + } + return false; } - - - } - private static final class ShowHasChosenNo extends MyCommonSorter { - - @Override - public boolean include(Entry entry) { - ExecuteAppletAction o = (ExecuteAppletAction) entry.getModel().getValueAt(entry.getIdentifier(), 0); - return (o.equals(ExecuteAppletAction.NO)); - } - } public static final ShowAll showAll = new ShowAll(); public static final ShowPermanents showPermanents = new ShowPermanents(); diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon May 12 17:24:34 2014 +0200 @@ -293,15 +293,14 @@ SRememberCodebase=For site {0} SUnsignedSummary=An unsigned Java application wants to run SUnsignedDetail=An unsigned application from the following location wants to run:
  {0}
The page which made the request was:
  {1}

It is recommended you only run applications from sites you trust. -SUnsignedAllowedBefore=You have accepted this applet previously. -SUnsignedRejectedBefore=You have rejected this applet previously. +SUnsignedAllowedBefore=You have accepted this applet previously - ({0}). +SUnsignedRejectedBefore=You have rejected this applet previously - ({0}). SUnsignedQuestion=Allow the applet to run? SPartiallySignedSummary=Only parts of this application code are signed. SPartiallySignedDetail=This application contains both signed and unsigned code. While signed code is safe if you trust the provider, unsigned code may imply code outside of the trusted provider's control. SPartiallySignedQuestion=Do you wish to proceed and run this application anyway? SAuthenticationPrompt=The {0} server at {1} is requesting authentication. It says "{2}" SJNLPFileIsNotSigned=This application contains a digital signature in which the launching JNLP file is not signed. -SAppletTitle=Applet title: {0} STrustedOnlyAttributeFailure=This application specifies Trusted-only as True in its Manifest. {0} and requests permission level: {1}. This is not allowed. STOAsignedMsgFully = The applet is fully signed STOAsignedMsgAndSandbox = The applet is fully signed and sandboxed @@ -820,7 +819,8 @@ APPEXTSECunsignedAppletActionNo=This applet was visited and denied APPEXTSECunsetAppletAction=This applet has not yet asked for this action APPEXTSECControlPanelExtendedAppletSecurityTitle=Extended applet security -APPEXTSECguiTableModelTableColumnAction=Action +APPEXTSECguiTableModelTableColumnActionUA=Unsigned applet Action +APPEXTSECguiTableModelTableColumnActionMatchALACA=Library Action APPEXTSECguiTableModelTableColumnDateOfAction=Date of action APPEXTSECguiTableModelTableColumnDocumentBase=Document-base APPEXTSECguiTableModelTableColumnCodeBase=Code-base diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/resources/Messages_cs.properties --- a/netx/net/sourceforge/jnlp/resources/Messages_cs.properties Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages_cs.properties Mon May 12 17:24:34 2014 +0200 @@ -297,7 +297,6 @@ SPartiallySignedQuestion=Chcete p\u0159esto pokra\u010dovat a spustit aplikaci? SAuthenticationPrompt=Server {0} na adrese {1} vy\u017eaduje ov\u011b\u0159en\u00ed. Zpr\u00e1va: \u201e{2}\u201c SJNLPFileIsNotSigned=Tato aplikace obsahuje digit\u00e1ln\u00ed podpis, v r\u00e1mci kter\u00e9ho v\u0161ak nen\u00ed podeps\u00e1n spou\u0161t\u011bn\u00fd soubor JNLP. -SAppletTitle=N\u00e1zev apletu: {0} STrustedOnlyAttributeFailure=Element \u201etrusted-only\u201c v manifestu aplikace m\u00e1 hodnotu true. {0} a po\u017eaduje n\u00e1sleduj\u00edc\u00ed \u00farove\u0148 opr\u00e1vn\u011bn\u00ed: {1}. To nen\u00ed dovoleno. STOAsignedMsgFully= Aplet je kompletn\u011b podeps\u00e1n. STOAsignedMsgAndSandbox= Aplet je kompletn\u011b podeps\u00e1n a b\u011b\u017e\u00ed v izolovan\u00e9m prostoru (sandbox). diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Mon May 12 17:24:34 2014 +0200 @@ -31,7 +31,9 @@ import java.security.KeyStore; import java.security.Policy; import java.security.Security; +import java.text.DateFormat; import java.text.MessageFormat; +import java.util.Date; import java.util.List; import java.util.ResourceBundle; @@ -638,6 +640,10 @@ return "Missing resource: " + key; } } + + public static String getLocalisedTimeStamp(Date timestamp) { + return DateFormat.getInstance().format(timestamp); + } /** * Returns the localized resource string using the specified arguments. diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java --- a/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Mon May 12 17:24:34 2014 +0200 @@ -325,7 +325,7 @@ } } } - boolean a = SecurityDialogs.showMatchingALACAttributePanel(file.getTitle(), documentBase, usedUrls); + boolean a = SecurityDialogs.showMatchingALACAttributePanel(file, documentBase, usedUrls); if (!a) { throw new LaunchException("The application uses non-codebase resources, which do match its Application-Library-Allowable-Codebase Attribute, but was blocked from running by the user."); } else { diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/security/SecurityDialog.java --- a/netx/net/sourceforge/jnlp/security/SecurityDialog.java Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/security/SecurityDialog.java Mon May 12 17:24:34 2014 +0200 @@ -55,7 +55,7 @@ import net.sourceforge.jnlp.security.dialogs.AppletWarningPane; import net.sourceforge.jnlp.security.dialogs.CertWarningPane; import net.sourceforge.jnlp.security.dialogs.CertsInfoPane; -import net.sourceforge.jnlp.security.dialogs.MatchingALACAttributePanel; +import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.MatchingALACAttributePanel; import net.sourceforge.jnlp.security.dialogs.MissingALACAttributePanel; import net.sourceforge.jnlp.security.dialogs.MissingPermissionsAttributePanel; import net.sourceforge.jnlp.security.dialogs.MoreInfoPane; @@ -63,6 +63,7 @@ import net.sourceforge.jnlp.security.dialogs.SecurityDialogPanel; import net.sourceforge.jnlp.security.dialogs.SingleCertInfoPane; import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningDialog; +import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel; import net.sourceforge.jnlp.util.ImageResources; import net.sourceforge.jnlp.util.ScreenFinder; import net.sourceforge.jnlp.util.logging.OutputController; @@ -325,7 +326,7 @@ else if (dialogType == DialogType.MISSING_ALACA) panel = new MissingALACAttributePanel(this, (String) extras[0], (String) extras[1], (String) extras[2]); else if (dialogType == DialogType.MATCHING_ALACA) - panel = new MatchingALACAttributePanel(this, (String) extras[0], (String) extras[1], (String) extras[2]); + panel = AppTrustWarningDialog.matchingAlaca(this, (JNLPFile) extras[0], (String) extras[1], (String) extras[2]); add(panel, BorderLayout.CENTER); } diff -r b19fe5f6a442 -r c3fb4b493d78 netx/net/sourceforge/jnlp/security/SecurityDialogs.java --- a/netx/net/sourceforge/jnlp/security/SecurityDialogs.java Mon May 12 09:59:34 2014 -0400 +++ b/netx/net/sourceforge/jnlp/security/SecurityDialogs.java Mon May 12 17:24:34 2014 +0200 @@ -54,9 +54,13 @@ import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.runtime.JNLPClassLoader.SecurityDelegate; import net.sourceforge.jnlp.runtime.JNLPRuntime; +import net.sourceforge.jnlp.security.appletextendedsecurity.AppletSecurityActions; import net.sourceforge.jnlp.security.appletextendedsecurity.ExecuteAppletAction; +import net.sourceforge.jnlp.security.appletextendedsecurity.UnsignedAppletTrustConfirmation; +import static net.sourceforge.jnlp.security.appletextendedsecurity.UnsignedAppletTrustConfirmation.getStoredAction; import net.sourceforge.jnlp.security.dialogs.apptrustwarningpanel.AppTrustWarningPanel.AppSigningWarningAction; import net.sourceforge.jnlp.util.UrlUtils; +import net.sourceforge.jnlp.util.logging.OutputController; /** *

@@ -167,6 +171,7 @@ * Shows a warning dialog for when a plugin applet is unsigned. * This is used with 'high-security' setting. * + * @param file the file to be base as information source for this dialogue * @return true if permission was granted by the user, false otherwise. */ From jvanek at redhat.com Mon May 12 15:28:58 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Mon, 12 May 2014 17:28:58 +0200 Subject: [rfc][icedtea-web] multiple remember actions In-Reply-To: <535FFA55.8030107@redhat.com> References: <5358CD17.6090501@redhat.com> <535FFA55.8030107@redhat.com> Message-ID: <5370E8BA.2020103@redhat.com> On 04/29/2014 09:15 PM, Andrew Azores wrote: > On 04/24/2014 04:36 AM, Jiri Vanek wrote: >> Hi! >> >> Based on previous two enhancements - [rfc][icedtea-web] replace jlabel by jeditorpane and Re: >> [rfc][icedtea-web] conditional disabling of manifes tattributes >> >> this is enabling to save matching alaca action >> - benefits: one file, one lock , one id, one table, one metadata and unlimited number of actions >> - drawbacks - suspiciously simply, maybe not so transparent, once more columns will be added, new >> editing >> >> The patch grown due to changed signatures of methods. I will try to summarize: >> >> >> * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletActionTableModel.java" >> - original columnrnemaed to "Unsigned applet action" added "Library action" column >> - the value of those two columns is get from source.getAppletSecurityActions().* methods >> >> * netx/net/sourceforge/jnlp/controlpanel/UnsignedAppletsTrustingListPanel.java >> - adapted "toString" method >> - added unset to list of combobox values for first two columns cell editors >> - filter of "byValue" are now selecting via *or* - if any of action have the desired value, then >> it is true > > See AppletSecurityActions comment about Iterable - if that advice is taken then it can be used here > already. > > Rather than: > + boolean r = false; > + for (int i = 0; i < AppletSecurityActions.REMEBER_COLUMNS_COUNT; i++) { > + ExecuteAppletAction o = (ExecuteAppletAction) > entry.getModel().getValueAt(entry.getIdentifier(), i); > + r = r || (o.equals(ExecuteAppletAction.ALWAYS) || > o.equals(ExecuteAppletAction.NEVER)); > + } > + return r; > > perhaps: > > + for (int i = 0; i < AppletSecurityActions.REMEBER_COLUMNS_COUNT; i++) { > + ExecuteAppletAction o = (ExecuteAppletAction) > entry.getModel().getValueAt(entry.getIdentifier(), i); > + if (o.equals(ExecuteAppletAction.ALWAYS) || o.equals(ExecuteAppletAction.NEVER)) { > + return true; > + } > + } > + return false; > > but this is mostly just stylistic. In the first case the parens around the second disjunction are > also not really needed :) > >> >> >> * netx/net/sourceforge/jnlp/resources/Messages.properties" >> - enabled date in SUnsignedAllowedBefore and SUnsignedRejectedBefore - thsi was actualy doone in >> ocde. I do not know why this was forgotten) >> - removed SAppletTitle - it was nasty :) >> - added nnew name of column 1 and new name fornew column 2 > > "Missing Resource: APPEXTSECguiTableModelTableColumnActionUB" ? > >> >> * netx/net/sourceforge/jnlp/resources/Messages_cs.properties >> also removed SAppletTitle >> >> * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java >> - added stup for return of international date (jnlpruntime is holding the locales, thats why it >> its here) > > There is a trailing semicolon after the closing brace on this new function > >> >> >> * netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java >> - showMatchingALACAttributePanel is receiving whole file (for purposes of reuse in reusable >> dialogue)) instead of just file.title >> >> * netx/net/sourceforge/jnlp/security/SecurityDialogs.java few minor warning-clean up which I could >> not look onto. >> - showMatchingALACAttributePanel - to get file instead file.title and adapted to new dialogue >> - checking action for always/never >> - using text for yes/no >> - getting response >> - storing response >> >> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/AppletSecurityActions.java >> - allowed public access via set(int id) and get(int id) - needed for generalization > > "Remember" misspelled as "Remeber" in constant name. > > Can this class be made to implement Iterable so getRealCount() + getAction(int) isn't the only way? > >> >> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionEntry.java >> - changed signatures of : >> ExecuteAppletAction getUnsignedAppletAction() -> AppletSecurityActions getAppletSecurityActions() >> - and >> setUnsignedAppletAction(ExecuteAppletAction unsignedAppletAction) -> >> etAppletSecurityActions(AppletSecurityActions actions) >> >> >> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletActionStorage.java >> - added ID parameter to >> getMatchingItem >> getMatchingItemByDocumentBase >> getMatchingItemByCodeBase >> getMatchingItemByBases >> - this is a bit unhappy. But th e mechanism needs to find strong value first. So it mus know >> whichone it is looking fr :( so we cannot jsut return Actions and select later ) >> >> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/UnsignedAppletTrustConfirmation.java >> - get and forward the ID parameter >> - separated get action and get entry logic >> - one bug fix - when somebody have visited applet, and have not clicked remember, and later he >> selected remember for codebase, then the "codebase" change never propagated. Now it does. >> - forwarding correct id into depth >> >> >> * >> netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageExtendedImpl.java >> >> - used the *or* action as in table >> - made aware of columns abstraction >> >> * netx/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImpl.java >> - again propagated ID > > What is the use case for a null ID? IOW why Integer and not just int? It seems to me that in other > places, the ID really just is an int as well... > >> >> * netx/net/sourceforge/jnlp/security/dialogs/MatchingALACAttributePanel.java >> - moved to new impl into apptrustwarningpanel with other similar panels >> >> * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningDialog.java: >> - added shower for MatchingAlaca >> >> * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/AppTrustWarningPanel.java >> - added pluginbridge back - maybe best to o here is to abstract getTitle() into jnlpfile. But as >> naother work... >> >> * netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/MatchingALACAttributePanel.java: >> - actual extension of AppTrustWarningPanel for matching alaca >> - getAppletTitle is emty, as it is handle in plain text >> >> * >> netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/PartiallySignedAppTrustWarningPanel.java >> >> - removed duplicate code of getAppletTitle >> - shown the date of action > > With the changed main text, the window is no longer tall enough on my setup. The last line of text > has the bottom of it clipped off because it's too tall. I guess this is actually a problem with the > parent class not setting its window size correctly. > >> >> * >> netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningDialog.java >> - removed - this is actually bug. It should be removed when generalized "remember" dialogue came in >> >> >> * >> netx/net/sourceforge/jnlp/security/dialogs/apptrustwarningpanel/UnsignedAppletTrustWarningPanel.java >> - shown the date of action >> >> >> * >> tests/netx/unit/net/sourceforge/jnlp/security/appletextendedsecurity/impl/UnsignedAppletActionStorageImplTest.java >> >> - tests adapted to new ID style >> - well righ now I realised the high-level of tests of new logic are missing (I added the test >> datat but forgot to add also testcases ) - well wil be added in next round >> >> >> Thanx! >> >> J. > > There are a few spots with bad formatting eg one too many or one too few spaces of indent: > - UnsignedAppletActionTableModel > - AppletSecurityActions > - MatchingALACAttributePanel > > please just "Fix Formatting" on at least these files before push. > > The "Unsigned action" classes should really be renamed now, and you even have a comment to this > effect in UnsignedAppletActionEntry. Can this also be done? Maybe just as a separate changeset, but > I do think it should be done. > > Overall okay I think, I can't find much to actually complain about in this one other than style > nitpicks :D Thank you! Pushed. Withall hints fixed (yah, also the iterable ;) I explained the id change in Changelog, It shdould be ok also for you. I'm now going to refactor all the names. Do you have any preferences on this? J. From omajid at icedtea.classpath.org Mon May 12 15:36:58 2014 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Mon, 12 May 2014 15:36:58 +0000 Subject: /hg/icedtea-web: Reduce URLConnection knowledge in CacheEntry Message-ID: changeset d26f2fbaaf0a in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d26f2fbaaf0a author: Omair Majid date: Mon May 12 11:30:47 2014 -0400 Reduce URLConnection knowledge in CacheEntry The CacheEntry class is doing a bit too much. The knowledge of URLConnection is especially troubling, since the metadata for a CacheEntry doesn't really match the URL in the presence of compression. Reduce how much CacheEntry knows about URLConnection and rely on the caller to supply appropriate information. 2014-05-12 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Use constants for strings. (initialize): Remove. (getRemoteContentLength, setRemoteContentLength, (getLastModified, setLastModified, getLongKey, setLongKey): New method. * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java: New file. * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (initializeResource, downloadResource): Use CacheEntry.setRemoteContentLength and CacheEntry.setLastModified instead of CacheEntry.initialize. diffstat: ChangeLog | 14 + netx/net/sourceforge/jnlp/cache/CacheEntry.java | 67 ++- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 17 +- tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java | 179 ++++++++++ 4 files changed, 251 insertions(+), 26 deletions(-) diffs (392 lines): diff -r c3fb4b493d78 -r d26f2fbaaf0a ChangeLog --- a/ChangeLog Mon May 12 17:24:34 2014 +0200 +++ b/ChangeLog Mon May 12 11:30:47 2014 -0400 @@ -1,3 +1,17 @@ +2014-05-12 Omair Majid + + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Use + constants for strings. + (initialize): Remove. + (getRemoteContentLength, setRemoteContentLength, getLastModified) + (setLastModified, getLongKey, setLongKey): New method. + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java: New + file. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java + (initializeResource, downloadResource): Use + CacheEntry.setRemoteContentLength and CacheEntry.setLastModified instead + of CacheEntry.initialize. + 2014-05-12 Jiri Vanek ALACA is now able to remember decisions. diff -r c3fb4b493d78 -r d26f2fbaaf0a netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 12 17:24:34 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 12 11:30:47 2014 -0400 @@ -23,7 +23,6 @@ import java.net.*; import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.runtime.*; import net.sourceforge.jnlp.util.*; /** @@ -34,6 +33,10 @@ */ public class CacheEntry { + private static final String KEY_CONTENT_LENGTH = "content-length"; + private static final String KEY_LAST_MODIFIED = "last-modified"; + private static final String KEY_LAST_UPDATED = "last-updated"; + /** the remote resource location */ private URL location; @@ -61,18 +64,6 @@ } /** - * Initialize the cache entry data from a connection to the - * remote resource (does not store data). - */ - void initialize(URLConnection connection) { - long modified = connection.getLastModified(); - long length = connection.getContentLength(); // an int - - properties.setProperty("content-length", Long.toString(length)); - properties.setProperty("last-modified", Long.toString(modified)); - } - - /** * Returns the remote location this entry caches. */ public URL getLocation() { @@ -85,11 +76,7 @@ * @return */ public long getLastUpdated() { - try { - return Long.parseLong(properties.getProperty("last-updated")); - } catch (Exception ex) { - return 0; - } + return getLongKey(KEY_LAST_UPDATED); } /** @@ -98,7 +85,35 @@ * @param updatedTime */ public void setLastUpdated(long updatedTime) { - properties.setProperty("last-updated", Long.toString(updatedTime)); + setLongKey(KEY_LAST_UPDATED, updatedTime); + } + + public long getRemoteContentLength() { + return getLongKey(KEY_CONTENT_LENGTH); + } + + public void setRemoteContentLength(long length) { + setLongKey(KEY_CONTENT_LENGTH, length); + } + + public long getLastModified() { + return getLongKey(KEY_LAST_MODIFIED); + } + + public void setLastModified(long modifyTime) { + setLongKey(KEY_LAST_MODIFIED, modifyTime); + } + + private long getLongKey(String key) { + try { + return Long.parseLong(properties.getProperty(key)); + } catch (Exception ex) { + return 0; + } + } + + private void setLongKey(String key, long value) { + properties.setProperty(key, Long.toString(value)); } /** @@ -117,7 +132,7 @@ try { long remoteModified = lastModified; - long cachedModified = Long.parseLong(properties.getProperty("last-modified")); + long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); if (remoteModified > 0 && remoteModified <= cachedModified) return true; @@ -137,13 +152,13 @@ * @return true if the resource is in the cache */ public boolean isCached() { - File localFile = CacheUtil.getCacheFile(location, version); + File localFile = getCacheFile(); if (!localFile.exists()) return false; try { long cachedLength = localFile.length(); - long remoteLength = Long.parseLong(properties.getProperty("content-length", "-1")); + long remoteLength = Long.parseLong(properties.getProperty(KEY_CONTENT_LENGTH, "-1")); if (remoteLength >= 0 && cachedLength != remoteLength) return false; @@ -157,6 +172,13 @@ } /** + * Seam for testing + */ + File getCacheFile() { + return CacheUtil.getCacheFile(location, version); + } + + /** * Save the current information for the cache entry. */ protected void store() { @@ -183,4 +205,5 @@ protected void unlock() { CacheUtil.unlockFile(properties); } + } diff -r c3fb4b493d78 -r d26f2fbaaf0a netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Mon May 12 17:24:34 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Mon May 12 11:30:47 2014 -0400 @@ -695,6 +695,9 @@ byte buf[] = new byte[1024]; int rlen; + long contentLength = con.getContentLengthLong(); + long lastModified = con.getLastModified(); + InputStream in = new BufferedInputStream(con.getInputStream()); OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.downloadVersion); @@ -710,11 +713,16 @@ if (con instanceof HttpURLConnection) ((HttpURLConnection) con).disconnect(); + if (packgz || gzip) { + // TODO why not set this otherwise? + downloadEntry.setRemoteContentLength(contentLength); + downloadEntry.setLastModified(lastModified); + } + /* * If the file was compressed, uncompress it. */ if (packgz) { - downloadEntry.initialize(con); GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil .getCacheFile(downloadLocation, resource.downloadVersion))); InputStream inputStream = new BufferedInputStream(gzInputStream); @@ -729,7 +737,6 @@ inputStream.close(); gzInputStream.close(); } else if (gzip) { - downloadEntry.initialize(con); GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil .getCacheFile(downloadLocation, resource.downloadVersion))); InputStream inputStream = new BufferedInputStream(gzInputStream); @@ -828,8 +835,10 @@ } // update cache entry - if (!current) - entry.initialize(connection); + if (!current) { + entry.setRemoteContentLength(connection.getContentLengthLong()); + entry.setLastModified(connection.getLastModified()); + } entry.setLastUpdated(System.currentTimeMillis()); entry.store(); diff -r c3fb4b493d78 -r d26f2fbaaf0a tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java Mon May 12 11:30:47 2014 -0400 @@ -0,0 +1,179 @@ +/* CacheEntryTest -- unit test for CacheEntry + Copyright (C) 2014 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.cache; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.file.Files; + +import net.sourceforge.jnlp.Version; + +import org.junit.Before; +import org.junit.Test; + +public class CacheEntryTest { + + /** A custom subclass that allows supplying a predefined cache file */ + static class TestCacheEntry extends CacheEntry { + private File cacheFile; + public TestCacheEntry(URL location, Version version, File cacheFile) { + super(location, version); + this.cacheFile = cacheFile; + } + @Override + protected File getCacheFile() { + return cacheFile; + } + } + + private URL url; + private Version version; + + @Before + public void setUp() throws MalformedURLException { + url = new URL("http://example.com/example.jar"); + version = new Version("1.0"); + } + + @Test + public void verifyLocationIsSame() { + CacheEntry entry = new TestCacheEntry(url, version, null); + assertEquals(url, entry.getLocation()); + } + + @Test + public void verifyLastModifiedIsSetCorrectly() { + long LAST_MODIFIED = 1000; + + CacheEntry entry = new TestCacheEntry(url, version, null); + entry.setLastModified(LAST_MODIFIED); + + assertEquals(LAST_MODIFIED, entry.getLastModified()); + } + + @Test + public void verifyLastUpdatedIsSetCorrectly() { + long LAST_UPDATED = 1000; + + CacheEntry entry = new TestCacheEntry(url, version, null); + entry.setLastUpdated(LAST_UPDATED); + + assertEquals(LAST_UPDATED, entry.getLastUpdated()); + } + + @Test + public void verifyContentLengthIsSetCorrectly() { + long CONTENT_LENGTH = 1000; + + CacheEntry entry = new TestCacheEntry(url, version, null); + entry.setRemoteContentLength(CONTENT_LENGTH); + + assertEquals(CONTENT_LENGTH, entry.getRemoteContentLength()); + } + + @Test + public void verifyNotCachedIfFileIsAbsent() { + File doesNotExist = new File("/foo/bar/baz/spam/eggs"); + + CacheEntry entry = new TestCacheEntry(url, version, doesNotExist); + + assertFalse(entry.isCached()); + } + + @Test + public void verifyNotCachedIfContentLengthsDiffer() throws IOException { + File cachedFile = createCacheFile("Foo"); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(10000); + + assertFalse(entry.isCached()); + } + + @Test + public void verifyCachedIfContentLengthsAreSame() throws IOException { + String contents = "Foo"; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(contents.length()); + + assertTrue(entry.isCached()); + } + + @Test + public void verifyCurrentWhenCacheEntryHasSameTimeStamp() throws IOException { + long lastModified = 10; + String contents = "Foo"; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(contents.length()); + entry.setLastModified(lastModified); + + assertTrue(entry.isCurrent(lastModified)); + } + + @Test + public void verifyNotCurrentWhenRemoteContentIsNewer() throws IOException { + long oldTimeStamp = 10; + long newTimeStamp = 100; + String contents = "Foo"; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(contents.length()); + entry.setLastModified(oldTimeStamp); + + assertFalse(entry.isCurrent(newTimeStamp)); + } + + protected File createCacheFile(String contents) throws IOException { + File cachedFile = File.createTempFile("CacheEntryTest", null); + Files.write(cachedFile.toPath(), contents.getBytes()); + cachedFile.deleteOnExit(); + return cachedFile; + } + +} From aazores at icedtea.classpath.org Mon May 12 15:42:17 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Mon, 12 May 2014 15:42:17 +0000 Subject: /hg/icedtea-web: Fix commit dates in ChangeLog Message-ID: changeset 461840384bee in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=461840384bee author: Andrew Azores date: Mon May 12 11:42:08 2014 -0400 Fix commit dates in ChangeLog diffstat: ChangeLog | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (18 lines): diff -r d26f2fbaaf0a -r 461840384bee ChangeLog --- a/ChangeLog Mon May 12 11:30:47 2014 -0400 +++ b/ChangeLog Mon May 12 11:42:08 2014 -0400 @@ -71,12 +71,12 @@ Adapted to dialog in constructor of UnsignedAppletTrustWarningPanel -2014-05-09 Andrew Azores +2014-05-12 Andrew Azores * tests/netx/unit/net/sourceforge/jnlp/util/FileUtilsTest.java: new test class for FileUtils -2014-05-09 Andrew Azores +2014-05-12 Andrew Azores * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (urlToPath) use StringBuilder, not StringBuffer From omajid at icedtea.classpath.org Mon May 12 16:59:21 2014 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Mon, 12 May 2014 16:59:21 +0000 Subject: /hg/icedtea-web: Fix caching of compressed content Message-ID: changeset d150e4453b0b in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d150e4453b0b author: Omair Majid date: Mon May 12 12:55:21 2014 -0400 Fix caching of compressed content To decide if an item is cached, icedtea-web does a HEAD request and compares the Content-Length with the size of the cache entry. This works fine when the jars are not compressed. When the jars are fetched compressed and then uncompressed on disk, there is a mismatch between the cache entry size and the remote Content-Length and icedtea-web decides the content is not cached. Store the original (compressed) size in the cache info file and use that instead of the actual file size in the size-comparison 2014-05-12 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Add KEY_CONTENT_ORIGINAL_LENGTH, LENGTH_UNKNOWN. (getOriginalContentLength, setOriginalContentLength) (getLongKey(String,long)): New methods. (isCached): Check if the original content length is recorded and use it, if available, as the content length. * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (downloadResource): If the content was compressed, store original content length in the cache entry. * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java (testOriginalContentLengthIsSetCorrectly) (verifyCachedIfOriginalContentLengthsAreSame): New method. diffstat: ChangeLog | 15 ++++ netx/net/sourceforge/jnlp/cache/CacheEntry.java | 33 +++++++++- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 3 + tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java | 23 ++++++ 4 files changed, 73 insertions(+), 1 deletions(-) diffs (143 lines): diff -r 461840384bee -r d150e4453b0b ChangeLog --- a/ChangeLog Mon May 12 11:42:08 2014 -0400 +++ b/ChangeLog Mon May 12 12:55:21 2014 -0400 @@ -1,3 +1,18 @@ +2014-05-12 Omair Majid + + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Add + KEY_CONTENT_ORIGINAL_LENGTH and LENGTH_UNKNOWN. + (getOriginalContentLength, setOriginalContentLength) + (getLongKey(String,long)): New methods. + (isCached): Check if the original content length is recorded and use it, + if available, as the content length. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java (downloadResource): + If the content was compressed, store original content length in the cache + entry. + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java + (testOriginalContentLengthIsSetCorrectly) + (verifyCachedIfOriginalContentLengthsAreSame): New method. + 2014-05-12 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Use diff -r 461840384bee -r d150e4453b0b netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 12 11:42:08 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 12 12:55:21 2014 -0400 @@ -33,7 +33,10 @@ */ public class CacheEntry { + public static final long LENGTH_UNKNOWN = -1; + private static final String KEY_CONTENT_LENGTH = "content-length"; + private static final String KEY_CONTENT_ORIGINAL_LENGTH = "content-original-length"; private static final String KEY_LAST_MODIFIED = "last-modified"; private static final String KEY_LAST_UPDATED = "last-updated"; @@ -96,6 +99,24 @@ setLongKey(KEY_CONTENT_LENGTH, length); } + /** + * Return the length of the original content that was cached. May be different + * from the actual cache entry size due to (de)compression. + * + * @return the content length or {@link #LENGTH_UNKNOWN} if unknown. + */ + public long getOriginalContentLength() { + return getLongKey(KEY_CONTENT_ORIGINAL_LENGTH, LENGTH_UNKNOWN); + } + + /** + * Set the length of the original content that was cached. May be different + * from the actual cache entry size due to (de)compression. + */ + public void setOriginalContentLength(long contentLength) { + setLongKey(KEY_CONTENT_ORIGINAL_LENGTH, contentLength); + } + public long getLastModified() { return getLongKey(KEY_LAST_MODIFIED); } @@ -105,10 +126,15 @@ } private long getLongKey(String key) { + return getLongKey(key, 0); + } + + private long getLongKey(String key, long defaultValue) { try { return Long.parseLong(properties.getProperty(key)); } catch (Exception ex) { - return 0; + OutputController.getLogger().log(ex); + return defaultValue; } } @@ -158,6 +184,11 @@ try { long cachedLength = localFile.length(); + String originalLength = properties.getProperty(KEY_CONTENT_ORIGINAL_LENGTH); + if (originalLength != null) { + cachedLength = Long.parseLong(originalLength); + } + long remoteLength = Long.parseLong(properties.getProperty(KEY_CONTENT_LENGTH, "-1")); if (remoteLength >= 0 && cachedLength != remoteLength) diff -r 461840384bee -r d150e4453b0b netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Mon May 12 11:42:08 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Mon May 12 12:55:21 2014 -0400 @@ -757,6 +757,9 @@ } if (!downloadLocationFile.getPath().equals(finalFile.getPath())) { + origEntry.setOriginalContentLength(downloadEntry.getRemoteContentLength()); + origEntry.store(); + downloadEntry.markForDelete(); downloadEntry.store(); } diff -r 461840384bee -r d150e4453b0b tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java Mon May 12 11:42:08 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java Mon May 12 12:55:21 2014 -0400 @@ -113,6 +113,16 @@ } @Test + public void verifyOriginalContentLengthIsSetCorrectly() { + long ORIGINAL_CONTENT_LENGTH = 1000; + + CacheEntry entry = new CacheEntry(url, version); + entry.setOriginalContentLength(ORIGINAL_CONTENT_LENGTH); + + assertEquals(ORIGINAL_CONTENT_LENGTH, entry.getOriginalContentLength()); + } + + @Test public void verifyNotCachedIfFileIsAbsent() { File doesNotExist = new File("/foo/bar/baz/spam/eggs"); @@ -143,6 +153,19 @@ } @Test + public void verifyCachedIfOriginalContentLengthsAreSame() throws IOException { + String contents = "FooDECOMPRESSED"; + long compressedLength = 5; + File cachedFile = createCacheFile(contents); + + CacheEntry entry = new TestCacheEntry(url, version, cachedFile); + entry.setRemoteContentLength(compressedLength); + entry.setOriginalContentLength(compressedLength); + + assertTrue(entry.isCached()); + } + + @Test public void verifyCurrentWhenCacheEntryHasSameTimeStamp() throws IOException { long lastModified = 10; String contents = "Foo"; From omajid at redhat.com Mon May 12 19:21:40 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 15:21:40 -0400 Subject: [icedtea-web] RFC: Make 'make check' work under OpenJDK 8 Message-ID: <20140512192139.GI2138@redhat.com> Hi, The class CertAndKeyGen moved between OpenJDK 7 and OpenJDK 8. The attached patch makes the code in icedtea-web use reflection to find and use the right class. After this patch, a 'make clean && make && make check && make install' works with OpenJDK 8. Okay to push? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java b/tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java --- a/tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java +++ b/tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java @@ -25,17 +25,24 @@ package net.sourceforge.jnlp.tools; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.security.CodeSigner; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; import java.security.PrivateKey; +import java.security.SignatureException; import java.security.Timestamp; import java.security.cert.CertPath; +import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Date; import sun.security.x509.AlgorithmId; -import sun.security.x509.CertAndKeyGen; import sun.security.x509.CertificateAlgorithmId; import sun.security.x509.CertificateIssuerName; import sun.security.x509.CertificateSerialNumber; @@ -72,13 +79,10 @@ // KeyTool#doGenKeyPair X500Name x500Name = new X500Name(dname); - CertAndKeyGen keypair = new CertAndKeyGen(keyAlgName, sigAlgName); + KeyPair keyPair = new KeyPair(keyAlgName, sigAlgName, keysize); + PrivateKey privKey = keyPair.getPrivateKey(); - keypair.generate(keysize); - PrivateKey privKey = keypair.getPrivateKey(); - - X509Certificate oldCert = keypair.getSelfCertificate(x500Name, - notBefore, validity * 24L * 60L * 60L); + X509Certificate oldCert = keyPair.getSelfCertificate(x500Name, notBefore, validity); // KeyTool#doSelfCert byte[] encoded = oldCert.getEncoded(); @@ -142,4 +146,70 @@ Timestamp certTimestamp = new Timestamp(jarEntryCert.getNotBefore(), certPath); return new CodeSigner(certPath, certTimestamp); } + + /** + * A wrapper over JDK-internal CertAndKeyGen Class. + *

+ * This is an internal class whose package changed between OpenJDK 7 and 8. + * Use reflection to access the right thing. + */ + public static class KeyPair { + + private /* CertAndKeyGen */ Object keyPair; + + public KeyPair(String keyAlgName, String sigAlgName, int keySize) throws NoSuchAlgorithmException, InvalidKeyException { + try { + // keyPair = new CertAndKeyGen(keyAlgName, sigAlgName); + Class certAndKeyGenClass = Class.forName(getCertAndKeyGenClass()); + Constructor constructor = certAndKeyGenClass.getDeclaredConstructor(String.class, String.class); + keyPair = constructor.newInstance(keyAlgName, sigAlgName); + + // keyPair.generate(keySize); + Method generate = certAndKeyGenClass.getMethod("generate", int.class); + generate.invoke(keyPair, keySize); + } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | + IllegalAccessException | IllegalArgumentException | InvocationTargetException certAndKeyGenClassError) { + throw new AssertionError("Unable to use CertAndKeyGen class", certAndKeyGenClassError); + } + } + + public PrivateKey getPrivateKey() { + try { + // return keyPair.getPrivateKey(); + Class klass = keyPair.getClass(); + Method method = klass.getMethod("getPrivateKey"); + return (PrivateKey) method.invoke(keyPair); + } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException error) { + throw new AssertionError(error); + } + } + + public X509Certificate getSelfCertificate(X500Name name, Date notBefore, long validityInDays) + throws InvalidKeyException, CertificateException, SignatureException, + NoSuchAlgorithmException, NoSuchProviderException { + try { + // return keyPair.getSelfCertificate(name, notBefore, validityInDays * 24L * 60L * 60L); + Class klass = keyPair.getClass(); + Method method = klass.getMethod("getSelfCertificate", X500Name.class, Date.class, long.class); + return (X509Certificate) method.invoke(keyPair, name, notBefore, validityInDays * 24L * 60L * 60L); + } catch (InvocationTargetException ite) { + throw new RuntimeException(ite.getCause()); + } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException error) { + throw new AssertionError(error); + } + } + + private String getCertAndKeyGenClass() { + String javaVersion = System.getProperty("java.version"); + String className = null; + if (javaVersion.startsWith("1.7")) { + className = "sun.security.x509.CertAndKeyGen"; + } else if (javaVersion.startsWith("1.8")) { + className = "sun.security.tools.keytool.CertAndKeyGen"; + } else { + throw new AssertionError("Unrecognized Java Version"); + } + return className; + } + } } From omajid at redhat.com Mon May 12 21:03:42 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 17:03:42 -0400 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <537083F2.6080003@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> Message-ID: <20140512210341.GK2138@redhat.com> Hi, * Jiri Vanek [2014-05-12 04:19]: > On 05/09/2014 11:55 PM, Omair Majid wrote: > >* jvanek at icedtea.classpath.org [2014-05-05 09:41]: > >>changeset e8b21e10ead6 in /hg/icedtea-web > >>details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e8b21e10ead6 > >>author: Jiri Vanek > >>date: Mon May 05 15:38:16 2014 +0200 > >> > >> Properly disconnect all connected http connections. > > > >When you are fixing code, please adjust surrounding code too. > ... > >There are lots of similar empty @param's in this changeset. Please fix them > >all. > > > Thank you for kick. > > This patch is fixing javadocs from mentioned push, and adds few more, mostly > javadoc, but also imports and non final -> final changes and <> operator. > where I hit it during cleaning. Please consider splitting this up into separate patches. These are touching a lot more code that I asked for. I am not sure I am prepared to review all this right now :) > > This patch have small overleap with Andrew's "[rfc][icedtea-web] > Resource/ResourceTracker clean up" and Your's urlconnection conn -> long > lastMOdified+long contentLength signature change I like some of the changes, and dislike some of the others. This is a bit of a personal preference, though. For example, I am strongly against code that looks like this: /** @return the timeout */ public long getTimeOut() { Because the comment adds absolutely nothing new to the code and just obscures things. In fact, it's dangerous because the next time the code is updated, the comment will not be. After a few changes, the comment will be entirely misleading an inaccurate. I strongly encourage you to only add comments when they are needed (e.g.: the code itself fails to explain something), and then make them actually useful. > +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 12 10:13:31 2014 +0200 > +import java.io.File; > +import java.net.URL; > +import net.sourceforge.jnlp.Version; > +import net.sourceforge.jnlp.util.PropertiesFile; > import net.sourceforge.jnlp.util.logging.OutputController; > + > import static net.sourceforge.jnlp.runtime.Translator.R; I think we have a convention of putting the static imports right next to the package statement and before any class-imports. > + * > + * @param connection connection on which to initialize resource > */ > + void initialize(long modified, long length) { The comment is already wrong! And this is _exactly_ why I prefer to avoid comments. They are so much full of noise that even you, the author, missed it. > + * @return URL of this location > public URL getLocation() { The comment pretty much re-iterates what the code already says: it returns a URL corresponding to the location. Without any input arguments, I already assume it's for the `this` object. Do we really need this comment? > + * @return when the item was updated > public long getLastUpdated() { Likewise. If you are going to add a comment here, perhaps you can make a note of the units (seconds)? But even better, just make it part of the method name. > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Mon May 12 10:13:31 2014 +0200 > + * @param u1 first url to compare > + * @param u2 second url to compare > + * @return whether the u1 and u2 points to same resource or not > */ > public static boolean urlEquals(URL u1, URL u2) { You know, this sounds exactly like a method that belongs in UrlUtils. > * Note: Because of how our caching system works, deleting jars of another javaws > * process is using them can be quite disasterous. Hence why Launcher creates lock files > * and we check for those by calling {@link #okToClearCache()} > + * @return if the cache could be cleared and was cleared s/@return if/@return true if/ > +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Mon May 12 10:13:31 2014 +0200 > /** the file */ > - private JNLPFile file; > + private final JNLPFile file; I see that you are making lots of fields final. I generally like that. Immutable objects are awesome because they can be shared safely across threads. On the other hand, I am not sure what the benefit of a class that has some fields non-final. One convention that I (personally) use is to use final in all fields when I explicitly want to mark a class as thread safe. When some fields are final and others are not, I just leave all fields as non-final. > /** > * Remove an Application Listener > + * @param listener toeb removed If you are going to write comments everywhere, at least try and make them as correct as you can. > + * Returns the jnlpfile on whic is this application based > + * @return LP file for this task. Same here :( Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From omajid at redhat.com Mon May 12 22:17:36 2014 From: omajid at redhat.com (Omair Majid) Date: Mon, 12 May 2014 18:17:36 -0400 Subject: [icedtea-web] RFC: clean up comments in JarFile Message-ID: <20140512221733.GM2138@redhat.com> Hi, I saw some references to jdk6 in JarFile and to me it read like it's saying that this wrapper is effectively making java.util.jar.JarFile a Closeable. So, I wanted to remove this file (since we dropped OpenJDK 6 compatibility). On looking at the file history, it turns out I was completely mistaken. This class protects against GIFAR attacks. To avoid someone else messing this up accidentally, I fixed up the comments (and made some other minor changes to reduce the need for comments). Okay to push? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/netx/net/sourceforge/jnlp/util/JarFile.java b/netx/net/sourceforge/jnlp/util/JarFile.java --- a/netx/net/sourceforge/jnlp/util/JarFile.java +++ b/netx/net/sourceforge/jnlp/util/JarFile.java @@ -43,94 +43,82 @@ import java.io.InputStream; import net.sourceforge.jnlp.runtime.JNLPRuntime; -//in jdk6 java.util.jar.JarFile is not Closeable - fixing -//overwritening class can add duplicate occurence of interface so this should be perfectly safe -public class JarFile extends java.util.jar.JarFile implements Closeable{ +/** + * A wrapper over {@link java.util.jar.JarFile} that verifies zip headers to + * protect against GIFAR attacks. + * + * @see Gifar + */ +public class JarFile extends java.util.jar.JarFile implements Closeable { public JarFile(String name) throws IOException { - super(name); - verifyZipHeader(new File(name)); + super(name); + verifyZipHeader(new File(name)); } - /** - */ public JarFile(String name, boolean verify) throws IOException { super(name, verify); verifyZipHeader(new File(name)); } - /** - */ public JarFile(File file) throws IOException { super(file); verifyZipHeader(file); } - /** - */ public JarFile(File file, boolean verify) throws IOException { super(file, verify); verifyZipHeader(file); } - /* - */ public JarFile(File file, boolean verify, int mode) throws IOException { super(file, verify, mode); - verifyZipHeader(file); + verifyZipHeader(file); } - - - - + /** - * According to specification - - * http://www.pkware.com/documents/casestudies/APPNOTE.TXT or just google - * around zip header all entries in zip-compressed must start with well - * known "PK" which is defined as hexa x50 x4b x03 x04, which in decimal are - * 80 75 3 4. - * + * The ZIP specification requires that the zip header for all entries in a + * zip-compressed archive must start with a well known "PK" which is + * defined as hex x50 x4b x03 x04. + *

* Note - this is not file-header, it is item-header. - * - * Actually most of compressing formats have some n-bytes header se eg: + *

+ * Actually most of compressing formats have some n-bytes headers. Eg: * http://www.gzip.org/zlib/rfc-gzip.html#header-trailer for ID1 and ID2 so * in case that some differently compressed jars will come to play, this is - * the palce where to fix it. + * the place where to fix it. * + * @see ZIP Specification */ - private static final byte[] ZIP_LOCAL_FILE_HEADER_SIGNATURE = new byte[]{80, 75, 3, 4}; + private static final byte[] ZIP_ENTRY_HEADER_SIGNATURE = new byte[] {0x50, 0x4b, 0x03, 0x04}; /** - * This method is checking first four bytes of jar-file against - * ZIP_LOCAL_FILE_HEADER_SIGNATURE - * + * Verify the header for the zip entry. + *

* Although zip specification allows to skip all corrupted entries, it is - * not safe for jars. If first four bytes of file are not zip - * ZIP_LOCAL_FILE_HEADER_SIGNATURE then exception is thrown - * - * As noted, ZIP_LOCAL_FILE_HEADER_SIGNATURE is not ile-header, but is item-header. - * Possible attack is using the fact that entries without header are considered - * corrupted and so can be ignoered. However, for other they can have some meaning. - * - * So for our purposes we must insists on first record to be valid. - * - * @param file - * @throws IOException - * @throws InvalidJarHeaderException + * not safe for jars since it allows a different format to fake itself as + * a Jar. */ - public static void verifyZipHeader(File file) throws IOException { + private void verifyZipHeader(File file) throws IOException { if (!JNLPRuntime.isIgnoreHeaders()) { InputStream s = new FileInputStream(file); + + /* + * Theoretically, a valid ZIP file can begin with anything. We + * ensure it begins with a valid entry header to confirm it only + * contains zip entries. + */ + try { - byte[] buffer = new byte[ZIP_LOCAL_FILE_HEADER_SIGNATURE.length]; + byte[] buffer = new byte[ZIP_ENTRY_HEADER_SIGNATURE.length]; /* * for case that new byte[] will accidently initialize same * sequence as zip header and during the read the buffer will not be filled - */ + */ for (int i = 0; i < buffer.length; i++) { buffer[i] = 0; } - int toRead = ZIP_LOCAL_FILE_HEADER_SIGNATURE.length; + int toRead = ZIP_ENTRY_HEADER_SIGNATURE.length; int readSoFar = 0; int n = 0; /* @@ -144,7 +132,7 @@ } } for (int i = 0; i < buffer.length; i++) { - if (buffer[i] != ZIP_LOCAL_FILE_HEADER_SIGNATURE[i]) { + if (buffer[i] != ZIP_ENTRY_HEADER_SIGNATURE[i]) { throw new InvalidJarHeaderException("Jar " + file.getName() + " do not heave valid header. You can skip this check by -Xignoreheaders"); } } From ptisnovs at icedtea.classpath.org Tue May 13 08:37:17 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 13 May 2014 08:37:17 +0000 Subject: /hg/gfx-test: Another ten new tests added into CAGOperationsOnTw... Message-ID: changeset fb641ea232c6 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=fb641ea232c6 author: Pavel Tisnovsky date: Tue May 13 10:36:58 2014 +0200 Another ten new tests added into CAGOperationsOnTwoConcentricCircles. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java | 250 ++++++++++ 2 files changed, 255 insertions(+), 0 deletions(-) diffs (272 lines): diff -r 3c218f3b3c14 -r fb641ea232c6 ChangeLog --- a/ChangeLog Mon May 12 09:38:36 2014 +0200 +++ b/ChangeLog Tue May 13 10:36:58 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-13 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java: + Another ten new tests added into CAGOperationsOnTwoConcentricCircles. + 2014-05-12 Pavel Tisnovsky * src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java: diff -r 3c218f3b3c14 -r fb641ea232c6 src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java --- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java Mon May 12 09:38:36 2014 +0200 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java Tue May 13 10:36:58 2014 +0200 @@ -2109,6 +2109,256 @@ } /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingVerticalColorStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingVerticalColorStripesTexture(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingUnionOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingDiagonalStripesTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalStripesTexture(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingColorDotsTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingColorDotsTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingUnionOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two concentric circles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingColorDotsTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingColorDotsTexture(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoConcentricCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args not used in this case From ptisnovs at icedtea.classpath.org Tue May 13 08:50:23 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 13 May 2014 08:50:23 +0000 Subject: /hg/rhino-tests: Stub for the (yet another) logger class. Message-ID: changeset 80ea8e60703a in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=80ea8e60703a author: Pavel Tisnovsky date: Tue May 13 10:51:09 2014 +0200 Stub for the (yet another) logger class. diffstat: ChangeLog | 5 +++++ src/org/RhinoTests/Log.java | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 0 deletions(-) diffs (59 lines): diff -r 6fcf6a73fde4 -r 80ea8e60703a ChangeLog --- a/ChangeLog Thu Apr 24 10:01:24 2014 +0200 +++ b/ChangeLog Tue May 13 10:51:09 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-13 Pavel Tisnovsky + + * src/org/RhinoTests/Log.java: + Stub for the (yet another) logger class. + 2014-04-24 Pavel Tisnovsky * src/org/RhinoTests/InvocableTest.java: diff -r 6fcf6a73fde4 -r 80ea8e60703a src/org/RhinoTests/Log.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/org/RhinoTests/Log.java Tue May 13 10:51:09 2014 +0200 @@ -0,0 +1,43 @@ +/* + Rhino test framework + + Copyright (C) 2011, 2012, 2013, 2014 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. +*/ + +class Log { +} + From jvanek at redhat.com Tue May 13 11:37:03 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 13 May 2014 13:37:03 +0200 Subject: Failed cache entry tests Message-ID: <537203DF.2060901@redhat.com> Whoever touched CacheEntry, please see: FAILED: verifyLocationIsSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyOriginalContentLengthIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyNotCurrentWhenRemoteContentIsNewer(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyLastModifiedIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyCurrentWhenCacheEntryHasSameTimeStamp(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyNotCachedIfContentLengthsDiffer(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyNotCachedIfFileIsAbsent(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyCachedIfContentLengthsAreSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyCachedIfOriginalContentLengthsAreSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyContentLengthIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 FAILED: verifyLastUpdatedIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 From jvanek at redhat.com Tue May 13 12:52:35 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 13 May 2014 14:52:35 +0200 Subject: [icedtea-web] RFC: clean up comments in JarFile In-Reply-To: <20140512221733.GM2138@redhat.com> References: <20140512221733.GM2138@redhat.com> Message-ID: <53721593.6090004@redhat.com> On 05/13/2014 12:17 AM, Omair Majid wrote: > Hi, > > I saw some references to jdk6 in JarFile and to me it read like it's > saying that this wrapper is effectively making java.util.jar.JarFile a > Closeable. So, I wanted to remove this file (since we dropped OpenJDK 6 > compatibility). > > On looking at the file history, it turns out I was completely mistaken. > This class protects against GIFAR attacks. To avoid someone else messing > this up accidentally, I fixed up the comments (and made some other minor > changes to reduce the need for comments). > I must say I'm not 100% sure why you do wont this thing, but looks generally ok. Few more such a changes (like comments and similar stuff) and soon no backport will be possible from head to 1.5 .... Feel free to push. J. From jvanek at redhat.com Tue May 13 12:54:38 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 13 May 2014 14:54:38 +0200 Subject: [icedtea-web] RFC: Make 'make check' work under OpenJDK 8 In-Reply-To: <20140512192139.GI2138@redhat.com> References: <20140512192139.GI2138@redhat.com> Message-ID: <5372160E.2040004@redhat.com> On 05/12/2014 09:21 PM, Omair Majid wrote: > Hi, > > The class CertAndKeyGen moved between OpenJDK 7 and OpenJDK 8. The > attached patch makes the code in icedtea-web use reflection to find and > use the right class. > > After this patch, a 'make clean && make && make check && make install' > works with OpenJDK 8. > > Okay to push? > > Thanks, > Omair > Looks efinitley ok. J. From jvanek at redhat.com Tue May 13 13:35:54 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 13 May 2014 15:35:54 +0200 Subject: [rfc][icedtea-web] multiple remember actions In-Reply-To: <5370E8BA.2020103@redhat.com> References: <5358CD17.6090501@redhat.com> <535FFA55.8030107@redhat.com> <5370E8BA.2020103@redhat.com> Message-ID: <53721FBA.4030300@redhat.com> > > > I'm now going to refactor all the names. Do you have any preferences on this? hmhmh. Any One? You know how terrible names can come from my mind....:) > > > J. From aazores at redhat.com Tue May 13 14:56:41 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 13 May 2014 10:56:41 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <5369ECF8.9050304@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> Message-ID: <537232A9.2000209@redhat.com> On 05/07/2014 04:21 AM, Jiri Vanek wrote: > On 05/06/2014 09:37 PM, Andrew Azores wrote: >> Hi, >> >> Prompted by Omair's recent patches to fix caching, I started looking >> into the cache package too. I >> was not too happy with what I found in Resource and ResourceTracker >> :( here's the summary of the >> changes made: >> >> Resource: >> - stop using ints as bit fields for status flags. Use enum with >> EnumSet instead. isSet, >> changeStatus, and getStatusString heavily refactored for this. >> -- setStatusFlag, unsetStatusFlag, resetStatus, isInitialized, >> hasFlags added >> - made status field private >> - made several fields final, some others can't be made final (at >> least not without even more >> refactoring) >> - "transferred" and "size" long fields made volatile so that accesses >> are atomic >> !! hashCode override added, because equals was already overridden >> without it !! >> -- AND, Resource was used as the key type in a ConcurrentHashMap in >> ResourceTracker. Wonderful. >> >> ResourceTracker: >> - "import static" rather than creating copies of the status values in >> this class too... >> - Collection fields declared more generically (eg as just Collection) >> where possible, which was most >> places >> -- "queue" renamed "requestedDownloads" and changed from ArrayList to >> HashSet - the methods that >> provide for selecting the next resource to download from the "queue" >> don't even care about the >> ordering in the queue anyway, really, so being a List is an >> unnecessary restriction. I don't think >> we would want to allow for duplicates either, so a Set makes more >> sense to me unless duplicate >> entries are actually desired >> -- "resources" also now a HashSet instead of ArrayList, for similar >> reasoning - ordering didn't >> matter to begin with, and I don't see the point in allowing duplicates >> - SO many instances of ugly bit-fiddling to check a Resource's status >> cleaned up >> - #wait() takes a Collection rather than an array, allows for some >> cleanup in #waitForResources() >> - #findBestUrl() formatting fixed, no actual changes made here >> - #selectByFlag() renamed to #selectByStatus(), extracted most logic >> into #selectByFilter() >> (required since there is no more explicit UNINITIALIZED status flag) >> >> There's still a lot of fixing that can be done in ResourceTracker >> however. eg using a proper >> ThreadPool, proper synchronization rather than the global "lock" >> object and locking on a few other >> important fields. I'll start looking into that after this goes in. >> >> Thanks, >> > > As omair pointed out: > > > In the future, though, please try and keep separate changes as > separate. > > At least formatting changes should be done as a separate patch. > > please. this is quite important. Butok n context of this patch. > > > > Also, would it be possible to add tests? > > ugh... I would like to stop this being pushed until the unitttest for > *original* behavior are done. And then they are adapted to new > "behavior". This part of itw is lacking the tests, so here is > actually no trace if behvaiour was preserved. > > Otherwise the patch is ok. > > > One more nit - I'm also working n fixing the cache. So we should talk > a bit so we do not duplicate an effort:) > > My main task is to make itw-javaws run offline. End even behind the > meaning of tag, which is often misused. With some luck, also > the applets will run offline :) > > J. > Here's a cleaned up version of the main patch again now that the first round of tests have gone in separately. The tests have been updated to match the new code. I'll deal with fixing formatting and such in another patch. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: resource-enumset-4.patch Type: text/x-patch Size: 35616 bytes Desc: not available URL: From omajid at redhat.com Tue May 13 15:26:58 2014 From: omajid at redhat.com (Omair Majid) Date: Tue, 13 May 2014 11:26:58 -0400 Subject: [icedtea-web] RFC: Fix cache entry tests In-Reply-To: <537203DF.2060901@redhat.com> References: <537203DF.2060901@redhat.com> Message-ID: <20140513152658.GD29777@redhat.com> Hi, * Jiri Vanek [2014-05-13 07:37]: > Whoever touched CacheEntry, please see: > > FAILED: verifyLocationIsSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyOriginalContentLengthIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyNotCurrentWhenRemoteContentIsNewer(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyLastModifiedIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyCurrentWhenCacheEntryHasSameTimeStamp(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyNotCachedIfContentLengthsDiffer(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyNotCachedIfFileIsAbsent(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyCachedIfContentLengthsAreSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyCachedIfOriginalContentLengthsAreSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyContentLengthIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > FAILED: verifyLastUpdatedIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 Sorry about this. For some reason, these errors did not occur on my machine. Actually, I am not even sure what the errors are. However, I see a rather obvious mistake in the code: CacheUtil.getCacheFile is still being called by the CacheEntry constructor in unit tests. The attached patch fixes this. Okay to push? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 -------------- next part -------------- diff --git a/netx/net/sourceforge/jnlp/cache/CacheEntry.java b/netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java @@ -60,10 +60,17 @@ this.location = location; this.version = version; + this.properties = readCacheEntryInfo(); + } + + /** + * Seam for testing + */ + PropertiesFile readCacheEntryInfo() { File infoFile = CacheUtil.getCacheFile(location, version); infoFile = new File(infoFile.getPath() + ".info"); // replace with something that can't be clobbered - properties = new PropertiesFile(infoFile, R("CAutoGen")); + return new PropertiesFile(infoFile, R("CAutoGen")); } /** diff --git a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java @@ -48,6 +48,7 @@ import java.nio.file.Files; import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.util.PropertiesFile; import org.junit.Before; import org.junit.Test; @@ -65,6 +66,14 @@ protected File getCacheFile() { return cacheFile; } + @Override + protected PropertiesFile readCacheEntryInfo() { + try { + return new PropertiesFile(createFile("")); + } catch (IOException e) { + throw new AssertionError(e); + } + } } private URL url; @@ -116,7 +125,7 @@ public void verifyOriginalContentLengthIsSetCorrectly() { long ORIGINAL_CONTENT_LENGTH = 1000; - CacheEntry entry = new CacheEntry(url, version); + CacheEntry entry = new TestCacheEntry(url, version, null); entry.setOriginalContentLength(ORIGINAL_CONTENT_LENGTH); assertEquals(ORIGINAL_CONTENT_LENGTH, entry.getOriginalContentLength()); @@ -133,7 +142,7 @@ @Test public void verifyNotCachedIfContentLengthsDiffer() throws IOException { - File cachedFile = createCacheFile("Foo"); + File cachedFile = createFile("Foo"); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(10000); @@ -144,7 +153,7 @@ @Test public void verifyCachedIfContentLengthsAreSame() throws IOException { String contents = "Foo"; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(contents.length()); @@ -156,7 +165,7 @@ public void verifyCachedIfOriginalContentLengthsAreSame() throws IOException { String contents = "FooDECOMPRESSED"; long compressedLength = 5; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(compressedLength); @@ -169,7 +178,7 @@ public void verifyCurrentWhenCacheEntryHasSameTimeStamp() throws IOException { long lastModified = 10; String contents = "Foo"; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(contents.length()); @@ -183,7 +192,7 @@ long oldTimeStamp = 10; long newTimeStamp = 100; String contents = "Foo"; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(contents.length()); @@ -192,7 +201,7 @@ assertFalse(entry.isCurrent(newTimeStamp)); } - protected File createCacheFile(String contents) throws IOException { + private static File createFile(String contents) throws IOException { File cachedFile = File.createTempFile("CacheEntryTest", null); Files.write(cachedFile.toPath(), contents.getBytes()); cachedFile.deleteOnExit(); From aazores at redhat.com Tue May 13 15:34:23 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 13 May 2014 11:34:23 -0400 Subject: [icedtea-web] RFC: Fix cache entry tests In-Reply-To: <20140513152658.GD29777@redhat.com> References: <537203DF.2060901@redhat.com> <20140513152658.GD29777@redhat.com> Message-ID: <53723B7F.2070700@redhat.com> On 05/13/2014 11:26 AM, Omair Majid wrote: > Hi, > > * Jiri Vanek [2014-05-13 07:37]: >> Whoever touched CacheEntry, please see: >> >> FAILED: verifyLocationIsSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyOriginalContentLengthIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyNotCurrentWhenRemoteContentIsNewer(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyLastModifiedIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyCurrentWhenCacheEntryHasSameTimeStamp(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyNotCachedIfContentLengthsDiffer(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyNotCachedIfFileIsAbsent(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyCachedIfContentLengthsAreSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyCachedIfOriginalContentLengthsAreSame(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyContentLengthIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 >> FAILED: verifyLastUpdatedIsSetCorrectly(net.sourceforge.jnlp.cache.CacheEntryTest) String index out of range: -39 > Sorry about this. For some reason, these errors did not occur on my > machine. > > Actually, I am not even sure what the errors are. However, I see a > rather obvious mistake in the code: CacheUtil.getCacheFile is still > being called by the CacheEntry constructor in unit tests. > > The attached patch fixes this. Okay to push? > > Thanks, > Omair > Works for me. Thanks, -- Andrew A From omajid at icedtea.classpath.org Tue May 13 16:21:50 2014 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 13 May 2014 16:21:50 +0000 Subject: /hg/icedtea-web: Fix cache entry tests Message-ID: changeset a784a0f1f821 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a784a0f1f821 author: Omair Majid date: Tue May 13 12:21:07 2014 -0400 Fix cache entry tests CacheUtil.getCacheFile is still being called by the CacheEntry constructor in unit tests. Bypass that. verifyOriginalContentLengthIsSetCorrectly created a CacheEntry instance, not a TestCacheEntry instance. Fix that too. 2014-05-13 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java (readCacheEntryInfo): New method. (CacheEntry): Call readCacheEntryInfo to get properties. * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java (readCacheEntryInfo): New method. (createCacheFile): Rename to ... (createFile): New method. Adjust all callers. (verifyOriginalContentLengthIsSetCorrectly): Create instances of TestCacheEntry, not CacheEntry. diffstat: ChangeLog | 12 +++++ netx/net/sourceforge/jnlp/cache/CacheEntry.java | 9 +++- tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java | 23 ++++++--- 3 files changed, 36 insertions(+), 8 deletions(-) diffs (130 lines): diff -r d150e4453b0b -r a784a0f1f821 ChangeLog --- a/ChangeLog Mon May 12 12:55:21 2014 -0400 +++ b/ChangeLog Tue May 13 12:21:07 2014 -0400 @@ -1,3 +1,15 @@ +2014-05-13 Omair Majid + + * netx/net/sourceforge/jnlp/cache/CacheEntry.java + (readCacheEntryInfo): New method. + (CacheEntry): Call readCacheEntryInfo to get properties. + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java + (readCacheEntryInfo): New method. + (createCacheFile): Rename to ... + (createFile): New method. Adjust all callers. + (verifyOriginalContentLengthIsSetCorrectly): Create instances of + TestCacheEntry, not CacheEntry. + 2014-05-12 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java: Add diff -r d150e4453b0b -r a784a0f1f821 netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Mon May 12 12:55:21 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Tue May 13 12:21:07 2014 -0400 @@ -60,10 +60,17 @@ this.location = location; this.version = version; + this.properties = readCacheEntryInfo(); + } + + /** + * Seam for testing + */ + PropertiesFile readCacheEntryInfo() { File infoFile = CacheUtil.getCacheFile(location, version); infoFile = new File(infoFile.getPath() + ".info"); // replace with something that can't be clobbered - properties = new PropertiesFile(infoFile, R("CAutoGen")); + return new PropertiesFile(infoFile, R("CAutoGen")); } /** diff -r d150e4453b0b -r a784a0f1f821 tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java Mon May 12 12:55:21 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/CacheEntryTest.java Tue May 13 12:21:07 2014 -0400 @@ -48,6 +48,7 @@ import java.nio.file.Files; import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.util.PropertiesFile; import org.junit.Before; import org.junit.Test; @@ -65,6 +66,14 @@ protected File getCacheFile() { return cacheFile; } + @Override + protected PropertiesFile readCacheEntryInfo() { + try { + return new PropertiesFile(createFile("")); + } catch (IOException e) { + throw new AssertionError(e); + } + } } private URL url; @@ -116,7 +125,7 @@ public void verifyOriginalContentLengthIsSetCorrectly() { long ORIGINAL_CONTENT_LENGTH = 1000; - CacheEntry entry = new CacheEntry(url, version); + CacheEntry entry = new TestCacheEntry(url, version, null); entry.setOriginalContentLength(ORIGINAL_CONTENT_LENGTH); assertEquals(ORIGINAL_CONTENT_LENGTH, entry.getOriginalContentLength()); @@ -133,7 +142,7 @@ @Test public void verifyNotCachedIfContentLengthsDiffer() throws IOException { - File cachedFile = createCacheFile("Foo"); + File cachedFile = createFile("Foo"); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(10000); @@ -144,7 +153,7 @@ @Test public void verifyCachedIfContentLengthsAreSame() throws IOException { String contents = "Foo"; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(contents.length()); @@ -156,7 +165,7 @@ public void verifyCachedIfOriginalContentLengthsAreSame() throws IOException { String contents = "FooDECOMPRESSED"; long compressedLength = 5; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(compressedLength); @@ -169,7 +178,7 @@ public void verifyCurrentWhenCacheEntryHasSameTimeStamp() throws IOException { long lastModified = 10; String contents = "Foo"; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(contents.length()); @@ -183,7 +192,7 @@ long oldTimeStamp = 10; long newTimeStamp = 100; String contents = "Foo"; - File cachedFile = createCacheFile(contents); + File cachedFile = createFile(contents); CacheEntry entry = new TestCacheEntry(url, version, cachedFile); entry.setRemoteContentLength(contents.length()); @@ -192,7 +201,7 @@ assertFalse(entry.isCurrent(newTimeStamp)); } - protected File createCacheFile(String contents) throws IOException { + private static File createFile(String contents) throws IOException { File cachedFile = File.createTempFile("CacheEntryTest", null); Files.write(cachedFile.toPath(), contents.getBytes()); cachedFile.deleteOnExit(); From bugzilla-daemon at icedtea.classpath.org Tue May 13 16:32:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 13 May 2014 16:32:55 +0000 Subject: [Bug 1763] New: [IcedTea7] ppc64 JIT doesn't support class data sharing Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1763 Bug ID: 1763 Summary: [IcedTea7] ppc64 JIT doesn't support class data sharing Product: IcedTea Version: 7-hg Hardware: ppc64 OS: All Status: NEW Severity: normal Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org if [ -e /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/j2sdk-image/bin/java ] ; then \ /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build-boot/j2sdk-image/bin/java -Xshare:dump ; \ fi grep: /builddir/build/BUILD/icedtea-2.6pre04/openjdk.build/j2sdk-image/jre/lib/ppc64/jvm.cfg: No such file or directory Error occurred during initialization of VM Dumping a shared archive is not supported on the Server JVM. make: *** [stamps/add-archive-boot.stamp] Error 1 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Tue May 13 16:33:21 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 13 May 2014 16:33:21 +0000 Subject: [Bug 1763] [IcedTea7] ppc64 JIT doesn't support class data sharing In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1763 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at icedtea.classpath.org Tue May 13 16:36:08 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 13 May 2014 16:36:08 +0000 Subject: /hg/icedtea7: PR1763: ppc64 JIT doesn't support class data sharing Message-ID: changeset b7bc434d2b61 in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=b7bc434d2b61 author: Andrew John Hughes date: Tue May 13 17:35:49 2014 +0100 PR1763: ppc64 JIT doesn't support class data sharing 2014-05-13 Andrew John Hughes * Makefile.am: (add-archive): Skip on ppc64. (add-archive-debug): Likewise. (add-archive-boot): Likewise. * NEWS: Updated. diffstat: ChangeLog | 9 +++++++++ Makefile.am | 12 +++++++++--- NEWS | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diffs (63 lines): diff -r 7ae2b1ac339d -r b7bc434d2b61 ChangeLog --- a/ChangeLog Fri May 09 20:34:40 2014 +0100 +++ b/ChangeLog Tue May 13 17:35:49 2014 +0100 @@ -1,3 +1,12 @@ +2014-05-13 Andrew John Hughes + + PR1763: ppc64 JIT doesn't support class data sharing + * Makefile.am: + (add-archive): Skip on ppc64. + (add-archive-debug): Likewise. + (add-archive-boot): Likewise. + * NEWS: Updated. + 2014-05-09 Andrew John Hughes PR1762: Undefined references when building with NSS 3.16.1 diff -r 7ae2b1ac339d -r b7bc434d2b61 Makefile.am --- a/Makefile.am Fri May 09 20:34:40 2014 +0100 +++ b/Makefile.am Tue May 13 17:35:49 2014 +0100 @@ -1829,7 +1829,9 @@ if !ENABLE_CACAO if !ZERO_BUILD if [ -e $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/java ] ; then \ - $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/java -Xshare:dump ; \ + if test "x$(INSTALL_ARCH_DIR)" != "xppc64"; then \ + $(BUILD_OUTPUT_DIR)/j2sdk-image/bin/java -Xshare:dump ; \ + fi ; \ fi endif endif @@ -1957,7 +1959,9 @@ if !ENABLE_CACAO if !ZERO_BUILD if [ -e $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/bin/java ] ; then \ - $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/bin/java -Xshare:dump ; \ + if test "x$(INSTALL_ARCH_DIR)" != "xppc64"; then \ + $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/bin/java -Xshare:dump ; \ + fi ; \ fi endif endif @@ -2094,7 +2098,9 @@ if !ENABLE_CACAO if !ZERO_BUILD if [ -e $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/bin/java ] ; then \ - $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/bin/java -Xshare:dump ; \ + if test "x$(INSTALL_ARCH_DIR)" != "xppc64"; then \ + $(BOOT_BUILD_OUTPUT_DIR)/j2sdk-image/bin/java -Xshare:dump ; \ + fi ; \ fi endif endif diff -r 7ae2b1ac339d -r b7bc434d2b61 NEWS --- a/NEWS Fri May 09 20:34:40 2014 +0100 +++ b/NEWS Tue May 13 17:35:49 2014 +0100 @@ -182,6 +182,7 @@ - PR1757: register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 - Correct placement of S8041658 fix - PR1762: Undefined references when building with NSS 3.16.1 + - PR1763: ppc64 JIT doesn't support class data sharing New in release 2.5.0 (2014-XX-XX): From bugzilla-daemon at icedtea.classpath.org Tue May 13 16:36:21 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 13 May 2014 16:36:21 +0000 Subject: [Bug 1763] [IcedTea7] ppc64 JIT doesn't support class data sharing In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1763 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=b7bc434d2b61 author: Andrew John Hughes date: Tue May 13 17:35:49 2014 +0100 PR1763: ppc64 JIT doesn't support class data sharing 2014-05-13 Andrew John Hughes * Makefile.am: (add-archive): Skip on ppc64. (add-archive-debug): Likewise. (add-archive-boot): Likewise. * NEWS: Updated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From omajid at redhat.com Tue May 13 17:51:22 2014 From: omajid at redhat.com (Omair Majid) Date: Tue, 13 May 2014 13:51:22 -0400 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <5370D480.6030203@gmx.de> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <20140512133406.GB2138@redhat.com> <5370D480.6030203@gmx.de> Message-ID: <20140513175121.GE29777@redhat.com> * Jacob Wisor [2014-05-12 10:04]: > Please read my message <5370C9E4.7000607 at gmx.de> for this. Standards > compliance is my main motivation. But we know that Javadoc is not valid xhtml. It is a mix of html and it's own formatting system. And it's processed by only one tool: javadoc. > I was hoping javadoc would have finally moved to XHTML since OpenJDK 8, but > unfortunately progress has been a bit of a pain for Java during the last few > years. :-\ No, this is still not the case. The official documentation on javadoc contradicts this and then goes on to suggest non-valid html as the default: http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#format > As I mentioned earlier, your patch is not wrong but it fixes problems that > will or might become a problem themselves when javadoc finally transitions > to XHTML. I doubt it. For starters, that means every comment must also begin with valid markup. I don't see us changing /** Foo the bar to /**

Foo the bar everywhere. > I think, I do not need to elaborate on the human *and* machine > readability benefits of XML here, so this is mainly why I would like every > javadoc source code out there to be prepared for that transition. While I don't personally care about this, many people disagree with the premise [1][2]. > If self-enclosing elements are stopping OpenJDK 8 javadoc from digesting > that Java source code documentation then I would rather assume javadoc needs > to be fixed. I don't think upstream is budging on this. I, for one, will be really happy if they fixed javadoc to be more lenient by default. But they aren't. And they are aware of this issue: http://thread.gmane.org/gmane.comp.java.openjdk.core-libs.devel/19308 > And evidently, the time has come to give back javadoc the > attention it requires, since it has been neglected for so many years. This doclint effort (which is what breaks javadoc-ing of code) is the attention upstream gave them. I am hoping they don't give it much more attention. To summarize, I hope you are okay with me pushing the patch. I will be happy to hold it back if you think an alternate solution (either upstream or in icedtea-web) is possible. Thanks, Omair [1] http://blog.codinghorror.com/xml-the-angle-bracket-tax/ [2] http://www.ibm.com/developerworks/xml/library/x-sbxml/index.html -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Tue May 13 18:25:23 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 13 May 2014 18:25:23 +0000 Subject: [Bug 1010] accessEventQueue exception when displaying a modal dialog in the event queue In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1010 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #1 from Andrew Azores --- Cannot reproduce this with 1.5. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at redhat.com Tue May 13 18:43:12 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 13 May 2014 20:43:12 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk Message-ID: <537267C0.6050805@redhat.com> Hi! This patch allows ITW to run on any openjdk or oracle jdk(I have not yet tested with IBM, but will do) This is probably not final version of the patch - as it break all tests using PluginAppletMocks - Its easy - tests do not run on bootclassapth, so the Ancestor of my Access class is in different classlaoder. Moving tests to bootclassapth[2] do not help, as then even worse things happens. But it should be solution-able. Anyway I think that removing those 9 tests is small cost for get rid of dependence on icedtea (plugin-hole patch) There is nasty override of run method. Inside is copypasted code and it is vulnerable. I will try to propose the change - private runLoader() + runLoader() to upstream. If they accept, then actually no hacking will be needed and the hook will be pretty clear (except refelction based getters and setter, which is quite ok...) Opened to RFC, J (yah it really worked on plain upstream oraclejdk7 or openjdk7 :) ) [2]in makefile.am @@ -1073,7 +1074,7 @@ cd $(NETX_UNIT_TEST_DIR) ; \ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):.:$(TEST_EXTENSIONS_SRCDIR):$(TAGSOUP_JAR) \ - $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names + $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar CommandLine $$class_names if WITH_XSLTPROC -$(XSLTPROC) --stringparam logs logs_unit.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(NETX_UNIT_TEST_DIR)/tests-output.xml > $(TESTS_DIR)/index_unit.html -$(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html @@ -1093,7 +1094,7 @@ mv $(NETX_UNIT_TEST_DIR)/$$file $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \ done ;\ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ - $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \ + $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \ -Dreport.html.out.encoding=UTF-8 \ -raw \ -sp $(NETX_SRCDIR) \ @@ -1158,7 +1159,7 @@ done ;\ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):$(JACOCO_CLASSPATH):.:$(TEST_EXTENSIONS_SRCDIR):$(TAGSOUP_JAR) \ - $(BOOT_DIR)/bin/java $(JACOCO_AGENT_SWITCH) -Xbootclasspath:$(RUNTIME) CommandLine $$class_names ; \ + $(BOOT_DIR)/bin/java $(JACOCO_AGENT_SWITCH) -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar CommandLine $$class_names ; \ for file in $(EMMA_MODIFIED_FILES) ; do \ mv $(NETX_UNIT_TEST_DIR)/$$file $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_SUFFIX)" ; \ mv $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" $(NETX_UNIT_TEST_DIR)/$$file ; \ @@ -1217,7 +1218,7 @@ $(BOOT_DIR)/bin/java \ $(EMMA_JAVA_ARGS) \ $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) emmarun \ + -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar -cp $(EMMA_JAR) emmarun \ -raw \ -cp $(NETX_DIR)/lib/classes.jar \ -cp $(JUNIT_JAR) \ @@ -1333,7 +1334,7 @@ class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \ CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_DIR):$(JACOCO_CLASSPATH):$(TEST_EXTENSIONS_TESTS_DIR):$(TEST_EXTENSIONS_SRCDIR) \ $(BOOT_DIR)/bin/java $(JACOCO_AGENT_SWITCH) $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) CommandLine $$class_names ; \ + -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar CommandLine $$class_names ; \ if [ -f $(JACOCO_JAVAWS_RESULTS) ] ; then \ jacoco_javaws_results=$(JACOCO_JAVAWS_RESULTS) ; \ $(JACOCO_OPERATOR_EXEC) \ @@ -1442,14 +1443,14 @@ cd $(TEST_EXTENSIONS_DIR) ; \ CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) \ $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) net.sourceforge.jnlp.ServerAccess + -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar net.sourceforge.jnlp.ServerAccess run-test-server-on-random-port: stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \ stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp cd $(TEST_EXTENSIONS_DIR) ; \ CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) \ $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) net.sourceforge.jnlp.ServerAccess randomport + -Xbootclasspath:$(RUNTIME):$(NETX_DIR)/lib/classes.jar net.sourceforge.jnlp.ServerAccess randomport -------------- next part -------------- A non-text attachment was scrubbed... Name: allOpenJdk.patch Type: text/x-patch Size: 15911 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Tue May 13 19:17:15 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 13 May 2014 19:17:15 +0000 Subject: [Bug 1102] Javaws gives mixed signage warning with headless In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1102 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from Andrew Azores --- *** This bug has been marked as a duplicate of bug 1764 *** -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Wed May 14 08:24:27 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 14 May 2014 08:24:27 +0000 Subject: /hg/gfx-test: Minor fixes, added new helpers methods into BitBlt... Message-ID: changeset 07ad90c67150 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=07ad90c67150 author: Pavel Tisnovsky date: Wed May 14 10:25:12 2014 +0200 Minor fixes, added new helpers methods into BitBltUsingBgColor. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltUsingBgColor.java | 89 +++++++++++++-------- 2 files changed, 58 insertions(+), 36 deletions(-) diffs (325 lines): diff -r fb641ea232c6 -r 07ad90c67150 ChangeLog --- a/ChangeLog Tue May 13 10:36:58 2014 +0200 +++ b/ChangeLog Wed May 14 10:25:12 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-14 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltUsingBgColor.java: + Minor fixes, added new helpers methods into BitBltUsingBgColor. + 2014-05-13 Pavel Tisnovsky * src/org/gfxtest/testsuites/CAGOperationsOnTwoConcentricCircles.java: diff -r fb641ea232c6 -r 07ad90c67150 src/org/gfxtest/testsuites/BitBltUsingBgColor.java --- a/src/org/gfxtest/testsuites/BitBltUsingBgColor.java Tue May 13 10:36:58 2014 +0200 +++ b/src/org/gfxtest/testsuites/BitBltUsingBgColor.java Wed May 14 10:25:12 2014 +0200 @@ -82,7 +82,7 @@ { /** - * Test basic BitBlt operation for empty buffered image with type TYPE_3BYTE_BGR + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_3BYTE_BGR}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -92,14 +92,14 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ - private TestResult doBitBltEmptyBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d, + private TestResult doBitBltEmptyBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d, Color backgroundColor) { return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, backgroundColor); } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -116,7 +116,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_4BYTE_ABGR + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR_PRE}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -126,14 +126,14 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ - private TestResult doBitBltEmptyBufferedImageType4ByteABGRPre(TestImage image, Graphics2D graphics2d, + private TestResult doBitBltEmptyBufferedImageType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d, Color backgroundColor) { return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, backgroundColor); } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_INT_ARGB + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_INT_ARGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -150,7 +150,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_INT_ARGB_PRE + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_INT_ARGB_PRE}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -160,14 +160,14 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ - private TestResult doBitBltEmptyBufferedImageTypeIntARGBPre(TestImage image, Graphics2D graphics2d, + private TestResult doBitBltEmptyBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, Color backgroundColor) { return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, backgroundColor); } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_INT_BGR + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_INT_BGR}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -184,7 +184,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_INT_RGB + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_INT_RGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -201,7 +201,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_BINARY + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_BYTE_BINARY}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -218,7 +218,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_GRAY + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_BYTE_GRAY}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -235,7 +235,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_BYTE_INDEXED + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_BYTE_INDEXED}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -252,7 +252,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_555_RGB + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_USHORT_555_RGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -269,7 +269,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_565_RGB + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_USHORT_565_RGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -286,7 +286,7 @@ } /** - * Test basic BitBlt operation for empty buffered image with type TYPE_USHORT_GRAY + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_USHORT_GRAY}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -303,7 +303,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_3BYTE_BGR + * Test basic BitBlt operation for empty buffered image with type {@link BufferedImage#TYPE_CUSTOM}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -313,14 +313,14 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ - private TestResult doBitBltCheckerBufferedImageType3ByteRGB(TestImage image, Graphics2D graphics2d, + private TestResult doBitBltEmptyBufferedImageTypeCustom(TestImage image, Graphics2D graphics2d, Color backgroundColor) { - return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, backgroundColor); - } - - /** - * Test basic BitBlt operation for checker buffered image with type TYPE_4BYTE_ABGR + return CommonBitmapOperations.doBitBltTestWithEmptyImage(image, graphics2d, BufferedImage.TYPE_CUSTOM, backgroundColor); + } + + /** + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_3BYTE_BGR}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -330,6 +330,23 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ + private TestResult doBitBltCheckerBufferedImageType3ByteBGR(TestImage image, Graphics2D graphics2d, + Color backgroundColor) + { + return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, backgroundColor); + } + + /** + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR}. + * + * @param image + * image to be used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param backgroundColor + * background color + * @return test result status - PASSED, FAILED or ERROR + */ private TestResult doBitBltCheckerBufferedImageType4ByteABGR(TestImage image, Graphics2D graphics2d, Color backgroundColor) { @@ -337,7 +354,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_4BYTE_ABGR + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR_PRE}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -347,14 +364,14 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ - private TestResult doBitBltCheckerBufferedImageType4ByteABGRPre(TestImage image, Graphics2D graphics2d, + private TestResult doBitBltCheckerBufferedImageType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d, Color backgroundColor) { return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, backgroundColor); } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_INT_ARGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -371,7 +388,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_INT_ARGB_PRE + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_INT_ARGB_PRE}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -381,14 +398,14 @@ * background color * @return test result status - PASSED, FAILED or ERROR */ - private TestResult doBitBltCheckerBufferedImageTypeIntARGBPre(TestImage image, Graphics2D graphics2d, + private TestResult doBitBltCheckerBufferedImageTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, Color backgroundColor) { return CommonBitmapOperations.doBitBltTestWithCheckerImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, backgroundColor); } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_INT_BGR + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_INT_BGR}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -405,7 +422,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_INT_RGB + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_INT_RGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -422,7 +439,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_BINARY + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_BYTE_BINARY}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -439,7 +456,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_GRAY + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_BYTE_GRAY}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -456,7 +473,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_BYTE_INDEXED + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_BYTE_INDEXED}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -473,7 +490,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_USHORT_555_RGB + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_USHORT_555_RGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -490,7 +507,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_USHORT_565_RGB + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_USHORT_565_RGB}. * * @param image * image to be used as a destination for BitBlt-type operations @@ -507,7 +524,7 @@ } /** - * Test basic BitBlt operation for checker buffered image with type TYPE_USHORT_GRAY + * Test basic BitBlt operation for checker buffered image with type {@link BufferedImage#TYPE_USHORT_GRAY}. * * @param image * image to be used as a destination for BitBlt-type operations From ptisnovs at icedtea.classpath.org Wed May 14 09:09:32 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 14 May 2014 09:09:32 +0000 Subject: /hg/rhino-tests: Improvements of the logger class. Message-ID: changeset 0f868bb629f5 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=0f868bb629f5 author: Pavel Tisnovsky date: Wed May 14 11:10:19 2014 +0200 Improvements of the logger class. diffstat: ChangeLog | 5 ++++ src/org/RhinoTests/Log.java | 50 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+), 0 deletions(-) diffs (71 lines): diff -r 80ea8e60703a -r 0f868bb629f5 ChangeLog --- a/ChangeLog Tue May 13 10:51:09 2014 +0200 +++ b/ChangeLog Wed May 14 11:10:19 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-14 Pavel Tisnovsky + + * src/org/RhinoTests/Log.java: + Improvements of the logger class. + 2014-05-13 Pavel Tisnovsky * src/org/RhinoTests/Log.java: diff -r 80ea8e60703a -r 0f868bb629f5 src/org/RhinoTests/Log.java --- a/src/org/RhinoTests/Log.java Tue May 13 10:51:09 2014 +0200 +++ b/src/org/RhinoTests/Log.java Wed May 14 11:10:19 2014 +0200 @@ -39,5 +39,55 @@ */ class Log { + + /** + * Set of colors for colorized output to the terminal. + */ + static Map colors = new HashMap(10); + + static + { + colors.put( "RED", "31" ); + colors.put( "GREEN", "32" ); + colors.put( "ORANGE", "33" ); + colors.put( "BLUE", "34" ); + colors.put( "VIOLET", "35" ); + colors.put( "MAGENTA", "35" ); + colors.put( "LIGHT_BLUE", "36" ); + colors.put( "GRAY", "38" ); + colors.put( "GREY", "38" ); + } + + /** + * Actual amount of indentation. + */ + private int indent = 0; + + /** + * How much spaces should be added/removed for each level? + */ + private int indentDelta = 4; + + /** + * Class name used by logger. + */ + private String className = null; + + /** + * Implicit constructor. + */ + public Log() + { + this.className = "unknown"; + } + + /** + * Explicit constructor that initializes class name. + */ + public Log(String className) + { + this.className = className; + } + } From jvanek at redhat.com Wed May 14 11:04:53 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 14 May 2014 13:04:53 +0200 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <537232A9.2000209@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <537232A9.2000209@redhat.com> Message-ID: <53734DD5.70208@redhat.com> On 05/13/2014 04:56 PM, Andrew Azores wrote: > On 05/07/2014 04:21 AM, Jiri Vanek wrote: >> On 05/06/2014 09:37 PM, Andrew Azores wrote: >>> Hi, >>> >>> Prompted by Omair's recent patches to fix caching, I started looking into the cache package too. I >>> was not too happy with what I found in Resource and ResourceTracker :( here's the summary of the >>> changes made: >>> >>> Resource: >>> - stop using ints as bit fields for status flags. Use enum with EnumSet instead. isSet, >>> changeStatus, and getStatusString heavily refactored for this. >>> -- setStatusFlag, unsetStatusFlag, resetStatus, isInitialized, hasFlags added >>> - made status field private >>> - made several fields final, some others can't be made final (at least not without even more >>> refactoring) >>> - "transferred" and "size" long fields made volatile so that accesses are atomic >>> !! hashCode override added, because equals was already overridden without it !! >>> -- AND, Resource was used as the key type in a ConcurrentHashMap in ResourceTracker. Wonderful. >>> >>> ResourceTracker: >>> - "import static" rather than creating copies of the status values in this class too... >>> - Collection fields declared more generically (eg as just Collection) where possible, which was most >>> places >>> -- "queue" renamed "requestedDownloads" and changed from ArrayList to HashSet - the methods that >>> provide for selecting the next resource to download from the "queue" don't even care about the >>> ordering in the queue anyway, really, so being a List is an unnecessary restriction. I don't think >>> we would want to allow for duplicates either, so a Set makes more sense to me unless duplicate >>> entries are actually desired >>> -- "resources" also now a HashSet instead of ArrayList, for similar reasoning - ordering didn't >>> matter to begin with, and I don't see the point in allowing duplicates >>> - SO many instances of ugly bit-fiddling to check a Resource's status cleaned up >>> - #wait() takes a Collection rather than an array, allows for some cleanup in #waitForResources() >>> - #findBestUrl() formatting fixed, no actual changes made here >>> - #selectByFlag() renamed to #selectByStatus(), extracted most logic into #selectByFilter() >>> (required since there is no more explicit UNINITIALIZED status flag) >>> >>> There's still a lot of fixing that can be done in ResourceTracker however. eg using a proper >>> ThreadPool, proper synchronization rather than the global "lock" object and locking on a few other >>> important fields. I'll start looking into that after this goes in. >>> >>> Thanks, >>> >> >> As omair pointed out: >> >> > In the future, though, please try and keep separate changes as separate. >> > At least formatting changes should be done as a separate patch. >> >> please. this is quite important. Butok n context of this patch. >> >> >> > Also, would it be possible to add tests? >> >> ugh... I would like to stop this being pushed until the unitttest for *original* behavior are >> done. And then they are adapted to new "behavior". This part of itw is lacking the tests, so here >> is actually no trace if behvaiour was preserved. >> >> Otherwise the patch is ok. >> >> >> One more nit - I'm also working n fixing the cache. So we should talk a bit so we do not duplicate >> an effort:) >> >> My main task is to make itw-javaws run offline. End even behind the meaning of tag, >> which is often misused. With some luck, also the applets will run offline :) >> >> J. >> > > Here's a cleaned up version of the main patch again now that the first round of tests have gone in > separately. The tests have been updated to match the new code. I'll deal with fixing formatting and > such in another patch. > > Thanks, > Lets wait for Omair, But ok from my side.And thank you for tests. J. From omajid at redhat.com Wed May 14 18:14:37 2014 From: omajid at redhat.com (Omair Majid) Date: Wed, 14 May 2014 14:14:37 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <537232A9.2000209@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <537232A9.2000209@redhat.com> Message-ID: <20140514181437.GD13117@redhat.com> Hi, Just one concern. This isn't a blocker; feel free to fix it in another patch. * Andrew Azores [2014-05-13 10:57]: > @Test > - public void testSelectByFlag() throws Exception { > + public void testSelectByStatus() throws Exception { > Resource connectedResource = Resource.getResource(new URL("http://example.com/connected.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); > - connectedResource.status = Resource.CONNECTED | Resource.DOWNLOADING; > + connectedResource.setStatusFlags(EnumSet.of(CONNECTED, DOWNLOADING)); > Resource erroredResource = Resource.getResource(new URL("http://example.com/errored.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); > - erroredResource.status = Resource.ERROR | Resource.CONNECT; > + erroredResource.setStatusFlags(EnumSet.of(ERROR, CONNECT)); > Resource downloadingResource = Resource.getResource(new URL("http://example.com/downloading.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); > - downloadingResource.status = Resource.DOWNLOADING; > + downloadingResource.setStatusFlag(DOWNLOADING); > Resource uninitializedResource = Resource.getResource(new URL("http://example.com/uninitialized.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); > List source = Arrays.asList(connectedResource, erroredResource, downloadingResource, uninitializedResource); > > - Resource result1 = ResourceTracker.selectByFlag(source, Resource.CONNECT | Resource.CONNECTING | Resource.CONNECTED, Resource.ERROR); > - Resource result2 = ResourceTracker.selectByFlag(source, Resource.DOWNLOADING, Resource.CONNECTED); > - Resource result3 = ResourceTracker.selectByFlag(source, Resource.DOWNLOADED, Resource.UNINITIALIZED); > - Resource result4 = ResourceTracker.selectByFlag(source, Resource.UNINITIALIZED, Integer.MAX_VALUE); > - Resource result5 = ResourceTracker.selectByFlag(source, Resource.CONNECT | Resource.CONNECTING | Resource.CONNECTED, Resource.DOWNLOADING); > + Resource result1 = ResourceTracker.selectByStatus(source, EnumSet.of(CONNECT, CONNECTING, CONNECTED), EnumSet.of(ERROR)); > + Resource result2 = ResourceTracker.selectByStatus(source, DOWNLOADING, CONNECTED); > + Resource result3 = ResourceTracker.selectByFilter(source, new ResourceTracker.Filter() { > + @Override > + public boolean test(Resource t) { > + return t.isSet(DOWNLOADED) && t.isInitialized(); > + } > + }); > + Resource result4 = ResourceTracker.selectByFilter(source, new ResourceTracker.Filter() { > + @Override > + public boolean test(Resource t) { > + return !t.isInitialized(); > + } > + }); > + Resource result5 = ResourceTracker.selectByStatus(source, EnumSet.of(CONNECT, CONNECTING, CONNECTED), EnumSet.of(DOWNLOADING)); > > - Assert.assertEquals(connectedResource, result1); > - Assert.assertEquals(downloadingResource, result2); > + Assert.assertEquals("result1 should be connected resource", connectedResource, result1); > + Assert.assertEquals("result2 should be downloading resource", downloadingResource, result2); > Assert.assertNull("Result 3 should have been null", result3); > - Assert.assertEquals(uninitializedResource, result4); > - Assert.assertEquals(erroredResource, result5); > + Assert.assertEquals("result4 should be uninitialized resource", uninitializedResource, result4); > + Assert.assertEquals("result5 should be errored resource", erroredResource, result5); This test is too big. I would like to see it broken up into smaller tests that each check for one thing. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at icedtea.classpath.org Wed May 14 19:05:25 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Wed, 14 May 2014 19:05:25 +0000 Subject: /hg/icedtea-web: Resource status field refactored to enum Message-ID: changeset d96760e31283 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d96760e31283 author: Andrew Azores date: Wed May 14 15:04:16 2014 -0400 Resource status field refactored to enum 2014-05-14 Andrew Azores * netx/net/sourceforge/jnlp/cache/Resource.java: (Status) new enum replacing int bitfield statuses. (transferred, size) made volatile for atomic read/write. (isSet, getStatusString, changeStatus) refactored for Status enum. (hasFlags, setStatusFlag, setStatusFlags, unsetStatusFlag, resetStatus, isInitialized) new methods. (hashCode) newly overridden since equals was already overridden. * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: all references to Resource int bitfield status refactored. (selectByFilter) new method since UNINITIALIZED is no longer an actual flag in Resource Status, allows for filtering by uninitialized resources anyway. * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: refactored for Status enum * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: refactored for Status enum and selectByFilter diffstat: ChangeLog | 17 + netx/net/sourceforge/jnlp/cache/Resource.java | 196 ++++++--- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 134 ++++-- tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java | 82 +-- tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java | 48 +- 5 files changed, 294 insertions(+), 183 deletions(-) diffs (truncated from 885 to 500 lines): diff -r a784a0f1f821 -r d96760e31283 ChangeLog --- a/ChangeLog Tue May 13 12:21:07 2014 -0400 +++ b/ChangeLog Wed May 14 15:04:16 2014 -0400 @@ -1,3 +1,20 @@ +2014-05-14 Andrew Azores + + * netx/net/sourceforge/jnlp/cache/Resource.java: (Status) new enum + replacing int bitfield statuses. (transferred, size) made volatile for + atomic read/write. (isSet, getStatusString, changeStatus) refactored for + Status enum. (hasFlags, setStatusFlag, setStatusFlags, unsetStatusFlag, + resetStatus, isInitialized) new methods. (hashCode) newly overridden since + equals was already overridden. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: all references to + Resource int bitfield status refactored. (selectByFilter) new method since + UNINITIALIZED is no longer an actual flag in Resource Status, allows for + filtering by uninitialized resources anyway. + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: refactored + for Status enum + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: + refactored for Status enum and selectByFilter + 2014-05-13 Omair Majid * netx/net/sourceforge/jnlp/cache/CacheEntry.java diff -r a784a0f1f821 -r d96760e31283 netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Tue May 13 12:21:07 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Wed May 14 15:04:16 2014 -0400 @@ -16,14 +16,14 @@ package net.sourceforge.jnlp.cache; -import net.sourceforge.jnlp.util.logging.OutputController; -import java.io.*; -import java.net.*; -import java.util.*; +import java.io.File; +import java.net.URL; +import java.util.Collection; +import java.util.EnumSet; +import java.util.List; -import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.runtime.*; -import net.sourceforge.jnlp.util.*; +import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.util.WeakList; /** *

@@ -51,25 +51,26 @@ // todo: IIRC, any resource is checked for being up-to-date // only once, regardless of UpdatePolicy. verify and fix. - /** status bits */ - public static final int UNINITIALIZED = 0; - public static final int CONNECT = 1; - public static final int CONNECTING = 2; - public static final int CONNECTED = 4; - public static final int DOWNLOAD = 8; - public static final int DOWNLOADING = 16; - public static final int DOWNLOADED = 32; - public static final int ERROR = 64; - public static final int STARTED = 128; // enqueued or being worked on + public enum Status { + CONNECT, + CONNECTING, + CONNECTED, + DOWNLOAD, + DOWNLOADING, + DOWNLOADED, + ERROR, + STARTED // enqueued or being worked on + } + /** list of weak references of resources currently in use */ - private static WeakList resources = new WeakList(); + private static final WeakList resources = new WeakList<>(); /** weak list of trackers monitoring this resource */ - private WeakList trackers = new WeakList(); + private final WeakList trackers = new WeakList<>(); /** the remote location of the resource */ - URL location; + final URL location; /** the location to use when downloading */ private URL downloadLocation; @@ -78,22 +79,22 @@ File localFile; /** the requested version */ - Version requestVersion; + final Version requestVersion; /** the version downloaded from server */ Version downloadVersion; /** amount in bytes transferred */ - long transferred = 0; + volatile long transferred = 0; /** total size of the resource, or -1 if unknown */ - long size = -1; + volatile long size = -1; /** the status of the resource */ - int status = UNINITIALIZED; + final EnumSet status = EnumSet.noneOf(Status.class); /** Update policy for this resource */ - UpdatePolicy updatePolicy; + final UpdatePolicy updatePolicy; /** * Create a resource. @@ -118,8 +119,9 @@ int index = resources.indexOf(resource); if (index >= 0) { // return existing object Resource result = resources.get(index); - if (result != null) + if (result != null) { return result; + } } resources.add(resource); @@ -161,21 +163,34 @@ ResourceTracker getTracker() { synchronized (trackers) { List t = trackers.hardList(); - if (t.size() > 0) + if (t.size() > 0) { return t.get(0); + } return null; } } /** - * Returns true if any of the specified flags are set. + * Check if the specified flag is set. + * @param flag a status flag + * @return true iff the flag is set */ - public boolean isSet(int flag) { - if (flag == UNINITIALIZED) - return status == UNINITIALIZED; - else - return (status & flag) != 0; + public boolean isSet(Status flag) { + synchronized (status) { + return status.contains(flag); + } + } + + /** + * Check if all the specified flags are set. + * @param flags a collection of flags + * @return true iff all the flags are set + */ + public boolean hasFlags(Collection flags) { + synchronized (status) { + return status.containsAll(flags); + } } /** @@ -190,55 +205,85 @@ /** * Returns a human-readable status string. */ - private String getStatusString(int flag) { - StringBuffer result = new StringBuffer(); + private String getStatusString() { + StringBuilder result = new StringBuilder(); - if (flag == 0) - result.append("<> "); - if ((flag & CONNECT) != 0) - result.append("CONNECT "); - if ((flag & CONNECTING) != 0) - result.append("CONNECTING "); - if ((flag & CONNECTED) != 0) - result.append("CONNECTED "); - if ((flag & DOWNLOAD) != 0) - result.append("DOWNLOAD "); - if ((flag & DOWNLOADING) != 0) - result.append("DOWNLOADING "); - if ((flag & DOWNLOADED) != 0) - result.append("DOWNLOADED "); - if ((flag & ERROR) != 0) - result.append("ERROR "); - if ((flag & STARTED) != 0) - result.append("STARTED "); + synchronized (status) { + if (status.isEmpty()) { + return "<>"; + } + for (Status stat : status) { + result.append(stat.toString()).append(" "); + } + } - return result.deleteCharAt(result.length() - 1).toString(); + return result.toString().trim(); } /** * Changes the status by clearing the flags in the first * parameter and setting the flags in the second. This method * is synchronized on this resource. + * @param clear a collection of status flags to unset + * @param add a collection of status flags to set */ - public void changeStatus(int clear, int add) { - int orig = 0; + public void changeStatus(Collection clear, Collection add) { + synchronized (status) { + if (clear != null) { + status.removeAll(clear); + } + if (add != null) { + status.addAll(add); + } + } + } - synchronized (this) { - orig = status; + /** + * Set status flag + * @param flag a flag to set + */ + public void setStatusFlag(Status flag) { + synchronized (status) { + status.add(flag); + } + } - this.status &= ~clear; - this.status |= add; + /** + * Set flags + * @param flags a collection of flags to set + */ + public void setStatusFlags(Collection flags) { + synchronized (status) { + status.addAll(flags); } + } - if (status != orig) { - OutputController.getLogger().log("Status: " + getStatusString(status)); - if ((status & ~orig) != 0) { - OutputController.getLogger().log(" +(" + getStatusString(status & ~orig) + ")"); - } - if ((~status & orig) != 0) { - OutputController.getLogger().log(" -(" + getStatusString(~status & orig) + ")"); - } - OutputController.getLogger().log(" @ " + location.getPath()); + /** + * Unset flags + * @param flags a collection of flags to unset + */ + public void unsetStatusFlag(Collection flags) { + synchronized (status) { + status.removeAll(flags); + } + } + + /** + * Clear all flags + */ + public void resetStatus() { + synchronized (status) { + status.clear(); + } + } + + /** + * Check if this resource has been initialized + * @return true iff any flags have been set + */ + public boolean isInitialized() { + synchronized (status) { + return !status.isEmpty(); } } @@ -284,6 +329,16 @@ } } + @Override + public int hashCode() { + // FIXME: should probably have a better hashcode than this, but considering + // #equals(Object) was already defined first (without also overriding hashcode!), + // this is just being implemented in line with that so we don't break HashMaps, + // HashSets, etc + return location.hashCode(); + } + + @Override public boolean equals(Object other) { if (other instanceof Resource) { // this prevents the URL handler from looking up the IP @@ -296,8 +351,9 @@ return false; } + @Override public String toString() { - return "location=" + location.toString() + " state=" + getStatusString(status); + return "location=" + location.toString() + " state=" + getStatusString(); } } diff -r a784a0f1f821 -r d96760e31283 netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue May 13 12:21:07 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed May 14 15:04:16 2014 -0400 @@ -16,6 +16,8 @@ package net.sourceforge.jnlp.cache; +import static net.sourceforge.jnlp.cache.Resource.Status.*; + import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; @@ -31,6 +33,8 @@ import java.security.AccessController; import java.security.PrivilegedAction; import java.util.ArrayList; +import java.util.Collection; +import java.util.EnumSet; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -46,9 +50,9 @@ import net.sourceforge.jnlp.event.DownloadListener; import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.util.HttpUtils; -import net.sourceforge.jnlp.util.logging.OutputController; import net.sourceforge.jnlp.util.UrlUtils; import net.sourceforge.jnlp.util.WeakList; +import net.sourceforge.jnlp.util.logging.OutputController; /** * This class tracks the downloading of various resources of a @@ -104,17 +108,6 @@ /** notified on initialization or download of a resource */ private static final Object lock = new Object(); // used to lock static structures - // shortcuts - private static final int UNINITIALIZED = Resource.UNINITIALIZED; - private static final int CONNECT = Resource.CONNECT; - private static final int CONNECTING = Resource.CONNECTING; - private static final int CONNECTED = Resource.CONNECTED; - private static final int DOWNLOAD = Resource.DOWNLOAD; - private static final int DOWNLOADING = Resource.DOWNLOADING; - private static final int DOWNLOADED = Resource.DOWNLOADED; - private static final int ERROR = Resource.ERROR; - private static final int STARTED = Resource.STARTED; - /** max threads */ private static final int maxThreads = 5; @@ -251,7 +244,7 @@ // they will just 'pass through' the tracker as if they were // never added (for example, not affecting the total download size). synchronized (resource) { - resource.changeStatus(0, DOWNLOADED | CONNECTED | STARTED); + resource.changeStatus(EnumSet.noneOf(Resource.Status.class), EnumSet.of(DOWNLOADED, CONNECTED, STARTED)); } fireDownloadEvent(resource); return true; @@ -267,7 +260,7 @@ resource.localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); resource.size = resource.localFile.length(); resource.transferred = resource.localFile.length(); - resource.changeStatus(0, DOWNLOADED | CONNECTED | STARTED); + resource.changeStatus(EnumSet.noneOf(Resource.Status.class), EnumSet.of(DOWNLOADED, CONNECTED, STARTED)); } fireDownloadEvent(resource); return true; @@ -276,7 +269,7 @@ if (updatePolicy == UpdatePolicy.FORCE) { // ALWAYS update // When we are "always" updating, we update for each instance. Reset resource status. - resource.changeStatus(Integer.MAX_VALUE, 0); + resource.resetStatus(); } // may or may not be cached, but check update when connection @@ -322,18 +315,18 @@ l = listeners.toArray(new DownloadListener[0]); } - int status; + Collection status; synchronized (resource) { status = resource.status; } DownloadEvent event = new DownloadEvent(this, resource); for (DownloadListener dl : l) { - if (0 != ((ERROR | DOWNLOADED) & status)) + if (status.contains(ERROR) || status.contains(DOWNLOADED)) dl.downloadCompleted(event); - else if (0 != (DOWNLOADING & status)) + else if (status.contains(DOWNLOADING)) dl.downloadStarted(event); - else if (0 != (CONNECTING & status)) + else if (status.contains(CONNECTING)) dl.updateStarted(event); } } @@ -382,7 +375,7 @@ public File getCacheFile(URL location) { try { Resource resource = getResource(location); - if (!resource.isSet(DOWNLOADED | ERROR)) + if (!(resource.isSet(DOWNLOADED) || resource.isSet(ERROR))) waitForResource(location, 0); if (resource.isSet(ERROR)) @@ -420,7 +413,7 @@ public InputStream getInputStream(URL location) throws IOException { try { Resource resource = getResource(location); - if (!resource.isSet(DOWNLOADED | ERROR)) + if (!(resource.isSet(DOWNLOADED) || resource.isSet(ERROR))) waitForResource(location, 0); if (resource.localFile != null) @@ -491,7 +484,8 @@ * @throws IllegalResourceDescriptorException if the resource is not being tracked */ public boolean checkResource(URL location) { - return getResource(location).isSet(DOWNLOADED | ERROR); // isSet atomic + Resource resource = getResource(location); + return resource.isSet(DOWNLOADED) || resource.isSet(ERROR); } /** @@ -526,12 +520,12 @@ enqueue = !resource.isSet(STARTED); - if (!resource.isSet(CONNECTED | CONNECTING)) - resource.changeStatus(0, CONNECT | STARTED); - if (!resource.isSet(DOWNLOADED | DOWNLOADING)) - resource.changeStatus(0, DOWNLOAD | STARTED); + if (!(resource.isSet(CONNECTED) || resource.isSet(CONNECTING))) + resource.changeStatus(EnumSet.noneOf(Resource.Status.class), EnumSet.of(CONNECT, STARTED)); + if (!(resource.isSet(DOWNLOADED) || resource.isSet(DOWNLOADING))) + resource.changeStatus(EnumSet.noneOf(Resource.Status.class), EnumSet.of(DOWNLOAD, STARTED)); - if (!resource.isSet(DOWNLOAD | CONNECT)) + if (!(resource.isSet(DOWNLOAD) || resource.isSet(CONNECT))) enqueue = false; } @@ -604,7 +598,7 @@ */ private void queueResource(Resource resource) { synchronized (lock) { - if (!resource.isSet(CONNECT | DOWNLOAD)) + if (!(resource.isSet(CONNECT) || resource.isSet(DOWNLOAD))) throw new IllegalResourceDescriptorException("Invalid resource state (resource: " + resource + ")"); queue.add(resource); @@ -764,14 +758,14 @@ downloadEntry.store(); } - resource.changeStatus(DOWNLOADING, DOWNLOADED); + resource.changeStatus(EnumSet.of(DOWNLOADING), EnumSet.of(DOWNLOADED)); synchronized (lock) { lock.notifyAll(); // wake up wait's to check for completion } resource.fireDownloadEvent(); // fire DOWNLOADED } catch (Exception ex) { OutputController.getLogger().log(ex); - resource.changeStatus(0, ERROR); + resource.changeStatus(EnumSet.noneOf(Resource.Status.class), EnumSet.of(ERROR)); synchronized (lock) { lock.notifyAll(); // wake up wait's to check for completion } @@ -830,11 +824,11 @@ resource.localFile = localFile; // resource.connection = connection; resource.size = size; - resource.changeStatus(CONNECT | CONNECTING, CONNECTED); + resource.changeStatus(EnumSet.of(CONNECT, CONNECTING), EnumSet.of(CONNECTED)); // check if up-to-date; if so set as downloaded From omajid at icedtea.classpath.org Wed May 14 19:13:53 2014 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 14 May 2014 19:13:53 +0000 Subject: /hg/icedtea-web: 3 new changesets Message-ID: changeset d2bebf24c3ef in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d2bebf24c3ef author: Omair Majid date: Wed May 14 15:11:39 2014 -0400 More javadoc fixes for Java 8 Remove incorrect @throws and self-enclosing elements from javadocs. 2014-05-14 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java (JNLPFile(InputStream,ParserSettings)) (JNLPFile(InputStream,URL,ParserSettings)): Remove incorrect @throws IOException in javadoc. * netx/net/sourceforge/jnlp/SecurityDesc.java (fromHtmlString): Fix param name in javadoc. * netx/net/sourceforge/jnlp/util/FileUtils.java (showCouldNotOpenDialog): Remove incorrect @param filePath from javadoc. * netx/net/sourceforge/nanoxml/XMLParseException.java, * netx/net/sourceforge/nanoxml/XMLElement.java: Replace
with

. changeset e3981eb10285 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e3981eb10285 author: Omair Majid date: Wed May 14 15:11:40 2014 -0400 Make 'make check' work under OpenJDK 8 Use reflection to access a class that was moved from one package to another in OpenJDK 8. +2014-05-14 Omair Majid + + * tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java + (KeyPair): New class. + (createCert): Use KeyPair. changeset a008226315c1 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a008226315c1 author: Omair Majid date: Wed May 14 15:11:45 2014 -0400 Clean up comments in JarFile Update comments to indicate purpose of the class: preventing GIFAR attacks. Remove references to JDK6 that were at best secondary to the purpose of the class. Rename ZIP_LOCAL_FILE_HEADER_SIGNATURE to indicate that it is the header of a zip entry. Also fix some indentation issues. 2014-05-14 Omair Majid * netx/net/sourceforge/jnlp/util/JarFile.java: Rename ZIP_LOCAL_FILE_HEADER_SIGNATURE to ZIP_ENTRY_HEADER_SIGNATURE. Fix comments. diffstat: ChangeLog | 25 ++ netx/net/sourceforge/jnlp/JNLPFile.java | 2 - netx/net/sourceforge/jnlp/SecurityDesc.java | 2 +- netx/net/sourceforge/jnlp/util/FileUtils.java | 1 - netx/net/sourceforge/jnlp/util/JarFile.java | 84 ++++----- netx/net/sourceforge/nanoxml/XMLElement.java | 32 ++- netx/net/sourceforge/nanoxml/XMLParseException.java | 3 +- tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java | 84 +++++++++- 8 files changed, 161 insertions(+), 72 deletions(-) diffs (458 lines): diff -r d96760e31283 -r a008226315c1 ChangeLog --- a/ChangeLog Wed May 14 15:04:16 2014 -0400 +++ b/ChangeLog Wed May 14 15:11:45 2014 -0400 @@ -1,3 +1,28 @@ +2014-05-14 Omair Majid + + * netx/net/sourceforge/jnlp/util/JarFile.java: Rename + ZIP_LOCAL_FILE_HEADER_SIGNATURE to ZIP_ENTRY_HEADER_SIGNATURE. Fix + comments. + +2014-05-14 Omair Majid + + * tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java + (KeyPair): New class. + (createCert): Use KeyPair. + +2014-05-14 Omair Majid + + * netx/net/sourceforge/jnlp/JNLPFile.java + (JNLPFile(InputStream,ParserSettings)) + (JNLPFile(InputStream,URL,ParserSettings)): Remove incorrect @throws + IOException in javadoc. + * netx/net/sourceforge/jnlp/SecurityDesc.java + (fromHtmlString): Fix param name in javadoc. + * netx/net/sourceforge/jnlp/util/FileUtils.java + (showCouldNotOpenDialog): Remove incorrect @param filePath from javadoc. + * netx/net/sourceforge/nanoxml/XMLParseException.java, + * netx/net/sourceforge/nanoxml/XMLElement.java: Replace
with

. + 2014-05-14 Andrew Azores * netx/net/sourceforge/jnlp/cache/Resource.java: (Status) new enum diff -r d96760e31283 -r a008226315c1 netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Wed May 14 15:04:16 2014 -0400 +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Wed May 14 15:11:45 2014 -0400 @@ -267,7 +267,6 @@ /** * Create a JNLPFile from an input stream. * - * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ public JNLPFile(InputStream input, ParserSettings settings) throws ParseException { @@ -281,7 +280,6 @@ * @param input input stream of JNLP file. * @param codebase codebase to use if not specified in JNLP file.. * @param settings the {@link ParserSettings} to use when parsing - * @throws IOException if an IO exception occurred * @throws ParseException if the JNLP file was invalid */ public JNLPFile(InputStream input, URL codebase, ParserSettings settings) throws ParseException { diff -r d96760e31283 -r a008226315c1 netx/net/sourceforge/jnlp/SecurityDesc.java --- a/netx/net/sourceforge/jnlp/SecurityDesc.java Wed May 14 15:04:16 2014 -0400 +++ b/netx/net/sourceforge/jnlp/SecurityDesc.java Wed May 14 15:11:45 2014 -0400 @@ -90,7 +90,7 @@ * The HTML permission level corresponding to the given String. If null is given, null comes * back. If there is no permission level that can be granted in HTML matching the given String, * null is also returned. - * @param jnlpString the JNLP permission String + * @param htmlString the JNLP permission String * @return the matching RequestedPermissionLevel */ public RequestedPermissionLevel fromHtmlString(final String htmlString) { diff -r d96760e31283 -r a008226315c1 netx/net/sourceforge/jnlp/util/FileUtils.java --- a/netx/net/sourceforge/jnlp/util/FileUtils.java Wed May 14 15:04:16 2014 -0400 +++ b/netx/net/sourceforge/jnlp/util/FileUtils.java Wed May 14 15:11:45 2014 -0400 @@ -394,7 +394,6 @@ /** * Show a dialog informing the user that the file could not be opened * @param frame a {@link JFrame} to act as parent to this dialog - * @param filePath a {@link String} representing the path to the file we failed to open * @param message a {@link String} giving the specific reason the file could not be opened */ public static void showCouldNotOpenDialog(final Component frame, final String message) { diff -r d96760e31283 -r a008226315c1 netx/net/sourceforge/jnlp/util/JarFile.java --- a/netx/net/sourceforge/jnlp/util/JarFile.java Wed May 14 15:04:16 2014 -0400 +++ b/netx/net/sourceforge/jnlp/util/JarFile.java Wed May 14 15:11:45 2014 -0400 @@ -43,94 +43,82 @@ import java.io.InputStream; import net.sourceforge.jnlp.runtime.JNLPRuntime; -//in jdk6 java.util.jar.JarFile is not Closeable - fixing -//overwritening class can add duplicate occurence of interface so this should be perfectly safe -public class JarFile extends java.util.jar.JarFile implements Closeable{ +/** + * A wrapper over {@link java.util.jar.JarFile} that verifies zip headers to + * protect against GIFAR attacks. + * + * @see Gifar + */ +public class JarFile extends java.util.jar.JarFile implements Closeable { public JarFile(String name) throws IOException { - super(name); - verifyZipHeader(new File(name)); + super(name); + verifyZipHeader(new File(name)); } - /** - */ public JarFile(String name, boolean verify) throws IOException { super(name, verify); verifyZipHeader(new File(name)); } - /** - */ public JarFile(File file) throws IOException { super(file); verifyZipHeader(file); } - /** - */ public JarFile(File file, boolean verify) throws IOException { super(file, verify); verifyZipHeader(file); } - /* - */ public JarFile(File file, boolean verify, int mode) throws IOException { super(file, verify, mode); - verifyZipHeader(file); + verifyZipHeader(file); } - - - - + /** - * According to specification - - * http://www.pkware.com/documents/casestudies/APPNOTE.TXT or just google - * around zip header all entries in zip-compressed must start with well - * known "PK" which is defined as hexa x50 x4b x03 x04, which in decimal are - * 80 75 3 4. - * + * The ZIP specification requires that the zip header for all entries in a + * zip-compressed archive must start with a well known "PK" which is + * defined as hex x50 x4b x03 x04. + *

* Note - this is not file-header, it is item-header. - * - * Actually most of compressing formats have some n-bytes header se eg: + *

+ * Actually most of compressing formats have some n-bytes headers. Eg: * http://www.gzip.org/zlib/rfc-gzip.html#header-trailer for ID1 and ID2 so * in case that some differently compressed jars will come to play, this is - * the palce where to fix it. + * the place where to fix it. * + * @see ZIP Specification */ - private static final byte[] ZIP_LOCAL_FILE_HEADER_SIGNATURE = new byte[]{80, 75, 3, 4}; + private static final byte[] ZIP_ENTRY_HEADER_SIGNATURE = new byte[] {0x50, 0x4b, 0x03, 0x04}; /** - * This method is checking first four bytes of jar-file against - * ZIP_LOCAL_FILE_HEADER_SIGNATURE - * + * Verify the header for the zip entry. + *

* Although zip specification allows to skip all corrupted entries, it is - * not safe for jars. If first four bytes of file are not zip - * ZIP_LOCAL_FILE_HEADER_SIGNATURE then exception is thrown - * - * As noted, ZIP_LOCAL_FILE_HEADER_SIGNATURE is not ile-header, but is item-header. - * Possible attack is using the fact that entries without header are considered - * corrupted and so can be ignoered. However, for other they can have some meaning. - * - * So for our purposes we must insists on first record to be valid. - * - * @param file - * @throws IOException - * @throws InvalidJarHeaderException + * not safe for jars since it allows a different format to fake itself as + * a Jar. */ - public static void verifyZipHeader(File file) throws IOException { + private void verifyZipHeader(File file) throws IOException { if (!JNLPRuntime.isIgnoreHeaders()) { InputStream s = new FileInputStream(file); + + /* + * Theoretically, a valid ZIP file can begin with anything. We + * ensure it begins with a valid entry header to confirm it only + * contains zip entries. + */ + try { - byte[] buffer = new byte[ZIP_LOCAL_FILE_HEADER_SIGNATURE.length]; + byte[] buffer = new byte[ZIP_ENTRY_HEADER_SIGNATURE.length]; /* * for case that new byte[] will accidently initialize same * sequence as zip header and during the read the buffer will not be filled - */ + */ for (int i = 0; i < buffer.length; i++) { buffer[i] = 0; } - int toRead = ZIP_LOCAL_FILE_HEADER_SIGNATURE.length; + int toRead = ZIP_ENTRY_HEADER_SIGNATURE.length; int readSoFar = 0; int n = 0; /* @@ -144,7 +132,7 @@ } } for (int i = 0; i < buffer.length; i++) { - if (buffer[i] != ZIP_LOCAL_FILE_HEADER_SIGNATURE[i]) { + if (buffer[i] != ZIP_ENTRY_HEADER_SIGNATURE[i]) { throw new InvalidJarHeaderException("Jar " + file.getName() + " do not heave valid header. You can skip this check by -Xignoreheaders"); } } diff -r d96760e31283 -r a008226315c1 netx/net/sourceforge/nanoxml/XMLElement.java --- a/netx/net/sourceforge/nanoxml/XMLElement.java Wed May 14 15:04:16 2014 -0400 +++ b/netx/net/sourceforge/nanoxml/XMLElement.java Wed May 14 15:11:45 2014 -0400 @@ -39,7 +39,7 @@ /** * XMLElement is a representation of an XML object. The object is able to parse * XML code. - *

+ *
*
Parsing XML Data
*
* You can parse XML data using the following code: @@ -83,7 +83,6 @@ * {@link #createAnotherElement() createAnotherElement} * which has to return a new copy of the receiver. *
- *

* * @see net.sourceforge.nanoxml.XMLParseException * @@ -178,7 +177,8 @@ private boolean ignoreWhitespace; /** - * Character read too much.
+ * Character read too much. + *

* This character provides push-back functionality to the input reader * without having to use a PushbackReader. * If there is no such character, this field is {@code '\0'}. @@ -210,7 +210,8 @@ private int parserLineNr; /** - * Creates and initializes a new XML element.
+ * Creates and initializes a new XML element. + *

* Calling the construction is equivalent to: *

  • {@code new XMLElement(new Hashtable(), false, true)}
* @@ -400,7 +401,8 @@ } /** - * Returns an attribute of the element.
+ * Returns an attribute of the element. + *

* If the attribute doesn't exist, {@code null} is returned. * * @param name The name of the attribute. @@ -535,7 +537,7 @@ * The new name. * *

Preconditions:
- *
    + *
    • {@code name != null}
    • *
    • {@code name} is a valid XML identifier
    • *
*/ @@ -597,7 +599,8 @@ } /** - * This method scans an identifier from the current reader.
+ * This method scans an identifier from the current reader. + *

* The scanned whitespace is appended to {@code result}. * * @return the next character following the whitespace. @@ -625,7 +628,8 @@ } /** - * This method scans a delimited string from the current reader.
+ * This method scans a delimited string from the current reader. + *

* The scanned string without delimiters is appended to {@code string}. * *

Preconditions:
@@ -653,8 +657,10 @@ /** * Scans a {@code #PCDATA} element. CDATA sections and entities are - * resolved.
- * The next < char is skipped.
+ * resolved. + *

+ * The next < char is skipped. + *

* The scanned data is appended to {@code data}. * *

Preconditions:
@@ -831,7 +837,8 @@ } /** - * Scans the data for literal text.
+ * Scans the data for literal text. + *

* Scanning stops when a character does not match or after the complete * text has been checked, whichever comes first. * @@ -985,7 +992,8 @@ } /** - * Resolves an entity. The name of the entity is read from the reader.
+ * Resolves an entity. The name of the entity is read from the reader. + *

* The value of the entity is appended to {@code buf}. * * @param buf Where to put the entity value. diff -r d96760e31283 -r a008226315c1 netx/net/sourceforge/nanoxml/XMLParseException.java --- a/netx/net/sourceforge/nanoxml/XMLParseException.java Wed May 14 15:04:16 2014 -0400 +++ b/netx/net/sourceforge/nanoxml/XMLParseException.java Wed May 14 15:11:45 2014 -0400 @@ -32,7 +32,8 @@ * An XMLParseException is thrown when an error occures while parsing an XML * string. *

- * $Revision: 1.1 $
+ * $Revision: 1.1 $

+ *

* $Date: 2002/08/03 04:05:32 $

* * @see net.sourceforge.nanoxml.XMLElement diff -r d96760e31283 -r a008226315c1 tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java --- a/tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java Wed May 14 15:04:16 2014 -0400 +++ b/tests/test-extensions/net/sourceforge/jnlp/tools/CodeSignerCreator.java Wed May 14 15:11:45 2014 -0400 @@ -25,17 +25,24 @@ package net.sourceforge.jnlp.tools; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; import java.security.CodeSigner; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; import java.security.PrivateKey; +import java.security.SignatureException; import java.security.Timestamp; import java.security.cert.CertPath; +import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.ArrayList; import java.util.Date; import sun.security.x509.AlgorithmId; -import sun.security.x509.CertAndKeyGen; import sun.security.x509.CertificateAlgorithmId; import sun.security.x509.CertificateIssuerName; import sun.security.x509.CertificateSerialNumber; @@ -72,13 +79,10 @@ // KeyTool#doGenKeyPair X500Name x500Name = new X500Name(dname); - CertAndKeyGen keypair = new CertAndKeyGen(keyAlgName, sigAlgName); + KeyPair keyPair = new KeyPair(keyAlgName, sigAlgName, keysize); + PrivateKey privKey = keyPair.getPrivateKey(); - keypair.generate(keysize); - PrivateKey privKey = keypair.getPrivateKey(); - - X509Certificate oldCert = keypair.getSelfCertificate(x500Name, - notBefore, validity * 24L * 60L * 60L); + X509Certificate oldCert = keyPair.getSelfCertificate(x500Name, notBefore, validity); // KeyTool#doSelfCert byte[] encoded = oldCert.getEncoded(); @@ -142,4 +146,70 @@ Timestamp certTimestamp = new Timestamp(jarEntryCert.getNotBefore(), certPath); return new CodeSigner(certPath, certTimestamp); } + + /** + * A wrapper over JDK-internal CertAndKeyGen Class. + *

+ * This is an internal class whose package changed between OpenJDK 7 and 8. + * Use reflection to access the right thing. + */ + public static class KeyPair { + + private /* CertAndKeyGen */ Object keyPair; + + public KeyPair(String keyAlgName, String sigAlgName, int keySize) throws NoSuchAlgorithmException, InvalidKeyException { + try { + // keyPair = new CertAndKeyGen(keyAlgName, sigAlgName); + Class certAndKeyGenClass = Class.forName(getCertAndKeyGenClass()); + Constructor constructor = certAndKeyGenClass.getDeclaredConstructor(String.class, String.class); + keyPair = constructor.newInstance(keyAlgName, sigAlgName); + + // keyPair.generate(keySize); + Method generate = certAndKeyGenClass.getMethod("generate", int.class); + generate.invoke(keyPair, keySize); + } catch (ClassNotFoundException | NoSuchMethodException | SecurityException | InstantiationException | + IllegalAccessException | IllegalArgumentException | InvocationTargetException certAndKeyGenClassError) { + throw new AssertionError("Unable to use CertAndKeyGen class", certAndKeyGenClassError); + } + } + + public PrivateKey getPrivateKey() { + try { + // return keyPair.getPrivateKey(); + Class klass = keyPair.getClass(); + Method method = klass.getMethod("getPrivateKey"); + return (PrivateKey) method.invoke(keyPair); + } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException error) { + throw new AssertionError(error); + } + } + + public X509Certificate getSelfCertificate(X500Name name, Date notBefore, long validityInDays) + throws InvalidKeyException, CertificateException, SignatureException, + NoSuchAlgorithmException, NoSuchProviderException { + try { + // return keyPair.getSelfCertificate(name, notBefore, validityInDays * 24L * 60L * 60L); + Class klass = keyPair.getClass(); + Method method = klass.getMethod("getSelfCertificate", X500Name.class, Date.class, long.class); + return (X509Certificate) method.invoke(keyPair, name, notBefore, validityInDays * 24L * 60L * 60L); + } catch (InvocationTargetException ite) { + throw new RuntimeException(ite.getCause()); + } catch (NoSuchMethodException | IllegalAccessException | IllegalArgumentException error) { + throw new AssertionError(error); + } + } + + private String getCertAndKeyGenClass() { + String javaVersion = System.getProperty("java.version"); + String className = null; + if (javaVersion.startsWith("1.7")) { + className = "sun.security.x509.CertAndKeyGen"; + } else if (javaVersion.startsWith("1.8")) { + className = "sun.security.tools.keytool.CertAndKeyGen"; + } else { + throw new AssertionError("Unrecognized Java Version"); + } + return className; + } + } } From aazores at redhat.com Wed May 14 19:25:20 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 14 May 2014 15:25:20 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <20140514181437.GD13117@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <537232A9.2000209@redhat.com> <20140514181437.GD13117@redhat.com> Message-ID: <5373C320.3070508@redhat.com> On 05/14/2014 02:14 PM, Omair Majid wrote: > Hi, > > Just one concern. This isn't a blocker; feel free to fix it in another > patch. > > * Andrew Azores [2014-05-13 10:57]: >> @Test >> - public void testSelectByFlag() throws Exception { >> + public void testSelectByStatus() throws Exception { >> Resource connectedResource = Resource.getResource(new URL("http://example.com/connected.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); >> - connectedResource.status = Resource.CONNECTED | Resource.DOWNLOADING; >> + connectedResource.setStatusFlags(EnumSet.of(CONNECTED, DOWNLOADING)); >> Resource erroredResource = Resource.getResource(new URL("http://example.com/errored.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); >> - erroredResource.status = Resource.ERROR | Resource.CONNECT; >> + erroredResource.setStatusFlags(EnumSet.of(ERROR, CONNECT)); >> Resource downloadingResource = Resource.getResource(new URL("http://example.com/downloading.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); >> - downloadingResource.status = Resource.DOWNLOADING; >> + downloadingResource.setStatusFlag(DOWNLOADING); >> Resource uninitializedResource = Resource.getResource(new URL("http://example.com/uninitialized.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); >> List source = Arrays.asList(connectedResource, erroredResource, downloadingResource, uninitializedResource); >> >> - Resource result1 = ResourceTracker.selectByFlag(source, Resource.CONNECT | Resource.CONNECTING | Resource.CONNECTED, Resource.ERROR); >> - Resource result2 = ResourceTracker.selectByFlag(source, Resource.DOWNLOADING, Resource.CONNECTED); >> - Resource result3 = ResourceTracker.selectByFlag(source, Resource.DOWNLOADED, Resource.UNINITIALIZED); >> - Resource result4 = ResourceTracker.selectByFlag(source, Resource.UNINITIALIZED, Integer.MAX_VALUE); >> - Resource result5 = ResourceTracker.selectByFlag(source, Resource.CONNECT | Resource.CONNECTING | Resource.CONNECTED, Resource.DOWNLOADING); >> + Resource result1 = ResourceTracker.selectByStatus(source, EnumSet.of(CONNECT, CONNECTING, CONNECTED), EnumSet.of(ERROR)); >> + Resource result2 = ResourceTracker.selectByStatus(source, DOWNLOADING, CONNECTED); >> + Resource result3 = ResourceTracker.selectByFilter(source, new ResourceTracker.Filter() { >> + @Override >> + public boolean test(Resource t) { >> + return t.isSet(DOWNLOADED) && t.isInitialized(); >> + } >> + }); >> + Resource result4 = ResourceTracker.selectByFilter(source, new ResourceTracker.Filter() { >> + @Override >> + public boolean test(Resource t) { >> + return !t.isInitialized(); >> + } >> + }); >> + Resource result5 = ResourceTracker.selectByStatus(source, EnumSet.of(CONNECT, CONNECTING, CONNECTED), EnumSet.of(DOWNLOADING)); >> >> - Assert.assertEquals(connectedResource, result1); >> - Assert.assertEquals(downloadingResource, result2); >> + Assert.assertEquals("result1 should be connected resource", connectedResource, result1); >> + Assert.assertEquals("result2 should be downloading resource", downloadingResource, result2); >> Assert.assertNull("Result 3 should have been null", result3); >> - Assert.assertEquals(uninitializedResource, result4); >> - Assert.assertEquals(erroredResource, result5); >> + Assert.assertEquals("result4 should be uninitialized resource", uninitializedResource, result4); >> + Assert.assertEquals("result5 should be errored resource", erroredResource, result5); > This test is too big. I would like to see it broken up into smaller > tests that each check for one thing. > > Thanks, > Omair > How's this? Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: resourcetrackertest-split.patch Type: text/x-patch Size: 5430 bytes Desc: not available URL: From omajid at redhat.com Wed May 14 19:32:07 2014 From: omajid at redhat.com (Omair Majid) Date: Wed, 14 May 2014 15:32:07 -0400 Subject: [rfc][icedtea-web] Resource/ResourceTracker clean up In-Reply-To: <5373C320.3070508@redhat.com> References: <53693A00.7000607@redhat.com> <5369ECF8.9050304@redhat.com> <537232A9.2000209@redhat.com> <20140514181437.GD13117@redhat.com> <5373C320.3070508@redhat.com> Message-ID: <20140514193207.GE13117@redhat.com> * Andrew Azores [2014-05-14 15:25]: > How's this? This is fantastic! Please push it. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at icedtea.classpath.org Wed May 14 19:49:37 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Wed, 14 May 2014 19:49:37 +0000 Subject: /hg/icedtea-web: ResourceTracker selectByStatus split into small... Message-ID: changeset 22761e42d5b3 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=22761e42d5b3 author: Andrew Azores date: Wed May 14 15:44:19 2014 -0400 ResourceTracker selectByStatus split into smaller tests 2014-05-14 Andrew Azores * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: (testSelectByStatus) split into (testSelectByStatusOneMatchingResource, testSelectByStatusNoMatchingResource, testSelectByStatusExcludedResources, testSelectByStatusMixedResources, testSelectByFilterUninitialized) diffstat: ChangeLog | 7 + tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java | 79 ++++++--- 2 files changed, 61 insertions(+), 25 deletions(-) diffs (110 lines): diff -r a008226315c1 -r 22761e42d5b3 ChangeLog --- a/ChangeLog Wed May 14 15:11:45 2014 -0400 +++ b/ChangeLog Wed May 14 15:44:19 2014 -0400 @@ -1,3 +1,10 @@ +2014-05-14 Andrew Azores + + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: + (testSelectByStatus) split into (testSelectByStatusOneMatchingResource, + testSelectByStatusNoMatchingResource, testSelectByStatusExcludedResources, + testSelectByStatusMixedResources, testSelectByFilterUninitialized) + 2014-05-14 Omair Majid * netx/net/sourceforge/jnlp/util/JarFile.java: Rename diff -r a008226315c1 -r 22761e42d5b3 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Wed May 14 15:11:45 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java Wed May 14 15:44:19 2014 -0400 @@ -78,38 +78,67 @@ private static final String nameStub1 = "itw-server"; private static final String nameStub2 = "test-file"; + private static Resource createResource(final String name) throws MalformedURLException { + return Resource.getResource(new URL("http://example.com/" + name + ".jar"), new Version("1.0"), UpdatePolicy.ALWAYS); + } + @Test - public void testSelectByStatus() throws Exception { - Resource connectedResource = Resource.getResource(new URL("http://example.com/connected.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); - connectedResource.setStatusFlags(EnumSet.of(CONNECTED, DOWNLOADING)); - Resource erroredResource = Resource.getResource(new URL("http://example.com/errored.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); - erroredResource.setStatusFlags(EnumSet.of(ERROR, CONNECT)); - Resource downloadingResource = Resource.getResource(new URL("http://example.com/downloading.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); - downloadingResource.setStatusFlag(DOWNLOADING); - Resource uninitializedResource = Resource.getResource(new URL("http://example.com/uninitialized.jar"), new Version("1.0"), UpdatePolicy.ALWAYS); - List source = Arrays.asList(connectedResource, erroredResource, downloadingResource, uninitializedResource); + public void testSelectByStatusOneMatchingResource() throws Exception { + Resource resource = createResource("oneMatchingResource"); + Assert.assertNotNull(resource); + resource.setStatusFlag(DOWNLOADING); + List resources = Arrays.asList(resource); + Resource result = ResourceTracker.selectByStatus(resources, DOWNLOADING, ERROR); + Assert.assertEquals(resource, result); + } - Resource result1 = ResourceTracker.selectByStatus(source, EnumSet.of(CONNECT, CONNECTING, CONNECTED), EnumSet.of(ERROR)); - Resource result2 = ResourceTracker.selectByStatus(source, DOWNLOADING, CONNECTED); - Resource result3 = ResourceTracker.selectByFilter(source, new ResourceTracker.Filter() { - @Override - public boolean test(Resource t) { - return t.isSet(DOWNLOADED) && t.isInitialized(); - } - }); - Resource result4 = ResourceTracker.selectByFilter(source, new ResourceTracker.Filter() { + @Test + public void testSelectByStatusNoMatchingResource() throws Exception { + Resource resource = createResource("noMatchingResource"); + Assert.assertNotNull(resource); + List resources = Arrays.asList(resource); + Resource result = ResourceTracker.selectByStatus(resources, DOWNLOADING, ERROR); + Assert.assertNull(result); + } + + @Test + public void testSelectByStatusExcludedResources() throws Exception { + Resource resource = createResource("excludedResources"); + Assert.assertNotNull(resource); + resource.setStatusFlag(ERROR); + List resources = Arrays.asList(resource); + Resource result = ResourceTracker.selectByStatus(resources, DOWNLOADING, ERROR); + Assert.assertNull(result); + } + + @Test + public void testSelectByStatusMixedResources() throws Exception { + Resource r1 = createResource("mixedResources1"); + Assert.assertNotNull(r1); + r1.setStatusFlag(CONNECTED); + r1.setStatusFlag(DOWNLOADING); + Resource r2 = createResource("mixedResources2"); + Assert.assertNotNull(r2); + r2.setStatusFlag(CONNECTED); + r2.setStatusFlag(DOWNLOADING); + r2.setStatusFlag(ERROR); + List resources = Arrays.asList(r1, r2); + Resource result = ResourceTracker.selectByStatus(resources, EnumSet.of(CONNECTED, DOWNLOADING), EnumSet.of(ERROR)); + Assert.assertEquals(r1, result); + } + + @Test + public void testSelectByFilterUninitialized() throws Exception { + Resource resource = createResource("filterUninitialized"); + Assert.assertNotNull(resource); + List resources = Arrays.asList(resource); + Resource result = ResourceTracker.selectByFilter(resources, new ResourceTracker.Filter() { @Override public boolean test(Resource t) { return !t.isInitialized(); } }); - Resource result5 = ResourceTracker.selectByStatus(source, EnumSet.of(CONNECT, CONNECTING, CONNECTED), EnumSet.of(DOWNLOADING)); - - Assert.assertEquals("result1 should be connected resource", connectedResource, result1); - Assert.assertEquals("result2 should be downloading resource", downloadingResource, result2); - Assert.assertNull("Result 3 should have been null", result3); - Assert.assertEquals("result4 should be uninitialized resource", uninitializedResource, result4); - Assert.assertEquals("result5 should be errored resource", erroredResource, result5); + Assert.assertEquals(resource, result); } @Test From ptisnovs at icedtea.classpath.org Thu May 15 09:45:18 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 15 May 2014 09:45:18 +0000 Subject: /hg/rhino-tests: Updated (c) years. Message-ID: changeset 5f9eba77856c in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=5f9eba77856c author: ptisnovs date: Thu May 15 11:45:12 2014 +0200 Updated (c) years. diffstat: ChangeLog | 12 ++++++++++++ src/org/RhinoTests/BaseRhinoTest.java | 3 ++- src/org/RhinoTests/CompilableClassTest.java | 2 +- src/org/RhinoTests/CompilableTest.java | 2 +- src/org/RhinoTests/CompiledScriptTest.java | 2 +- src/org/RhinoTests/Constants.java | 2 +- src/org/RhinoTests/ScriptContextTest.java | 2 +- src/org/RhinoTests/ScriptEngineFactoryTest.java | 2 +- src/org/RhinoTests/ScriptEngineManagerTest.java | 2 +- 9 files changed, 21 insertions(+), 8 deletions(-) diffs (120 lines): diff -r 0f868bb629f5 -r 5f9eba77856c ChangeLog --- a/ChangeLog Wed May 14 11:10:19 2014 +0200 +++ b/ChangeLog Thu May 15 11:45:12 2014 +0200 @@ -1,3 +1,15 @@ +2014-05-15 Pavel Tisnovsky + + * src/org/RhinoTests/BaseRhinoTest.java: + * src/org/RhinoTests/CompilableClassTest.java: + * src/org/RhinoTests/CompilableTest.java: + * src/org/RhinoTests/CompiledScriptTest.java: + * src/org/RhinoTests/Constants.java: + * src/org/RhinoTests/ScriptContextTest.java: + * src/org/RhinoTests/ScriptEngineFactoryTest.java: + * src/org/RhinoTests/ScriptEngineManagerTest.java: + Updated (c) years. + 2014-05-14 Pavel Tisnovsky * src/org/RhinoTests/Log.java: diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/BaseRhinoTest.java --- a/src/org/RhinoTests/BaseRhinoTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/BaseRhinoTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011, 2012 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. @@ -485,3 +485,4 @@ return Integer.parseInt(parts[1]); } } + diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/CompilableClassTest.java --- a/src/org/RhinoTests/CompilableClassTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/CompilableClassTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011, 2012, 2013 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/CompilableTest.java --- a/src/org/RhinoTests/CompilableTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/CompilableTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011, 2012 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/CompiledScriptTest.java --- a/src/org/RhinoTests/CompiledScriptTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/CompiledScriptTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/Constants.java --- a/src/org/RhinoTests/Constants.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/Constants.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/ScriptEngineFactoryTest.java --- a/src/org/RhinoTests/ScriptEngineFactoryTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/ScriptEngineFactoryTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. diff -r 0f868bb629f5 -r 5f9eba77856c src/org/RhinoTests/ScriptEngineManagerTest.java --- a/src/org/RhinoTests/ScriptEngineManagerTest.java Wed May 14 11:10:19 2014 +0200 +++ b/src/org/RhinoTests/ScriptEngineManagerTest.java Thu May 15 11:45:12 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. From jvanek at redhat.com Thu May 15 10:55:06 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 15 May 2014 12:55:06 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <537267C0.6050805@redhat.com> References: <537267C0.6050805@redhat.com> Message-ID: <53749D0A.30707@redhat.com> Please threat this as regular review request :) On 05/13/2014 08:43 PM, Jiri Vanek wrote: > Hi! > > This patch allows ITW to run on any openjdk or oracle jdk(I have not yet tested with IBM, but will do) > > This is probably not final version of the patch - as it break all tests using PluginAppletMocks - > Its easy - tests do not run on bootclassapth, so the Ancestor of my Access class is in different > classlaoder. > Moving tests to bootclassapth[2] do not help, as then even worse things happens. But it should be > solution-able. Anyway I think that removing those 9 tests is small cost for get rid of dependence on > icedtea (plugin-hole patch) > > There is nasty override of run method. Inside is copypasted code and it is vulnerable. I will try > to propose the change > > > - private runLoader() > + runLoader() > > to upstream. If they accept, then actually no hacking will be needed and the hook will be pretty > clear (except refelction based getters and setter, which is quite ok...) > > Opened to RFC, > > J > > (yah it really worked on plain upstream oraclejdk7 or openjdk7 :) ) Oh! It even worked on IBM JDk! Well we do not compile against it - checking if sun.security.provider.X509Factory is available... no configure: error: sun.security.provider.X509Factory not found. ... checking if sun.security.x509.X500Name is available... no configure: error: sun.security.x509.X500Name not found. ... and same for ValidatorException but, those are an week dependencies, and ITW is trying to work without it. So if we compile by Oracle or Open JDK, and then change JVM to IBM in itw-settingd - Then it works on simple appelts! Well, continue. If those checks are removed, then IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler]) #IT_CHECK_FOR_CLASS(SUN_SECURITY_PROVIDER_X509FACTORY, [sun.security.provider.X509Factory]) IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.SecurityConstants]) IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker]) #IT_CHECK_FOR_CLASS(SUN_SECURITY_X509_X500NAME, [sun.security.x509.X500Name]) IT_CHECK_FOR_CLASS(SUN_MISC_HEXDUMPENCODER, [sun.misc.HexDumpEncoder]) #IT_CHECK_FOR_CLASS(SUN_SECURITY_VALIDATOR_VALIDATOREXCEPTION, [sun.security.validator.ValidatorException]) IT_CHECK_FOR_CLASS(COM_SUN_NET_SSL_INTERNAL_SSL_X509EXTENDEDTRUSTMANAGER, [com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager]) then compilation fails, because classes like String or so are missing. This is quite clear because IBM java is split to much more parts then oracle/open JDK. To make compilation work, we have to extend our bootstrap JDK. (which is a bit broken, it still calls itself like jdk-1.6 - but should call itself jdk-1.7) OR maybe we can get rid of it? Anyway - the above missing security classes are inside IBM jdk to: [jvanek at jvanek jre]$ grep -r X509Factory * Binary file lib/ext/ibmjcefips.jar matches Binary file lib/ext/ibmjceprovider.jar matches Binary file lib/ext/ibmpkcs11impl.jar matches Binary file lib/ibmcertpathprovider.jar matches [jvanek at jvanek jre]$ grep -r ValidatorException * Binary file lib/ibmcertpathfw.jar matches Binary file lib/ibmcertpathprovider.jar matches Binary file lib/ibmpkcs.jar matches [jvanek at jvanek jre]$ grep -r X500Name * Binary file lib/ibmcertpathfw.jar matches Binary file lib/ibmcertpathprovider.jar matches Binary file lib/ibmpkcs.jar match But we have to change javwas and plugin luncher bootclassapth a bit... How worthy is IBM java support? Well - if we agrred on IBM support or at least "support" then I'mnotsure if we should try to push also > - private runLoader() > + runLoader() ps: some ibm archs needs both javaws and pugin, some just plugin O:) - http://www.ibm.com/developerworks/java/jdk/linux/download.html path to Openjdk. Well insome time it will bubble to Oracle bits, but when to Ibm bits? maybe never.... The patch itself is only a modified a bit - added configure check - changed boot classpath for tests Well the tests are still broken in same way as without this (test bootclassapth) change. And I do not understand why. However i think this change is (according to rest of chnageset) better then no change. Well whats wrong with the tests. It seems that my "test bootclasspath change" have no efect. In both cases (changed/not changed tests bootclasspath) all tests using PluginMocks are failing: .... FAILED: testJavascriptFinalize(sun.applet.PluginAppletViewerTest) null Exception in thread "Thread-2" java.lang.IllegalAccessError: class *sun.applet.AppletViewerPanelAccess cannot access its superclass sun.applet.AppletViewerPanel* at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449) at java.net.URLClassLoader.access$100(URLClassLoader.java:71) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at sun.applet.PluginAppletViewerTest$3.call(PluginAppletViewerTest.java:127) at sun.applet.PluginAppletViewerTest$3.call(PluginAppletViewerTest.java:125) at net.sourceforge.jnlp.AsyncCall$HandlerThread$1.run(AsyncCall.java:74) FAILED: testJavascriptCall(sun.applet.PluginAppletViewerTest) null .... Which is quit clear, (When non public Ancestor have different classlaoder then it can not be ancestor), but changed tests bootclasspath should fix ti... Now, when I run the same from commandline (after its compiled) jvanek at jvanek unit]$ pwd /home/jvanek/Desktop/icedtea-web/tests.build/netx/unit jvanek at jvanek unit]$ class_names=`cat /home/jvanek/Desktop/icedtea-web/unit_class_names` ; [jvanek at jvanek unit]$ CLASSPATH=/home/jvanek/Desktop/icedtea-web/netx.build/lib/classes.jar:/home/jvanek/Desktop/icedtea-web/liveconnect/lib/classes.jar:/usr/share/java/junit4.jar:/home/jvanek/Desktop/icedtea-web/junit-runner.jar:/home/jvanek/Desktop/icedtea-web/tests.build/test-extensions:.:/home/jvanek/Desktop/icedtea-web/tests/test-extensions:/usr/share/java/tagsoup.jar then:[jvanek at jvanek unit]$ /home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/bin/java -Xbootclasspath:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/rt.jar:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jresr/share/java/js.jar:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/resources.jar -cp $CLASSPATH CommandLine $class_names is reproducing the same "cannot access its superclass " error but [jvanek at jvanek unit]$ /home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/bin/java -Xbootclasspath:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/rt.jar:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/jsse.jar:/usr/share/java/js.jar:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/resources.jar:$CLASSPATH CommandLine $class_names or [jvanek at jvanek unit]$ /home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/bin/java -Xbootclasspath:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/rt.jar:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/jsse.jar:/usr/share/java/js.jar:/home/jvanek/Desktop/icedtea-web/bootstrap/jdk1.6.0/jre/lib/resources.jar:$CLASSPATH -cp $CLASSPATH CommandLine $class_names have the "cannot access its superclass" *FIXED* but add those strange failures: FAILED: testApplicationExtraChild(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateDifferentFile(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testApplicationComments(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateComments(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testApplicationDifferentOrder(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testApplicationDifferentFile(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testApplicationCDATA(net.sourceforge.jnlp.JNLPMatcherTest) null - This test is known to fail FAILED: testApplicationDuplicate(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateDifferentOrder(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateWildCharsAsAllValues(net.sourceforge.jnlp.JNLPMatcherTest) null Passed: net.sourceforge.jnlp.JNLPMatcherTest.testIsMatchDoesNotHangOnLargeData FAILED: testApplicationWildCharsRandom(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateFewerChild(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateWildCharsRandom(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateDifferentValues(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testApplicationDifferentCodebaseValue(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testNullJNLPFiles(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testCallingMatchMultiple(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testApplicationFewerChild(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateDuplicate(net.sourceforge.jnlp.JNLPMatcherTest) null FAILED: testTemplateExtraChild(net.sourceforge.jnlp.JNLPMatcherTest) null Any ideas welcomed :( J. ps: sorry for short story long... -------------- next part -------------- A non-text attachment was scrubbed... Name: allJdks2.patch Type: text/x-patch Size: 20952 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 11:14:20 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 11:14:20 +0000 Subject: [Bug 1765] New: [IcedTea7] Boot JDK on ppc64le uses differently named arch directory to final build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1765 Bug ID: 1765 Summary: [IcedTea7] Boot JDK on ppc64le uses differently named arch directory to final build Product: IcedTea Version: 7-hg Hardware: ppc64le OS: Linux Status: NEW Severity: normal Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org cd linux_ppc64_compiler2/product && ./test_gamma Error: could not find libjava.so Error: could not find Java 2 Runtime Environment. Boot JDK uses ppc64le as arch dir, not ppc64. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 11:14:38 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 11:14:38 +0000 Subject: [Bug 1765] [IcedTea7] Boot JDK on ppc64le uses differently named arch directory to final build In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1765 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Thu May 15 11:41:26 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 15 May 2014 11:41:26 +0000 Subject: /hg/rhino-tests: Ten new tests added into ScriptContextTest. Message-ID: changeset 3c0edf5a83fc in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=3c0edf5a83fc author: ptisnovs date: Thu May 15 13:41:19 2014 +0200 Ten new tests added into ScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptContextTest.java | 169 +++++++++++++++++++++++++++++- 2 files changed, 173 insertions(+), 1 deletions(-) diffs (202 lines): diff -r 5f9eba77856c -r 3c0edf5a83fc ChangeLog --- a/ChangeLog Thu May 15 11:45:12 2014 +0200 +++ b/ChangeLog Thu May 15 13:41:19 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-15 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextTest.java: + Ten new tests added into ScriptContextTest. + 2014-05-15 Pavel Tisnovsky * src/org/RhinoTests/BaseRhinoTest.java: diff -r 5f9eba77856c -r 3c0edf5a83fc src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Thu May 15 11:45:12 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Thu May 15 13:41:19 2014 +0200 @@ -40,18 +40,185 @@ package org.RhinoTests; +import javax.script.ScriptContext; +import javax.script.SimpleScriptContext; + /** * TODO: not implemented * @author ptisnovs * */ -public class ScriptContextTest { +public class ScriptContextTest extends BaseRhinoTest { + + @Override + protected void setUp(String[] args) { + // this block could be empty + return; + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Test for toString() method. + */ + protected void testToString() { + // tested object + Object object = new SimpleScriptContext(); + + // call the toString() method + String string = object.toString(); + + assertTrue(string != null, "toString() method returned null!"); + assertTrue(string.startsWith("javax.script.SimpleScriptContext"), "bad toString() return value " + string); + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute1() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "value", ScriptContext.ENGINE_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute2() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "", ScriptContext.ENGINE_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute3() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", null, ScriptContext.ENGINE_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute4() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "value", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", \"value\", ScriptContext.ENGINE_SCOPE.) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute5() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", \"\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute6() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", null, ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", null, ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute7() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "value", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, \"value\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute8() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, \"\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute9() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, null, ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, null, ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + /** * Entry point to this test case. * * @param args parameters passed from command line */ public static void main(String[] args) { + new ScriptContextTest().doTests(args); } } + From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:19:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:19:55 +0000 Subject: [Bug 1766] New: [IcedTea8] Expand architecture support Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1766 Bug ID: 1766 Summary: [IcedTea8] Expand architecture support Product: IcedTea Version: 8-hg Hardware: all OS: All Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org Add JDK conditionals for alpha, m68k, mips, mipsel, s390 & s390x as used by CACAO, JamVM and Zero builds. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:20:25 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:20:25 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1766 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:20:25 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:20:25 +0000 Subject: [Bug 1766] [IcedTea8] Expand architecture support In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1766 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1282 Target Milestone|--- |3.0.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:21:18 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:21:18 +0000 Subject: [Bug 1765] [IcedTea7] Boot JDK on ppc64le uses differently named arch directory to final build In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1765 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:21:18 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:21:18 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1765 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:31:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:31:55 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1757 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:31:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:31:55 +0000 Subject: [Bug 1757] [IcedTea7] register_method usage in sharkCompiler.cpp needs to be adjusted following S7196199 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1757 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:32:13 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:32:13 +0000 Subject: [Bug 1756] [IcedTea7] Bootstrap with IcedTea broken In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1756 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:32:13 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:32:13 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1756 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:32:29 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:32:29 +0000 Subject: [Bug 1753] [IcedTea7] Ant does not respect JAVA_HOME/jdk.home setting In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1753 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:32:29 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:32:29 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1753 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:33:45 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:33:45 +0000 Subject: [Bug 1763] [IcedTea7] ppc64 JIT doesn't support class data sharing In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1763 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:33:45 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:33:45 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1763 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:34:36 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:34:36 +0000 Subject: [Bug 1758] [IcedTea7] Support PPC64 JIT on ppc64le In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1758 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:34:36 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:34:36 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1758 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:38:19 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:38:19 +0000 Subject: [Bug 1736] Awt loads gtk3 in all the look and feel configurations In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1736 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1284 Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:38:19 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:38:19 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1736 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:39:03 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:39:03 +0000 Subject: [Bug 1748] [IcedTea8] Allow clang to be used to build In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1748 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1282 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 12:39:03 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 12:39:03 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1748 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Thu May 15 13:17:58 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 15 May 2014 13:17:58 +0000 Subject: /hg/rhino-tests: Fixed object types. Message-ID: changeset 324c54e484c1 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=324c54e484c1 author: ptisnovs date: Thu May 15 15:17:50 2014 +0200 Fixed object types. diffstat: ChangeLog | 5 +++++ src/org/RhinoTests/ScriptContextTest.java | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diffs (96 lines): diff -r 3c0edf5a83fc -r 324c54e484c1 ChangeLog --- a/ChangeLog Thu May 15 13:41:19 2014 +0200 +++ b/ChangeLog Thu May 15 15:17:50 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-15 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextTest.java: + Fixed object types. + 2014-05-15 Pavel Tisnovsky * src/org/RhinoTests/ScriptContextTest.java: diff -r 3c0edf5a83fc -r 324c54e484c1 src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Thu May 15 13:41:19 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Thu May 15 15:17:50 2014 +0200 @@ -81,7 +81,7 @@ */ protected void testSetAttribute1() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute("name", "value", ScriptContext.ENGINE_SCOPE); } @@ -96,7 +96,7 @@ */ protected void testSetAttribute2() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute("name", "", ScriptContext.ENGINE_SCOPE); } @@ -111,7 +111,7 @@ */ protected void testSetAttribute3() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute("name", null, ScriptContext.ENGINE_SCOPE); } @@ -126,7 +126,7 @@ */ protected void testSetAttribute4() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute("", "value", ScriptContext.ENGINE_SCOPE); throw new AssertionError("ScriptContext.setAttribute(\"\", \"value\", ScriptContext.ENGINE_SCOPE.) does not throw any exception"); @@ -141,7 +141,7 @@ */ protected void testSetAttribute5() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute("", "", ScriptContext.ENGINE_SCOPE); throw new AssertionError("ScriptContext.setAttribute(\"\", \"\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); @@ -156,7 +156,7 @@ */ protected void testSetAttribute6() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute("", null, ScriptContext.ENGINE_SCOPE); throw new AssertionError("ScriptContext.setAttribute(\"\", null, ScriptContext.ENGINE_SCOPE) does not throw any exception"); @@ -171,7 +171,7 @@ */ protected void testSetAttribute7() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute(null, "value", ScriptContext.ENGINE_SCOPE); throw new AssertionError("ScriptContext.setAttribute(null, \"value\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); @@ -186,7 +186,7 @@ */ protected void testSetAttribute8() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute(null, "", ScriptContext.ENGINE_SCOPE); throw new AssertionError("ScriptContext.setAttribute(null, \"\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); @@ -201,7 +201,7 @@ */ protected void testSetAttribute9() { // tested object - SimpleScriptContext object = new SimpleScriptContext(); + ScriptContext object = new SimpleScriptContext(); try { object.setAttribute(null, null, ScriptContext.ENGINE_SCOPE); throw new AssertionError("ScriptContext.setAttribute(null, null, ScriptContext.ENGINE_SCOPE) does not throw any exception"); From jvanek at redhat.com Thu May 15 15:17:22 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 15 May 2014 17:17:22 +0200 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <20140512210341.GK2138@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> <20140512210341.GK2138@redhat.com> Message-ID: <5374DA82.4030303@redhat.com> On 05/12/2014 11:03 PM, Omair Majid wrote: Hi! I have followed your advices and tried to fix add meaningful comments. I have one more opinion to the final I have added. If somebody will suddenly try to assign to final value, he will be warned by compiler. And thats good thing. At least it will force him to double check what he is doing. I have also followed your recommendation to move few util classes to UrlUtils. And write tests for them. There is one change in code then. The original notNullUrlEquals ignored port! I added port check to new code. (this is actually code logic and to not belongs here..) I will NOT push this line (unless it is approved directly). If you wont me to push some changes separately, I will do so.We can then continue reviewing rest of the patch. Thank you! J. -------------- next part -------------- A non-text attachment was scrubbed... Name: javadocCleaning2.patch Type: text/x-patch Size: 46179 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 15:29:25 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 15:29:25 +0000 Subject: [Bug 1767] New: IcedTea-web plugin fails where it once did not Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1767 Bug ID: 1767 Summary: IcedTea-web plugin fails where it once did not Product: IcedTea-Web Version: unspecified Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: Plugin Assignee: dbhole at redhat.com Reporter: bucky.prof at gmail.com CC: unassigned at icedtea.classpath.org Created attachment 1080 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1080&action=edit Plugin Log Using the different optical microscope primers javas that once work now don't. Sites: http://micro.magnet.fsu.edu/primer/java/scienceopticsu/reflection/index.html http://www.microscopyu.com/tutorials/java/aberrations/chromatic/index.html My operating system is Ubuntu 14.04 LTS (Linux 3.13.0-24-generic #47-Ubuntu). I'm using Firefox (29.0 for Ubuntu canonical 1.0). I've attached the file that the error generated when I pressed where IceTea told me to. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Thu May 15 15:54:13 2014 From: aazores at redhat.com (Andrew Azores) Date: Thu, 15 May 2014 11:54:13 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor Message-ID: <5374E325.3000705@redhat.com> Hi, I've refactored PolicyEditor so that the policy file model is now in a separate class, moving PolicyEditor toward MVC design. There still isn't really a separation between View and Controller though. The patch looks large in file size but only because such a large amount of code has been relocated. Nothing has been done other than the extraction/refactor and associated changes in call sites. All the unit tests should still be passing, other than the two that are marked Known To Fail. I've also done fairly extensive manual testing and it still seems to work properly as far as I can tell. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyfilemodel-3.patch Type: text/x-patch Size: 48300 bytes Desc: not available URL: From gitne at gmx.de Thu May 15 16:44:38 2014 From: gitne at gmx.de (Jacob Wisor) Date: Thu, 15 May 2014 18:44:38 +0200 Subject: [icedtea-web] RFC: More javadoc fixes for Java 8 In-Reply-To: <20140513175121.GE29777@redhat.com> References: <20140510001415.GP3326@redhat.com> <536D89F2.7050709@gmx.de> <20140512133406.GB2138@redhat.com> <5370D480.6030203@gmx.de> <20140513175121.GE29777@redhat.com> Message-ID: <5374EEF6.1010901@gmx.de> On 05/13/2014 07:51 PM Omair Majid wrote: > * Jacob Wisor [2014-05-12 10:04]: >> Please read my message <5370C9E4.7000607 at gmx.de> for this. Standards >> compliance is my main motivation. > > But we know that Javadoc is not valid xhtml. It is a mix of html and > it's own formatting system. And it's processed by only one tool: > javadoc. > >> I was hoping javadoc would have finally moved to XHTML since OpenJDK 8, but >> unfortunately progress has been a bit of a pain for Java during the last few >> years. :-\ > > No, this is still not the case. The official documentation on javadoc > contradicts this and then goes on to suggest non-valid html as the > default: > http://www.oracle.com/technetwork/java/javase/documentation/index-137868.html#format I know ;-) which is insane. This may have been okay 1994 or until 2000, but we have moved far beyond that. >> As I mentioned earlier, your patch is not wrong but it fixes problems that >> will or might become a problem themselves when javadoc finally transitions >> to XHTML. > > I doubt it. For starters, that means every comment must also begin with > valid markup. I don't see us changing > > /** Foo the bar > > to > > /**

Foo the bar > > everywhere. No. XHTML specifically allows for content in the body element. Since javadoc comments do not constitute HTML documents by definition but only body content, it would not be required for an XHTML honoring javadoc to place comment content into any specific elements. Anyway, the comment can be enclosed by any means a reading or extracting tool chooses to already but using non-conforming XML elements inside comments will presumably cause problems for comment reading or displaying tools, even for those with the most tolerant parsers. This is why it makes a lot of sense to resort to purely XML conforming elements in comments. This is also the main reason why XML has been standardized in the first place - and of course because SGML is too complex to be fully implemented for most products and platforms. >> I think, I do not need to elaborate on the human *and* machine >> readability benefits of XML here, so this is mainly why I would like every >> javadoc source code out there to be prepared for that transition. > > While I don't personally care about this, many people disagree with the > premise [1][2]. > >> If self-enclosing elements are stopping OpenJDK 8 javadoc from digesting >> that Java source code documentation then I would rather assume javadoc needs >> to be fixed. > > I don't think upstream is budging on this. I, for one, will be really > happy if they fixed javadoc to be more lenient by default. But they > aren't. And they are aware of this issue: > http://thread.gmane.org/gmane.comp.java.openjdk.core-libs.devel/19308 Making a lint feature more lenient on the input it checks is definitely the wrong way to go. This is an absurd approach. lint tools' sole purpose is to check for more and better structure than promoting more ambiguity. >> And evidently, the time has come to give back javadoc the >> attention it requires, since it has been neglected for so many years. > > This doclint effort (which is what breaks javadoc-ing of code) is the > attention upstream gave them. I am hoping they don't give it much more > attention. > > To summarize, I hope you are okay with me pushing the patch. I will be > happy to hold it back if you think an alternate solution (either > upstream or in icedtea-web) is possible. No offense, but obviously either because I am chanting into the wrong direction or I am ignored, I am giving up on this here. > [1] http://blog.codinghorror.com/xml-the-angle-bracket-tax/ Well, this guy seems to miss the point. Not the XML standard is a problem, bad design is. XML does not prevent anybody from creating bad designs or bad XML document generators. Yes, there is a lot of crap software in this world which even drives mission critical stuff and communicates in XML, but this is no reason or excuse to blame their existence on XML. Besides, XML was designed for /documents/ not /data/ in general. > [2] http://www.ibm.com/developerworks/xml/library/x-sbxml/index.html Actually, for javadoc comments all questions presented here can be answered with NO. Javadoc comments are structured indeed and although individually they do not constitute or form a document, they are supposed to be pulled together into one document, at least when displayed to a user. So again, while marking-up content you create structure, thus making XML a natural choice for this. ;-) Jacob From bugzilla-daemon at icedtea.classpath.org Thu May 15 16:59:18 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 16:59:18 +0000 Subject: [Bug 1767] IcedTea-web plugin fails where it once did not In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1767 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |aazores 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: From bugzilla-daemon at icedtea.classpath.org Thu May 15 17:22:46 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 17:22:46 +0000 Subject: [Bug 1767] IcedTea-web plugin fails where it once did not In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1767 --- Comment #1 from Andrew Azores --- Using an Ubuntu 14.04 VM, the applets do indeed fail with the latest IcedTea-Web when choosing the "Run" option. However, when choosing the "Sandbox" option as suggested in the error message, the applets run fine. Have you tried using the Sandbox button? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 15 17:24:45 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 15 May 2014 17:24:45 +0000 Subject: [Bug 1768] New: SIGSEGV (0xb) libsoup-2.4.so Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1768 Bug ID: 1768 Summary: SIGSEGV (0xb) libsoup-2.4.so Product: IcedTea Version: 7-hg Hardware: 64-bit OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: marcus.ziliani at gmail.com CC: unassigned at icedtea.classpath.org Created attachment 1081 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1081&action=edit error_log -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From omajid at redhat.com Thu May 15 22:24:56 2014 From: omajid at redhat.com (Omair Majid) Date: Thu, 15 May 2014 18:24:56 -0400 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <53749D0A.30707@redhat.com> References: <537267C0.6050805@redhat.com> <53749D0A.30707@redhat.com> Message-ID: <20140515222456.GD2127@redhat.com> Hi, * Jiri Vanek [2014-05-15 06:56]: > Please threat this as regular review request :) This isn't a patch review; I am just commenting on the overall approach. > On 05/13/2014 08:43 PM, Jiri Vanek wrote: > >This patch allows ITW to run on any openjdk or oracle jdk(I have not yet tested with IBM, but will do) This is fantastic to hear! > >This is probably not final version of the patch - as it break all > >tests using PluginAppletMocks - Its easy - tests do not run on > >bootclassapth, so the Ancestor of my Access class is in different > >classlaoder. > > > >Moving tests to bootclassapth[2] do not help, as then even worse > >things happens. But it should be solution-able. Anyway I think that > >removing those 9 tests is small cost for get rid of dependence on > >icedtea (plugin-hole patch) Yeah, there are upsides and downsides to most changes. Losing a few test for ability to build/run against unpatched OpenJDK sounds like a net win to me. > >There is nasty override of run method. Inside is copypasted code and it is vulnerable. I will try > >to propose the change > > > > > >- private runLoader() > >+ runLoader() > > > >to upstream. If they accept, then actually no hacking will be needed and the hook will be pretty > >clear (except refelction based getters and setter, which is quite ok...) Good luck! The impression I got was that changes to sun.* packages are simply not allowed. > >(yah it really worked on plain upstream oraclejdk7 or openjdk7 :) ) > Oh! It even worked on IBM JDk! :D > checking if sun.security.provider.X509Factory is available... no > configure: error: sun.security.provider.X509Factory not found. Yeah, this is used in only one place: to dump the certificate > checking if sun.security.x509.X500Name is available... no > configure: error: sun.security.x509.X500Name not found. This one is more important: it's used in verifying SSL certificates. It's accessed through HostNameChecker. I wonder if there is a public API for this. > and same for ValidatorException This one is used in VariableX509TrustManager.java, to catch exceptions thrown by the methods in X509TrustManager. These methods declare a public exception class CertificateException, though. Perhaps we should use that. > then compilation fails, because classes like String or so are missing. > This is quite clear because IBM java is split to much more parts then oracle/open JDK. > To make compilation work, we have to extend our bootstrap JDK. I think this is the right approach. Instead of overriding the bootclasspath that's part of the JRE (using -Xbootclasspath), maybe we should append to it (using -Xbootclasspath/p). > (which is a > bit broken, it still calls itself like jdk-1.6 - but should call itself > jdk-1.7) OR maybe we can get rid of it? This was done in the earlier icedtea-web days and it was simply copied from icedtea. Maybe we should get rid of this build cruft and simply use JDK_HOME/bin/java(c) and friends directly. > But we have to change javwas and plugin luncher bootclassapth a bit... If done correctly, this might just be a cleanup. > How worthy is IBM java support? Personally, I would consider OpenJDK support the priority. If anything else works, I think that's a bonus. > Well - if we agrred on IBM support or at least "support" then > I'mnotsure if we should try to push also I wouldn't mind cleaning some code if it makes other JDKs work too, but I am not sure if we can even think about "supporting" other JDKs. How would we, for example, check that calling a certain piece of undocumented code works the same in IBM JRE as it does in OpenJDK? > path to Openjdk. Well insome time it will bubble to Oracle bits, but > when to Ibm bits? maybe never.... I can only speculate here, but I believe that the IBM JRE uses the same class library as the proprietary Oracle JDK. Just a different VM. If it is included in the proprietary Oracle JDK, it should become part of the IBM JDK too. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From ptisnovs at icedtea.classpath.org Fri May 16 07:21:12 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 16 May 2014 07:21:12 +0000 Subject: /hg/rhino-tests: Nine new tests added into ScriptContextTest. Message-ID: changeset 7ec0f5310ca5 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=7ec0f5310ca5 author: ptisnovs date: Fri May 16 09:21:05 2014 +0200 Nine new tests added into ScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptContextTest.java | 135 ++++++++++++++++++++++++++++++ 2 files changed, 140 insertions(+), 0 deletions(-) diffs (157 lines): diff -r 324c54e484c1 -r 7ec0f5310ca5 ChangeLog --- a/ChangeLog Thu May 15 15:17:50 2014 +0200 +++ b/ChangeLog Fri May 16 09:21:05 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-16 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextTest.java: + Nine new tests added into ScriptContextTest. + 2014-05-15 Pavel Tisnovsky * src/org/RhinoTests/ScriptContextTest.java: diff -r 324c54e484c1 -r 7ec0f5310ca5 src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Thu May 15 15:17:50 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Fri May 16 09:21:05 2014 +0200 @@ -212,6 +212,141 @@ } /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute10() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute11() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute12() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute13() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute14() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute15() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute16() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute17() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute18() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From ptisnovs at icedtea.classpath.org Fri May 16 07:33:16 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 16 May 2014 07:33:16 +0000 Subject: /hg/rhino-tests: Added implementation of setUp() and tearDown() ... Message-ID: changeset 8fa0f2667f65 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=8fa0f2667f65 author: ptisnovs date: Fri May 16 09:33:09 2014 +0200 Added implementation of setUp() and tearDown() methods, added one test. diffstat: ChangeLog | 5 +++ src/org/RhinoTests/SimpleScriptContextTest.java | 41 ++++++++++++++++++++++-- 2 files changed, 42 insertions(+), 4 deletions(-) diffs (79 lines): diff -r 7ec0f5310ca5 -r 8fa0f2667f65 ChangeLog --- a/ChangeLog Fri May 16 09:21:05 2014 +0200 +++ b/ChangeLog Fri May 16 09:33:09 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-16 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleScriptContextTest.java: + Added implementation of setUp() and tearDown() methods, added one test. + 2014-05-16 Pavel Tisnovsky * src/org/RhinoTests/ScriptContextTest.java: diff -r 7ec0f5310ca5 -r 8fa0f2667f65 src/org/RhinoTests/SimpleScriptContextTest.java --- a/src/org/RhinoTests/SimpleScriptContextTest.java Fri May 16 09:21:05 2014 +0200 +++ b/src/org/RhinoTests/SimpleScriptContextTest.java Fri May 16 09:33:09 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. @@ -40,18 +40,51 @@ package org.RhinoTests; +import javax.script.ScriptContext; +import javax.script.SimpleScriptContext; + /** - * TODO: not implemented - * @author ptisnovs + * Basic ScriptContext test suite. Following tests checks the interface + * javax.script.SimpleScriptContext. * + * @author Pavel Tisnovsky */ -public class SimpleScriptContextTest { +public class SimpleScriptContextTest extends BaseRhinoTest { + + @Override + protected void setUp(String[] args) { + // this block could be empty + return; + } + + @Override + protected void tearDown() { + // this block could be empty + return; + } + + /** + * Test for toString() method. + */ + protected void testToString() { + // tested object + Object object = new SimpleScriptContext(); + + // call the toString() method + String string = object.toString(); + + assertTrue(string != null, "toString() method returned null!"); + assertTrue(string.startsWith("javax.script.SimpleScriptContext"), "bad toString() return value " + string); + } + /** * Entry point to this test case. * * @param args parameters passed from command line */ public static void main(String[] args) { + new SimpleScriptContextTest().doTests(args); } } + From helpcrypto at gmail.com Fri May 16 07:36:04 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Fri, 16 May 2014 09:36:04 +0200 Subject: Oracle Java 8 problems due to TLS policy change In-Reply-To: References: <1013403333.3857697.1397240340516.JavaMail.zimbra@redhat.com> Message-ID: Super Ping! On Mon, Apr 14, 2014 at 2:41 PM, helpcrypto helpcrypto wrote: > Hi Andrew, thx for replying. > > On Fri, Apr 11, 2014 at 8:19 PM, Andrew Hughes wrote: > >> >> ----- Original Message ----- >> > Ping? >> > >> > On Fri, Apr 4, 2014 at 11:03 AM, helpcrypto helpcrypto < >> helpcrypto at gmail.com >> > > wrote: >> > >> > > According to >> > > >> http://docs.oracle.com/javase/8/docs/technotes/guides/security/enhancements-8.htmlOracle >> > > Java 8 now uses TLS1.1 and TLS1.2 (both enabled by default on >> > > Control Panel). >> > > >> > > This seems to be causing an error in our applet loading. Problem seems >> > > solved if both unchecked. Funny thing is our server only supports >> TLS1.0. >> > > >> > > Is icedtea8 following the same TLS policy? (switching to TLS1.1 and >> TLS1.2) >> > > If so, i should check if the same error appears. >> > > >> >> I'm not sure what you're referring to here. There is no control panel in >> IcedTea/OpenJDK 6, 7 or 8. I seem to remember TLS 1.2 support being added >> as part of 7 (it was one of the reasons for the addition of an explicit >> ECC provider). >> > Maybe Jiri can chime in here? > Oracle Java 8 JRE has enabled (by default) TLS 1.1 and TLS 1.2 and that's > causing some problems in our case. I was wondering how OpenJDK/Icedtea is > handling protocol priorities/this issue. > > Is there such a thing as "Icedtea-Web JRE 8" so I can test? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Fri May 16 07:39:28 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 16 May 2014 07:39:28 +0000 Subject: /hg/rhino-tests: Ten new tests added into SimpleScriptContextTest. Message-ID: changeset bd78ec86c792 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=bd78ec86c792 author: ptisnovs date: Fri May 16 09:39:20 2014 +0200 Ten new tests added into SimpleScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleScriptContextTest.java | 150 ++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 0 deletions(-) diffs (172 lines): diff -r 8fa0f2667f65 -r bd78ec86c792 ChangeLog --- a/ChangeLog Fri May 16 09:33:09 2014 +0200 +++ b/ChangeLog Fri May 16 09:39:20 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-16 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleScriptContextTest.java: + Ten new tests added into SimpleScriptContextTest. + 2014-05-16 Pavel Tisnovsky * src/org/RhinoTests/SimpleScriptContextTest.java: diff -r 8fa0f2667f65 -r bd78ec86c792 src/org/RhinoTests/SimpleScriptContextTest.java --- a/src/org/RhinoTests/SimpleScriptContextTest.java Fri May 16 09:33:09 2014 +0200 +++ b/src/org/RhinoTests/SimpleScriptContextTest.java Fri May 16 09:39:20 2014 +0200 @@ -78,6 +78,156 @@ } /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute1() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "value", ScriptContext.ENGINE_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute2() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "", ScriptContext.ENGINE_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute3() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", null, ScriptContext.ENGINE_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute4() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "value", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", \"value\", ScriptContext.ENGINE_SCOPE.) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute5() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", \"\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute6() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", null, ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", null, ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute7() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "value", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, \"value\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute8() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "", ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, \"\", ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute9() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, null, ScriptContext.ENGINE_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, null, ScriptContext.ENGINE_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute10() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From helpcrypto at gmail.com Fri May 16 07:43:00 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Fri, 16 May 2014 09:43:00 +0200 Subject: Painting issues with "autosize". My fault? Your fault? Message-ID: Hi. Before filling a bug, I would like to ask if I'm doing it properly. Consider the following scenario: -Dialog+BorderLayout+center JPanel with JLabel In runtime I modify the label from "" to "lorem ipsum..." (The lorem ipsum part are several paragraphs) And do pack() and repaint(). *The objective is to automatically resize the dialog depending on panels contents* Using ORACLE JRE the dialog is redrawn to fit the content, but this is not happening on icedtea-web, so part of the text is hidden under north, south, east and west panels. Did I explained myself properly? Should I file a bug and attach a test case or I must do it another way? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at redhat.com Fri May 16 12:25:22 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 16 May 2014 14:25:22 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <20140515222456.GD2127@redhat.com> References: <537267C0.6050805@redhat.com> <53749D0A.30707@redhat.com> <20140515222456.GD2127@redhat.com> Message-ID: <537603B2.7050205@redhat.com> On 05/16/2014 12:24 AM, Omair Majid wrote: > Hi, > > * Jiri Vanek [2014-05-15 06:56]: >> Please threat this as regular review request :) > > This isn't a patch review; I am just commenting on the overall approach. heheh :)) Somebody should review it ;) > >> On 05/13/2014 08:43 PM, Jiri Vanek wrote: >>> This patch allows ITW to run on any openjdk or oracle jdk(I have not yet tested with IBM, but will do) > > This is fantastic to hear! > >>> This is probably not final version of the patch - as it break all >>> tests using PluginAppletMocks - Its easy - tests do not run on >>> bootclassapth, so the Ancestor of my Access class is in different >>> classlaoder. >>> >>> Moving tests to bootclassapth[2] do not help, as then even worse >>> things happens. But it should be solution-able. Anyway I think that >>> removing those 9 tests is small cost for get rid of dependence on >>> icedtea (plugin-hole patch) > > Yeah, there are upsides and downsides to most changes. Losing a few test > for ability to build/run against unpatched OpenJDK sounds like a net win > to me. I would agree. Little bit wrong is, that those are good quite imprtatnt ests ;( > >>> There is nasty override of run method. Inside is copypasted code and it is vulnerable. I will try >>> to propose the change >>> >>> >>> - private runLoader() >>> + runLoader() >>> >>> to upstream. If they accept, then actually no hacking will be needed and the hook will be pretty >>> clear (except refelction based getters and setter, which is quite ok...) > > Good luck! The impression I got was that changes to sun.* packages are > simply not allowed. hmhmh:( > >>> (yah it really worked on plain upstream oraclejdk7 or openjdk7 :) ) > >> Oh! It even worked on IBM JDk! > > :D > >> checking if sun.security.provider.X509Factory is available... no >> configure: error: sun.security.provider.X509Factory not found. > > Yeah, this is used in only one place: to dump the certificate > >> checking if sun.security.x509.X500Name is available... no >> configure: error: sun.security.x509.X500Name not found. > > This one is more important: it's used in verifying SSL certificates. > It's accessed through HostNameChecker. I wonder if there is a public API > for this. > >> and same for ValidatorException > > This one is used in VariableX509TrustManager.java, to catch exceptions > thrown by the methods in X509TrustManager. These methods declare a public > exception class CertificateException, though. Perhaps we should use > that. Yes. All those are solveable by adjusting classptah n case IBM java is used. > >> then compilation fails, because classes like String or so are missing. >> This is quite clear because IBM java is split to much more parts then oracle/open JDK. >> To make compilation work, we have to extend our bootstrap JDK. > > I think this is the right approach. Instead of overriding the > bootclasspath that's part of the JRE (using -Xbootclasspath), maybe we > should append to it (using -Xbootclasspath/p). > Oh. This expalines the strange behaviour javac/java. During runtime we -Xbootclasspath/a but in compile tie we use jsut pure -Xbootclasspath However, more is needed, as IBM java have those fiels quite spread. BUT it do not explain why configure check do not work (unless it is using the botostrap JDK dir, which I think it do not) . Thats why I think that more will be needed:( (maybe even enhance our bootstrap?) >> (which is a >> bit broken, it still calls itself like jdk-1.6 - but should call itself >> jdk-1.7) OR maybe we can get rid of it? > > This was done in the earlier icedtea-web days and it was simply copied > from icedtea. Maybe we should get rid of this build cruft and simply use > JDK_HOME/bin/java(c) and friends directly. Agree. It will come as another changeset. > >> But we have to change javwas and plugin luncher bootclassapth a bit... > > If done correctly, this might just be a cleanup. > >> How worthy is IBM java support? > > Personally, I would consider OpenJDK support the priority. If anything > else works, I think that's a bonus. > >> Well - if we agree on IBM support or at least "support" then >> I'mnotsure if we should try to push also > > I wouldn't mind cleaning some code if it makes other JDKs work too, but > I am not sure if we can even think about "supporting" other JDKs. How > would we, for example, check that calling a certain piece of > undocumented code works the same in IBM JRE as it does in OpenJDK? > >> path to Openjdk. Well insome time it will bubble to Oracle bits, but >> when to Ibm bits? maybe never.... > > I can only speculate here, but I believe that the IBM JRE uses the same > class library as the proprietary Oracle JDK. Just a different VM. If > it is included in the proprietary Oracle JDK, it should become part of > the IBM JDK too. > Maybe.... :) Thank you for cometns. Any chnace for review at whole? From omajid at redhat.com Fri May 16 14:24:36 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 16 May 2014 10:24:36 -0400 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <537603B2.7050205@redhat.com> References: <537267C0.6050805@redhat.com> <53749D0A.30707@redhat.com> <20140515222456.GD2127@redhat.com> <537603B2.7050205@redhat.com> Message-ID: <20140516142436.GA2186@redhat.com> * Jiri Vanek [2014-05-16 08:25]: > On 05/16/2014 12:24 AM, Omair Majid wrote: > heheh :)) Somebody should review it ;) Probably, but there's this: > >>On 05/13/2014 08:43 PM, Jiri Vanek wrote: > >>>This is probably not final version of the patch - as it break all > >>>tests using PluginAppletMocks - Its easy - tests do not run on > >>>bootclassapth, so the Ancestor of my Access class is in different > >>>classlaoder. Are you planning on fixing this first? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:00:15 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:00:15 +0000 Subject: [Bug 1303] [IcedTea7] Support GIF lib v5 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1303 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|trivial |enhancement -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:00:39 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:00:39 +0000 Subject: [Bug 1774] New: [IcedTea8] Support GIF lib v5 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1774 Bug ID: 1774 Summary: [IcedTea8] Support GIF lib v5 Product: IcedTea Version: 8-hg Hardware: all OS: All Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org Clone of PR1303 for 8 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:00:58 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:00:58 +0000 Subject: [Bug 1774] [IcedTea8] Support GIF lib v5 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1774 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1282 Target Milestone|--- |3.0.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:00:58 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:00:58 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1774 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:40:42 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:40:42 +0000 Subject: [Bug 1766] [IcedTea8] Expand architecture support In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1766 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea8-forest/jdk?cmd=changeset;node=fedbe21e5891 author: andrew date: Thu May 15 13:20:45 2014 +0100 PR1766: Expand architecture support -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:40:47 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:40:47 +0000 Subject: [Bug 1774] [IcedTea8] Support GIF lib v5 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1774 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea8-forest/jdk?cmd=changeset;node=c0b46920511a author: andrew date: Fri May 16 16:03:23 2014 +0100 PR1774: Support GIF lib v5 Contributed-by: gregnietsky at gmail.com -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 15:40:53 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 15:40:53 +0000 Subject: [Bug 1774] [IcedTea8] Support GIF lib v5 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1774 --- Comment #2 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea8-forest/jdk?cmd=changeset;node=dc14d13daa5e author: andrew date: Fri May 16 16:05:05 2014 +0100 PR1774: Correct #ifdef to #if Contributed-by: Bernhard Rosenkr?nzer -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkang at redhat.com Fri May 16 20:23:37 2014 From: jkang at redhat.com (Jie Kang) Date: Fri, 16 May 2014 16:23:37 -0400 (EDT) Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <497845402.4276481.1400271650960.JavaMail.zimbra@redhat.com> Message-ID: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> Hi, The patch privatizes the fields in the Resource class and includes appropriate setters/getters for the respective fields. Unit Tests are included. 2014-05-16 Lukasz Dracz Jie Kang * netx/net/sourceforge/jnlp/cache/Resource.java: (location, localFile, requestVersion, downloadVersion, transferred, size, status) made fields private and added setters and getters, and all calling sites refactored * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Calling sites refactored * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: Calling sites refactored * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: (testGetLocation, testGetRequestVersion, testGetDownloadVersion, testTransferredIsZero, testIncrementTransferred, testSizeIsNegativeOne, testSetSize, testStatusIsCopied) added tests Thanks, -------------- next part -------------- A non-text attachment was scrubbed... Name: resource-setters-getters.patch Type: text/x-patch Size: 22592 bytes Desc: not available URL: From andrew at icedtea.classpath.org Fri May 16 20:52:14 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 16 May 2014 20:52:14 +0000 Subject: /hg/icedtea7: PR1765: Boot JDK on ppc64le uses differently named... Message-ID: changeset 61916c3ad26e in /hg/icedtea7 details: http://icedtea.classpath.org/hg/icedtea7?cmd=changeset;node=61916c3ad26e author: Andrew John Hughes date: Thu May 15 12:17:33 2014 +0100 PR1765: Boot JDK on ppc64le uses differently named arch directory to final build 2014-05-14 Andrew John Hughes PR1765: Boot JDK on ppc64le uses differently named arch directory to final build * Makefile.am: (bootstrap-directory-stage1): Handle ppc64le boot JDK using a different arch directory to the final build. Make output more verbose. * NEWS: Updated. diffstat: ChangeLog | 10 ++++++++++ Makefile.am | 34 ++++++++++++++++++++-------------- NEWS | 1 + 3 files changed, 31 insertions(+), 14 deletions(-) diffs (92 lines): diff -r b7bc434d2b61 -r 61916c3ad26e ChangeLog --- a/ChangeLog Tue May 13 17:35:49 2014 +0100 +++ b/ChangeLog Thu May 15 12:17:33 2014 +0100 @@ -1,3 +1,13 @@ +2014-05-14 Andrew John Hughes + + PR1765: Boot JDK on ppc64le uses differently named + arch directory to final build + * Makefile.am: + (bootstrap-directory-stage1): Handle ppc64le boot + JDK using a different arch directory to the final + build. Make output more verbose. + * NEWS: Updated. + 2014-05-13 Andrew John Hughes PR1763: ppc64 JIT doesn't support class data sharing diff -r b7bc434d2b61 -r 61916c3ad26e Makefile.am --- a/Makefile.am Tue May 13 17:35:49 2014 +0100 +++ b/Makefile.am Thu May 15 12:17:33 2014 +0100 @@ -1619,32 +1619,38 @@ # bootstrap/stage1 stamps/bootstrap-directory-stage1.stamp: stamps/native-ecj.stamp mkdir -p $(STAGE1_BOOT_DIR)/bin stamps/ - ln -sf $(JAVA) $(STAGE1_BOOT_DIR)/bin/java + ln -sfv $(JAVA) $(STAGE1_BOOT_DIR)/bin/java if JAVAH_SUPPORTS_X_OPTIONS - ln -sf $(JAVAH) $(STAGE1_BOOT_DIR)/bin/javah + ln -sfv $(JAVAH) $(STAGE1_BOOT_DIR)/bin/javah else - ln -sf ../../../javah $(STAGE1_BOOT_DIR)/bin/javah + ln -sfv ../../../javah $(STAGE1_BOOT_DIR)/bin/javah endif - ln -sf $(RMIC) $(STAGE1_BOOT_DIR)/bin/rmic - ln -sf $(JAR) $(STAGE1_BOOT_DIR)/bin/jar - ln -sf $(NATIVE2ASCII) $(STAGE1_BOOT_DIR)/bin/native2ascii - ln -sf ../../../javac $(STAGE1_BOOT_DIR)/bin/javac - ln -sf ../../../javap $(STAGE1_BOOT_DIR)/bin/javap + ln -sfv $(RMIC) $(STAGE1_BOOT_DIR)/bin/rmic + ln -sfv $(JAR) $(STAGE1_BOOT_DIR)/bin/jar + ln -sfv $(NATIVE2ASCII) $(STAGE1_BOOT_DIR)/bin/native2ascii + ln -sfv ../../../javac $(STAGE1_BOOT_DIR)/bin/javac + ln -sfv ../../../javap $(STAGE1_BOOT_DIR)/bin/javap mkdir -p $(STAGE1_BOOT_DIR)/lib/modules mkdir -p $(STAGE1_BOOT_DIR)/jre/lib && \ cp $(SYSTEM_JDK_DIR)/jre/lib/rt.jar $(STAGE1_BOOT_RUNTIME) && \ chmod u+w $(STAGE1_BOOT_RUNTIME) mkdir -p $(STAGE1_BOOT_DIR)/lib && \ if [ -e $(SYSTEM_JDK_DIR)/lib/tools.jar ] ; then \ - ln -sf $(SYSTEM_JDK_DIR)/lib/tools.jar $(STAGE1_BOOT_DIR)/lib/tools.jar ; \ + ln -sfv $(SYSTEM_JDK_DIR)/lib/tools.jar $(STAGE1_BOOT_DIR)/lib/tools.jar ; \ else \ - ln -sf $(STAGE1_BOOT_RUNTIME) $(STAGE1_BOOT_DIR)/lib/tools.jar ; \ + ln -sfv $(STAGE1_BOOT_RUNTIME) $(STAGE1_BOOT_DIR)/lib/tools.jar ; \ fi - ln -sf $(SYSTEM_JDK_DIR)/jre/lib/$(JRE_ARCH_DIR) \ - $(STAGE1_BOOT_DIR)/jre/lib/ && \ +# Workaround some older ppc64le builds installing to 'ppc64le' rather than 'ppc64' + if test -d $(SYSTEM_JDK_DIR)/jre/lib/ppc64le ; then \ + ln -sfv $(SYSTEM_JDK_DIR)/jre/lib/ppc64le \ + $(STAGE1_BOOT_DIR)/jre/lib/$(JRE_ARCH_DIR) ; \ + else \ + ln -sfv $(SYSTEM_JDK_DIR)/jre/lib/$(JRE_ARCH_DIR) \ + $(STAGE1_BOOT_DIR)/jre/lib/ ; \ + fi if ! test -d $(STAGE1_BOOT_DIR)/jre/lib/$(INSTALL_ARCH_DIR); \ then \ - ln -sf ./$(JRE_ARCH_DIR) \ + ln -sfv ./$(JRE_ARCH_DIR) \ $(STAGE1_BOOT_DIR)/jre/lib/$(INSTALL_ARCH_DIR); \ fi mkdir -p $(STAGE1_BOOT_DIR)/include && \ @@ -1652,7 +1658,7 @@ test -r $$i | continue; \ i=`basename $$i`; \ rm -f $(STAGE1_BOOT_DIR)/include/$$i; \ - ln -s $(SYSTEM_JDK_DIR)/include/$$i $(STAGE1_BOOT_DIR)/include/$$i; \ + ln -sv $(SYSTEM_JDK_DIR)/include/$$i $(STAGE1_BOOT_DIR)/include/$$i; \ done; mkdir -p stamps touch $@ diff -r b7bc434d2b61 -r 61916c3ad26e NEWS --- a/NEWS Tue May 13 17:35:49 2014 +0100 +++ b/NEWS Thu May 15 12:17:33 2014 +0100 @@ -183,6 +183,7 @@ - Correct placement of S8041658 fix - PR1762: Undefined references when building with NSS 3.16.1 - PR1763: ppc64 JIT doesn't support class data sharing + - PR1765: Boot JDK on ppc64le uses differently named arch directory to final build New in release 2.5.0 (2014-XX-XX): From bugzilla-daemon at icedtea.classpath.org Fri May 16 20:52:27 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 20:52:27 +0000 Subject: [Bug 1765] [IcedTea7] Boot JDK on ppc64le uses differently named arch directory to final build In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1765 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea7?cmd=changeset;node=61916c3ad26e author: Andrew John Hughes date: Thu May 15 12:17:33 2014 +0100 PR1765: Boot JDK on ppc64le uses differently named arch directory to final build 2014-05-14 Andrew John Hughes PR1765: Boot JDK on ppc64le uses differently named arch directory to final build * Makefile.am: (bootstrap-directory-stage1): Handle ppc64le boot JDK using a different arch directory to the final build. Make output more verbose. * NEWS: Updated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 20:56:02 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 20:56:02 +0000 Subject: [Bug 1374] [IcedTea7] Provide option to strip and link debugging info after build In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1374 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|1284 |1698 Target Milestone|2.5.0 |2.6.0 --- Comment #1 from Andrew John Hughes --- Move to 2.6.0. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 20:56:02 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 20:56:02 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|1374 | -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 16 20:56:02 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 16 May 2014 20:56:02 +0000 Subject: [Bug 1698] [TRACKER] IcedTea 2.6.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1698 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1374 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Fri May 16 21:28:39 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 16 May 2014 17:28:39 -0400 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> Message-ID: <53768307.8050204@redhat.com> On 05/16/2014 04:23 PM, Jie Kang wrote: > Hi, > > The patch privatizes the fields in the Resource class and includes appropriate setters/getters for the respective fields. Unit Tests are included. > > 2014-05-16 Lukasz Dracz > Jie Kang > > * netx/net/sourceforge/jnlp/cache/Resource.java: > (location, localFile, requestVersion, downloadVersion, > transferred, size, status) made fields private and added > setters and getters, and all calling sites refactored > * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: > Calling sites refactored > * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: > Calling sites refactored > * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: > (testGetLocation, testGetRequestVersion, testGetDownloadVersion, > testTransferredIsZero, testIncrementTransferred, testSizeIsNegativeOne, > testSetSize, testStatusIsCopied) added tests > > > Thanks, Couple little things here. - Resource#getTracker() - javadoc comment needs to be cleaned up - Resource#getLocalFile() - same - nitpicky but I'd prefer the following convention for the setters: public void setLocalFile(File localFile) { this.localFile = localFile; } rather than "localFile = lFile" - add a line of whitespace between each new method please - Resource#getStatusString() line was modified only by adding a trailing space... clean this out of the patch - ResourceTracker#checkCache(), there are two semicolons after the increment statement -- are you sure increment is the right operation here? It is probably correct, but have you traced the execution to be sure that at this point the field is always going to be 0? If not, you've changed the semantics of this method. Perhaps, to be safe, you should expose a setter for the transferred field. Thanks, -- Andrew A From omajid at redhat.com Sat May 17 00:29:29 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 16 May 2014 20:29:29 -0400 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> References: <497845402.4276481.1400271650960.JavaMail.zimbra@redhat.com> <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> Message-ID: <20140517002929.GC4370@redhat.com> Hi, Thanks for the patch! * Jie Kang [2014-05-16 16:24]: > 2014-05-16 Lukasz Dracz > Jie Kang > > * netx/net/sourceforge/jnlp/cache/Resource.java: > (location, localFile, requestVersion, downloadVersion, > transferred, size, status) made fields private and added > setters and getters, and all calling sites refactored > * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: > Calling sites refactored > * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: > Calling sites refactored > * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: > (testGetLocation, testGetRequestVersion, testGetDownloadVersion, > testTransferredIsZero, testIncrementTransferred, testSizeIsNegativeOne, > testSetSize, testStatusIsCopied) added tests Please read the GNU ChangeLog guidelines and follow them whenever possible: http://www.gnu.org/prep/standards/html_node/Change-Logs.html Please pay attention to the syntax (where ':' goes) and the phrasing (including tenses and keywords like 'Likewise' and 'All callers changed'). > +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Fri May 16 11:12:45 2014 -0400 > - * Returns the tracker that first created or monitored the > + * Returns the tracker that first creprivate ated or monitored the There's a typo here. > + /**localFile You probably meant to remove this. > + * Returns the local file being downloaded to > + * @return the local file being downloaded This comment is duplicated. Just like duplication in code is a bad idea, so is duplication in comments. > + public File getLocalFile() { > + return localFile; > + } Please see the Code Style: http://icedtea.classpath.org/wiki/IcedTea-Web#Code_style > + > + /** > + * Sets the local file to be downloaded to > + * @param lFile If you are documenting a parameter using `@param`, please document it completely. However, my preference is to leave off the `@param` wherever possible and instead make the combination of the method name and the variable name itself descriptive. I think you don't need it here because a method named `setLocalFile` that takes a File is fairly obvious. > + public void setLocalFile(File lFile) { > + localFile = lFile; `lFile` should probably be named `localFile`. I would write is as: public void setLocalFile(File localFile) { this.localFile = localFile; } > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 16 11:12:45 2014 -0400 > + File finalFile = CacheUtil.getCacheFile(resource.getLocation(), resource.getDownloadVersion()); // This is where extracted version will be, or downloaded file if not compressed. This last line is definitely too long. Can you move the comment to the line above? > - resource.transferred = downloadLocationFile.length(); > + resource.incrementTransferred(downloadLocationFile.length()); Can you add an assert here that the current transferred amount is 0? > +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java Fri May 16 11:12:45 2014 -0400 > + @Test > + public void testGetLocation() throws Exception { > + String testName = "GetLocation"; > + Resource res = createResource(testName); > + URL location = res.getLocation(); > + URL dummyUrl = new URL("http://example.com/applet" + testName + ".jar"); > + assertEquals(location, dummyUrl); I like that this unit test is small and testing one isolated thing at a time. But one thing that it's doing appears like magic at first: why is that `dummyURL` same as the URL of the resource? Can you make this part more explicit? If the test fails, it should be obvious what is wrong, and what the right result should be. > + public void testIncrementTransferred() throws Exception { > + long original = res.getTransferred(); Excellent. This keeps this test independent of the one before (which verifies the initial value). > + res.incrementTransferred(10); > + assertEquals(original + 10, res.getTransferred()); Can you make the `10` a constant? That should make it really, really explicit that the both values should be exactly the same. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From jvanek at redhat.com Sat May 17 10:32:02 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Sat, 17 May 2014 12:32:02 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <20140516142436.GA2186@redhat.com> References: <537267C0.6050805@redhat.com> <53749D0A.30707@redhat.com> <20140515222456.GD2127@redhat.com> <537603B2.7050205@redhat.com> <20140516142436.GA2186@redhat.com> Message-ID: <53773AA2.60601@redhat.com> On 05/16/2014 04:24 PM, Omair Majid wrote: > * Jiri Vanek [2014-05-16 08:25]: >> On 05/16/2014 12:24 AM, Omair Majid wrote: >> heheh :)) Somebody should review it ;) > > Probably, but there's this: > >>>> On 05/13/2014 08:43 PM, Jiri Vanek wrote: >>>>> This is probably not final version of the patch - as it break all >>>>> tests using PluginAppletMocks - Its easy - tests do not run on >>>>> bootclassapth, so the Ancestor of my Access class is in different >>>>> classlaoder. > > Are you planning on fixing this first? I wonted, and i would like to. Its work in progress, and may longer then I thought. Between first verion of patch - where was this original statement - and second version, where I wrote a bit more, several things happened: I tried to force to load sveral explicit classes directly in java code by bootclasslaoder, however, not successfully. So I tried to change xbootclasspath parameter. It didn`t help either! However, same change on commandline usage outside makefile helped :-/. But caused 7other tests to fail (the parser family) So I ended in no op for Friday. There is still few ways to try but - as we (did we?) agreed - it do not need to be blocker for patch itself. The patch can lurk for a while in Head before tests are fixed. So answer is yes. But may happen taht with longer delay :( Thanx for your thought! J. From ptisnovs at icedtea.classpath.org Mon May 19 07:40:45 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 19 May 2014 07:40:45 +0000 Subject: /hg/gfx-test: Ten new tests added into CAGOperationsOnTwoTouchin... Message-ID: changeset 8c51f9c636ab in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=8c51f9c636ab author: Pavel Tisnovsky date: Mon May 19 09:41:33 2014 +0200 Ten new tests added into CAGOperationsOnTwoTouchingCircles. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java | 250 ++++++++++ 2 files changed, 255 insertions(+), 0 deletions(-) diffs (272 lines): diff -r 07ad90c67150 -r 8c51f9c636ab ChangeLog --- a/ChangeLog Wed May 14 10:25:12 2014 +0200 +++ b/ChangeLog Mon May 19 09:41:33 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-19 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java: + Ten new tests added into CAGOperationsOnTwoTouchingCircles. + 2014-05-14 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltUsingBgColor.java: diff -r 07ad90c67150 -r 8c51f9c636ab src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java --- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Wed May 14 10:25:12 2014 +0200 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java Mon May 19 09:41:33 2014 +0200 @@ -1432,6 +1432,256 @@ } /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingGridTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using union operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingUnionOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using inverse subtract operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d); + // create area using inverse subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using Intersect operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d); + // create area using Intersect operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingIntersectOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping rectangles using Xor operator. The shape is rendered + * using texture paint (fill). + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorTextureFillUsingDiagonalGridTexture(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set fill color + CommonRenderingStyles.setTextureFillUsingDiagonalGridTexture(image, graphics2d); + // create area using Xor operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingRectanglesUsingXorOperator(image); + // draw the area + graphics2d.fill(area); + // test result + return TestResult.PASSED; + } + + /** * Entry point to the test suite. * * @param args From bugzilla-daemon at icedtea.classpath.org Mon May 19 14:25:50 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 19 May 2014 14:25:50 +0000 Subject: [Bug 1777] New: IcedTea-Web always redownloads web start application if they are packed Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1777 Bug ID: 1777 Summary: IcedTea-Web always redownloads web start application if they are packed Product: IcedTea-Web Version: unspecified Hardware: x86_64 OS: FreeBSD Status: NEW Severity: normal Priority: P5 Component: NetX (javaws) Assignee: omajid at redhat.com Reporter: lhersch at dssgmbh.de CC: unassigned at icedtea.classpath.org When you start an webstart-application that have packed resources, the resources are downloaded even if they are cached. The Problem is in net.sourceforge.jnlp.cache.CacheEntry.isCached(). Here is the length of the uncompressed local file compared with the length of the compressed download-resource. That's not equal of course and so isCached() return false. For testing you can use following application. http://portal.incore.de/dss-portal.jnlp -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Mon May 19 18:35:22 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 19 May 2014 18:35:22 +0000 Subject: [Bug 1778] New: [IcedTea8] Allow an alternate JAR program to be used Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1778 Bug ID: 1778 Summary: [IcedTea8] Allow an alternate JAR program to be used Product: IcedTea Version: 8-hg Hardware: all OS: All Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org 2008-08-08 Joshua Sumali * Makefile.am: Add ALT_JAR_CMD to ICEDTEA_ENV if --with-alt-jar is used. Added patches/icedtea-alt-jar.patch. * acinclude.m4: Define --with-alt-jar. * configure.ac: Add --with-alt-jar. * patches/icedtea-alt-jar.patch: New file. * HACKING: Updated. This allows e.g. fastjar to be used on builds like Zero where the Java-based jar command is slow. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Mon May 19 18:36:58 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 19 May 2014 18:36:58 +0000 Subject: [Bug 1778] [IcedTea8] Allow an alternate JAR program to be used In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1778 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea8-forest?cmd=changeset;node=e0a10e6be00a author: andrew date: Mon May 19 19:35:59 2014 +0100 PR1778: Allow an alternate JAR program to be used -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Tue May 20 06:52:53 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 20 May 2014 06:52:53 +0000 Subject: /hg/rhino-tests: Added JavaDoc and four new tests into SimpleBin... Message-ID: changeset 6f5566e8e8cf in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=6f5566e8e8cf author: ptisnovs date: Tue May 20 08:52:43 2014 +0200 Added JavaDoc and four new tests into SimpleBindingsTest suite. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleBindingsTest.java | 92 +++++++++++++++++++++++++++++- 2 files changed, 95 insertions(+), 2 deletions(-) diffs (182 lines): diff -r bd78ec86c792 -r 6f5566e8e8cf ChangeLog --- a/ChangeLog Fri May 16 09:39:20 2014 +0200 +++ b/ChangeLog Tue May 20 08:52:43 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-20 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleBindingsTest.java: + Added JavaDoc and four new tests into SimpleBindingsTest suite. + 2014-05-16 Pavel Tisnovsky * src/org/RhinoTests/SimpleScriptContextTest.java: diff -r bd78ec86c792 -r 6f5566e8e8cf src/org/RhinoTests/SimpleBindingsTest.java --- a/src/org/RhinoTests/SimpleBindingsTest.java Fri May 16 09:39:20 2014 +0200 +++ b/src/org/RhinoTests/SimpleBindingsTest.java Tue May 20 08:52:43 2014 +0200 @@ -1,7 +1,7 @@ /* Rhino test framework - Copyright (C) 2011, 2012 Red Hat + Copyright (C) 2011, 2012, 2013, 2014 Red Hat This file is part of IcedTea. @@ -46,8 +46,10 @@ import javax.script.SimpleBindings; /** + * Basic SimpleBindings test suite. Following tests checks the class + * javax.script.SimpleBindings. + * * @author Pavel Tisnovsky - * */ public class SimpleBindingsTest extends BaseRhinoTest { @@ -63,6 +65,9 @@ return; } + /** + * Test for constructor without parameters. + */ protected void testConstructor1() { SimpleBindings simpleBindings = new SimpleBindings(); assertNotNull(simpleBindings, "new SimpleBindings() failed"); @@ -70,6 +75,9 @@ assertTrue(simpleBindings.size() == 0, "simpleBindings should be empty"); } + /** + * Test for constructor with the parameter Map<String,Object> + */ protected void testConstructor2() { SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); assertNotNull(simpleBindings, "new SimpleBindings() failed"); @@ -77,6 +85,9 @@ assertTrue(simpleBindings.size() == 0, "simpleBindings should be empty"); } + /** + * Test for constructor with the parameter Map<String,Object> + */ protected void testConstructor3() { SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); assertNotNull(simpleBindings, "new SimpleBindings() failed"); @@ -84,17 +95,60 @@ assertTrue(simpleBindings.size() == 0, "simpleBindings should be empty"); } + /** + * Test for method containsKey(String) + */ protected void testContainsKey1() { SimpleBindings simpleBindings = new SimpleBindings(); assertFalse(simpleBindings.containsKey("key"), "Bingings.containsKey() failed"); } + /** + * Test for method containsKey(String) + */ protected void testContainsKey2() { SimpleBindings simpleBindings = new SimpleBindings(); simpleBindings.put("key", "value"); assertTrue(simpleBindings.containsKey("key"), "Bingings.containsKey() failed"); } + /** + * Test for method containsKey(String) + */ + protected void testContainsKey3() { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + assertFalse(simpleBindings.containsKey("key"), "Bingings.containsKey() failed"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKey4() { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + simpleBindings.put("key", "value"); + assertTrue(simpleBindings.containsKey("key"), "Bingings.containsKey() failed"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKey5() { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + assertFalse(simpleBindings.containsKey("key"), "Bingings.containsKey() failed"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKey6() { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + simpleBindings.put("key", "value"); + assertTrue(simpleBindings.containsKey("key"), "Bingings.containsKey() failed"); + } + + /** + * Test for method containsKey(String) + */ protected void testContainsKeyNegative1() throws Exception { SimpleBindings simpleBindings = new SimpleBindings(); try { @@ -106,6 +160,9 @@ throw new Exception("NPE did not thrown as expected"); } + /** + * Test for method containsKey(String) + */ protected void testContainsKeyNegative2() throws Exception { SimpleBindings simpleBindings = new SimpleBindings(); try { @@ -117,6 +174,9 @@ throw new Exception("IllegalArgumentException did not thrown as expected"); } + /** + * Test for method containsKey(String) + */ protected void testContainsKeyNegative3() throws Exception { SimpleBindings simpleBindings = new SimpleBindings(); try { @@ -129,6 +189,34 @@ } /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative4() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(); + try { + simpleBindings.containsKey(java.awt.Color.GREEN); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative5() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(); + try { + simpleBindings.containsKey(this); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From ptisnovs at icedtea.classpath.org Tue May 20 07:04:36 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 20 May 2014 07:04:36 +0000 Subject: /hg/rhino-tests: Ten new tests added into ScriptContextTest. Message-ID: changeset 7d92b73d875d in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=7d92b73d875d author: ptisnovs date: Tue May 20 09:04:26 2014 +0200 Ten new tests added into ScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptContextTest.java | 212 +++++++++++++++++++++++++++++- 2 files changed, 215 insertions(+), 2 deletions(-) diffs (249 lines): diff -r 6f5566e8e8cf -r 7d92b73d875d ChangeLog --- a/ChangeLog Tue May 20 08:52:43 2014 +0200 +++ b/ChangeLog Tue May 20 09:04:26 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-20 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextTest.java: + Ten new tests added into ScriptContextTest. + 2014-05-20 Pavel Tisnovsky * src/org/RhinoTests/SimpleBindingsTest.java: diff -r 6f5566e8e8cf -r 7d92b73d875d src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Tue May 20 08:52:43 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Tue May 20 09:04:26 2014 +0200 @@ -40,16 +40,29 @@ package org.RhinoTests; +import java.util.HashMap; + +import javax.script.Bindings; +import javax.script.SimpleBindings; import javax.script.ScriptContext; import javax.script.SimpleScriptContext; + + /** - * TODO: not implemented - * @author ptisnovs + * Basic ScriptContext test suite. Following tests checks the interface + * javax.script.ScriptContext. * + * @author Pavel Tisnovsky */ public class ScriptContextTest extends BaseRhinoTest { + /** + * Many methods accepts ScriptContext.GLOBAL_SCOPE or ScriptContext.ENGINE_SCOPE + * as one integer parameters. Let's see how those methods works with different value. + */ + private final static Integer INVALID_SCOPE = 42; + @Override protected void setUp(String[] args) { // this block could be empty @@ -347,6 +360,201 @@ } /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute19() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("name", "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute20() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("name", "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute21() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("name", null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute22() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("", "value", ScriptContext.GLOBAL_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", \"value\", ScriptContext.GLOBAL_SCOPE.) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute23() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("", "", ScriptContext.GLOBAL_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", \"\", ScriptContext.GLOBAL_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute24() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("", null, ScriptContext.GLOBAL_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(\"\", null, ScriptContext.GLOBAL_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute25() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute(null, "value", ScriptContext.GLOBAL_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, \"value\", ScriptContext.GLOBAL_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute26() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute(null, "", ScriptContext.GLOBAL_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, \"\", ScriptContext.GLOBAL_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute27() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute(null, null, ScriptContext.GLOBAL_SCOPE); + throw new AssertionError("ScriptContext.setAttribute(null, null, ScriptContext.GLOBAL_SCOPE) does not throw any exception"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute28() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "value", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From ptisnovs at icedtea.classpath.org Tue May 20 07:12:18 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 20 May 2014 07:12:18 +0000 Subject: /hg/rhino-tests: Ten new tests added into SimpleScriptContextTest. Message-ID: changeset 67c8a396f43f in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=67c8a396f43f author: ptisnovs date: Tue May 20 09:12:11 2014 +0200 Ten new tests added into SimpleScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleScriptContextTest.java | 132 ++++++++++++++++++++++++ 2 files changed, 137 insertions(+), 0 deletions(-) diffs (171 lines): diff -r 7d92b73d875d -r 67c8a396f43f ChangeLog --- a/ChangeLog Tue May 20 09:04:26 2014 +0200 +++ b/ChangeLog Tue May 20 09:12:11 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-20 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleScriptContextTest.java: + Ten new tests added into SimpleScriptContextTest. + 2014-05-20 Pavel Tisnovsky * src/org/RhinoTests/ScriptContextTest.java: diff -r 7d92b73d875d -r 67c8a396f43f src/org/RhinoTests/SimpleScriptContextTest.java --- a/src/org/RhinoTests/SimpleScriptContextTest.java Tue May 20 09:04:26 2014 +0200 +++ b/src/org/RhinoTests/SimpleScriptContextTest.java Tue May 20 09:12:11 2014 +0200 @@ -40,9 +40,15 @@ package org.RhinoTests; +import java.util.HashMap; + +import javax.script.Bindings; +import javax.script.SimpleBindings; import javax.script.ScriptContext; import javax.script.SimpleScriptContext; + + /** * Basic ScriptContext test suite. Following tests checks the interface * javax.script.SimpleScriptContext. @@ -51,6 +57,12 @@ */ public class SimpleScriptContextTest extends BaseRhinoTest { + /** + * Many methods accepts ScriptContext.GLOBAL_SCOPE or ScriptContext.ENGINE_SCOPE + * as one integer parameters. Let's see how those methods works with different value. + */ + private final static Integer INVALID_SCOPE = 42; + @Override protected void setUp(String[] args) { // this block could be empty @@ -228,6 +240,126 @@ } /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute11() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute12() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute13() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute14() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute15() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute16() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "value", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute17() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "", ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute18() { + // tested object + SimpleScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, null, ScriptContext.GLOBAL_SCOPE); + } + catch (Exception e) { + e.printStackTrace(); + throw new AssertionError(e.getMessage()); + } + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From bugzilla-daemon at icedtea.classpath.org Tue May 20 10:57:27 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 20 May 2014 10:57:27 +0000 Subject: [Bug 1778] [IcedTea8] Allow an alternate JAR program to be used In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1778 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1282 Target Milestone|--- |3.0.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Tue May 20 10:57:27 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 20 May 2014 10:57:27 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1778 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at redhat.com Tue May 20 13:02:53 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 20 May 2014 15:02:53 +0200 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <20140517002929.GC4370@redhat.com> References: <497845402.4276481.1400271650960.JavaMail.zimbra@redhat.com> <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <20140517002929.GC4370@redhat.com> Message-ID: <537B527D.3090108@redhat.com> On 05/17/2014 02:29 AM, Omair Majid wrote: > Hi, > > Thanks for the patch! > I have not read the patch. But one general hint. Before crating getter, and especially setter, try to figure out if it is needed at all. If not, then it can be good practice to change the variable to be final. And anyway, welcome to the team and goo d luck to survive us! Best regards from CZ J. From jvanek at redhat.com Tue May 20 13:10:22 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 20 May 2014 15:10:22 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <537B51F3.6040001@redhat.com> References: <537B51F3.6040001@redhat.com> Message-ID: <537B543E.2050300@redhat.com> On 05/17/2014 12:32 PM, Jiri Vanek wrote: > On 05/16/2014 04:24 PM, Omair Majid wrote: >> * Jiri Vanek [2014-05-16 08:25]: >>> On 05/16/2014 12:24 AM, Omair Majid wrote: >>> heheh :)) Somebody should review it ;) >> RFC! :) >> >>>>> On 05/13/2014 08:43 PM, Jiri Vanek wrote: >>>>>> This is probably not final version of the patch - as it break all >>>>>> tests using PluginAppletMocks - Its easy - tests do not run on >>>>>> bootclassapth, so the Ancestor of my Access class is in different >>>>>> classlaoder. >> >> Are you planning on fixing this first? > I wonted, and i would like to. Its work in progress, and may longer then I thought. > > Between first verion of patch - where was this original statement - and second version, where I > wrote a bit more, several things happened: > > I tried to force to load sveral explicit classes directly in java code by bootclasslaoder, however, > not successfully. > So I tried to change xbootclasspath parameter. It didn`t help either! However, same change on > commandline usage outside makefile helped :-/. But caused 7other tests to fail (the parser family) > > So I ended in no op for Friday. There is still few ways to try but - as we (did we?) agreed - it do > not need to be blocker for patch itself. The patch can lurk for a while in Head before tests are fixed. > > > So answer is yes. But may happen taht with longer delay :( > > Thanx for your thought! > > J. > This patch have all the tests fixed. The changes in netx itself are 100% same as before. Only makefiel.am and two tests have changed. This patch should be (and will be befor I push) split into three parts. 1) the patch to netx itself, which alows us to run with usptreamopenjdk, oracle jdk and ibm jdk 2) the fixes to tests and makefile which adapt to need of xbootclassapth instead of classapth 3) added the semicolons behind every CLASSPATH variable which was modified/added/used in 2 Well tbh, I do not fully understand why 2 is needed. But At least I can guess. But I have absolutely no idea why the semicolon (3) have so huge impact.... Any hints welcomed. J. Also for record - I have attempted to upstream the minor private->pkg private patch: http://mail.openjdk.java.net/pipermail/jdk9-dev/2014-May/000726.html Still no reply. -------------- next part -------------- A non-text attachment was scrubbed... Name: allJdks3.patch Type: text/x-patch Size: 24722 bytes Desc: not available URL: From jvanek at redhat.com Tue May 20 13:00:35 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 20 May 2014 15:00:35 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <53773AA2.60601@redhat.com> References: <537267C0.6050805@redhat.com> <53749D0A.30707@redhat.com> <20140515222456.GD2127@redhat.com> <537603B2.7050205@redhat.com> <20140516142436.GA2186@redhat.com> <53773AA2.60601@redhat.com> Message-ID: <537B51F3.6040001@redhat.com> On 05/17/2014 12:32 PM, Jiri Vanek wrote: > On 05/16/2014 04:24 PM, Omair Majid wrote: >> * Jiri Vanek [2014-05-16 08:25]: >>> On 05/16/2014 12:24 AM, Omair Majid wrote: >>> heheh :)) Somebody should review it ;) >> RFC! :) >> >>>>> On 05/13/2014 08:43 PM, Jiri Vanek wrote: >>>>>> This is probably not final version of the patch - as it break all >>>>>> tests using PluginAppletMocks - Its easy - tests do not run on >>>>>> bootclassapth, so the Ancestor of my Access class is in different >>>>>> classlaoder. >> >> Are you planning on fixing this first? > I wonted, and i would like to. Its work in progress, and may longer then I thought. > > Between first verion of patch - where was this original statement - and second version, where I > wrote a bit more, several things happened: > > I tried to force to load sveral explicit classes directly in java code by bootclasslaoder, however, > not successfully. > So I tried to change xbootclasspath parameter. It didn`t help either! However, same change on > commandline usage outside makefile helped :-/. But caused 7other tests to fail (the parser family) > > So I ended in no op for Friday. There is still few ways to try but - as we (did we?) agreed - it do > not need to be blocker for patch itself. The patch can lurk for a while in Head before tests are fixed. > > > So answer is yes. But may happen taht with longer delay :( > > Thanx for your thought! > > J. > This patch have all the tests fixed. The changes in netx itself are 100% same as before. Only makefiel.am and two tests have changed. This patch should be (and will be befor I push) split into three parts. 1) the patch to netx itself, which alows us to run with usptreamopenjdk, oracle jdk and ibm jdk 2) the fixes to tests and makefile which adapt to need of xbootclassapth instead of classapth 3) added the semicolons behind every CLASSPATH variable which was modified/added/used in 2 Well tbh, I do not fully understand why 2 is needed. But At least I can guess. But I have absolutely no idea why the semicolon (3) have so huge impact.... Any hints welcomed. J. Also for record - I have attempted to upstream the minor private->pkg private patch: http://mail.openjdk.java.net/pipermail/jdk9-dev/2014-May/000726.html Still no reply. -------------- next part -------------- A non-text attachment was scrubbed... Name: allJdks3.patch Type: text/x-patch Size: 24721 bytes Desc: not available URL: From aazores at redhat.com Tue May 20 14:06:00 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 10:06:00 -0400 Subject: Oracle Java 8 problems due to TLS policy change In-Reply-To: References: <1013403333.3857697.1397240340516.JavaMail.zimbra@redhat.com> Message-ID: <537B6148.4040608@redhat.com> On 05/16/2014 03:36 AM, helpcrypto helpcrypto wrote: > Super Ping! > > > On Mon, Apr 14, 2014 at 2:41 PM, helpcrypto helpcrypto > > wrote: > > Hi Andrew, thx for replying. > > On Fri, Apr 11, 2014 at 8:19 PM, Andrew Hughes > > wrote: > > > ----- Original Message ----- > > Ping? > > > > On Fri, Apr 4, 2014 at 11:03 AM, helpcrypto helpcrypto > > > > wrote: > > > > > According to > > > > http://docs.oracle.com/javase/8/docs/technotes/guides/security/enhancements-8.htmlOracle > > > Java 8 now uses TLS1.1 and TLS1.2 (both enabled by default on > > > Control Panel). > > > > > > This seems to be causing an error in our applet loading. > Problem seems > > > solved if both unchecked. Funny thing is our server only > supports TLS1.0. > > > > > > Is icedtea8 following the same TLS policy? (switching to > TLS1.1 and TLS1.2) > > > If so, i should check if the same error appears. > > > > > I'm not sure what you're referring to here. There is no > control panel in > IcedTea/OpenJDK 6, 7 or 8. I seem to remember TLS 1.2 support > being added > as part of 7 (it was one of the reasons for the addition of an > explicit > ECC provider). > > > Maybe Jiri can chime in here? > > > Oracle Java 8 JRE has enabled (by default) TLS 1.1 and TLS 1.2 and > that's causing some problems in our case. I was wondering how > OpenJDK/Icedtea is handling protocol priorities/this issue. > > Is there such a thing as "Icedtea-Web JRE 8" so I can test? > > I don't know anything about TLS in OpenJDK/IcedTea itself, but there is no "IcedTea-Web JRE 8" for you to test. There are only the regular releases, so 1.4 and 1.5 right now. What are you looking for in this "other build" of ITW? Thanks, -- Andrew A -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Tue May 20 14:07:59 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 10:07:59 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <5374E325.3000705@redhat.com> References: <5374E325.3000705@redhat.com> Message-ID: <537B61BF.4090108@redhat.com> On 05/15/2014 11:54 AM, Andrew Azores wrote: > Hi, > > I've refactored PolicyEditor so that the policy file model is now in a > separate class, moving PolicyEditor toward MVC design. There still > isn't really a separation between View and Controller though. > > The patch looks large in file size but only because such a large > amount of code has been relocated. Nothing has been done other than > the extraction/refactor and associated changes in call sites. > > All the unit tests should still be passing, other than the two that > are marked Known To Fail. I've also done fairly extensive manual > testing and it still seems to work properly as far as I can tell. > > Thanks, > Ping. Thanks, -- Andrew A From helpcrypto at gmail.com Tue May 20 14:28:57 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 20 May 2014 16:28:57 +0200 Subject: Oracle Java 8 problems due to TLS policy change In-Reply-To: <537B6148.4040608@redhat.com> References: <1013403333.3857697.1397240340516.JavaMail.zimbra@redhat.com> <537B6148.4040608@redhat.com> Message-ID: As I tried to explain, we have detected a problem running Oracle JRE8 cause of TLS policy change (Now, TLS 1.1 and TLS 2.0 are enabled by default on Control Panel, and this seems to cause a SSLException when working with our very-legacy server) I was looking to reproduce the error using Icedtea+OpenJDK, but firstly I have to find TLS 1.1/TLS 2.0 configuration option. Hope its clear now. On Tue, May 20, 2014 at 4:06 PM, Andrew Azores wrote: > On 05/16/2014 03:36 AM, helpcrypto helpcrypto wrote: > > Super Ping! > > > On Mon, Apr 14, 2014 at 2:41 PM, helpcrypto helpcrypto < > helpcrypto at gmail.com> wrote: > >> Hi Andrew, thx for replying. >> >> On Fri, Apr 11, 2014 at 8:19 PM, Andrew Hughes wrote: >> >>> >>> ----- Original Message ----- >>> > Ping? >>> > >>> > On Fri, Apr 4, 2014 at 11:03 AM, helpcrypto helpcrypto < >>> helpcrypto at gmail.com >>> > > wrote: >>> > >>> > > According to >>> > > >>> http://docs.oracle.com/javase/8/docs/technotes/guides/security/enhancements-8.htmlOracle >>> > > Java 8 now uses TLS1.1 and TLS1.2 (both enabled by default on >>> > > Control Panel). >>> > > >>> > > This seems to be causing an error in our applet loading. Problem >>> seems >>> > > solved if both unchecked. Funny thing is our server only supports >>> TLS1.0. >>> > > >>> > > Is icedtea8 following the same TLS policy? (switching to TLS1.1 and >>> TLS1.2) >>> > > If so, i should check if the same error appears. >>> > > >>> >>> I'm not sure what you're referring to here. There is no control panel in >>> IcedTea/OpenJDK 6, 7 or 8. I seem to remember TLS 1.2 support being added >>> as part of 7 (it was one of the reasons for the addition of an explicit >>> ECC provider). >>> >> > Maybe Jiri can chime in here? > > >> Oracle Java 8 JRE has enabled (by default) TLS 1.1 and TLS 1.2 and >> that's causing some problems in our case. I was wondering how >> OpenJDK/Icedtea is handling protocol priorities/this issue. >> >> Is there such a thing as "Icedtea-Web JRE 8" so I can test? >> > > > I don't know anything about TLS in OpenJDK/IcedTea itself, but there is no > "IcedTea-Web JRE 8" for you to test. There are only the regular releases, > so 1.4 and 1.5 right now. What are you looking for in this "other build" of > ITW? > > Thanks, > > -- > Andrew A > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ldracz at redhat.com Tue May 20 14:54:18 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Tue, 20 May 2014 10:54:18 -0400 (EDT) Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <53768307.8050204@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> Message-ID: <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> ----- Original Message ----- From: "Andrew Azores" To: "Jie Kang" , distro-pkg-dev at openjdk.java.net Cc: "Lukasz Dracz" Sent: Friday, May 16, 2014 5:28:39 PM Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring On 05/16/2014 04:23 PM, Jie Kang wrote: > Hi, > > The patch privatizes the fields in the Resource class and includes appropriate setters/getters for the respective fields. Unit Tests are included. > > 2014-05-16 Lukasz Dracz > Jie Kang > > * netx/net/sourceforge/jnlp/cache/Resource.java: > (location, localFile, requestVersion, downloadVersion, > transferred, size, status) made fields private and added > setters and getters, and all calling sites refactored > * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: > Calling sites refactored > * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: > Calling sites refactored > * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: > (testGetLocation, testGetRequestVersion, testGetDownloadVersion, > testTransferredIsZero, testIncrementTransferred, testSizeIsNegativeOne, > testSetSize, testStatusIsCopied) added tests > > > Thanks, > >Couple little things here. >- Resource#getTracker() - javadoc comment needs to be cleaned up >- Resource#getLocalFile() - same >- nitpicky but I'd prefer the following convention for the setters: > >public void setLocalFile(File localFile) { > this.localFile = localFile; >} > >rather than "localFile = lFile" > >- add a line of whitespace between each new method please >- Resource#getStatusString() line was modified only by adding a trailing >space... clean this out of the patch >- ResourceTracker#checkCache(), there are two semicolons after the >increment statement >-- are you sure increment is the right operation here? It is probably >correct, but have you traced the execution to be sure that at this point >the field is always going to be 0? If not, you've changed the semantics >of this method. Perhaps, to be safe, you should expose a setter for the >transferred field. > >Thanks, > >-- >Andrew A Hello, I took Andrew, Jiri and Omair's suggestions and revised our previous patch. Thanks, -------------- next part -------------- A non-text attachment was scrubbed... Name: 2014-05-20P-ResourceSetterGetters.patch Type: text/x-patch Size: 22587 bytes Desc: not available URL: From aazores at redhat.com Tue May 20 15:09:25 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 11:09:25 -0400 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> Message-ID: <537B7025.2080106@redhat.com> Hi, On 05/20/2014 10:54 AM, Lukasz Dracz wrote: > Hello, > > I took Andrew, Jiri and Omair's suggestions and revised our previous patch. > > Thanks, Please check your editor/IDE's formatting settings - you have mixed tabs and spaces in this patch. Indentation should be four spaces per indent level. The ITW wiki should have the correct Eclipse settings. testSetSize also doesn't take into account Omair's suggestion of using a constant rather than the literal '10' directly, which I would also like to see changed. Otherwise I think this is good to go. Please send a new version with fixed formatting and testSetSize. Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Tue May 20 15:10:27 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 20 May 2014 15:10:27 +0000 Subject: [Bug 1779] New: A fatal error has been detected by the Java Runtime Environment Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1779 Bug ID: 1779 Summary: A fatal error has been detected by the Java Runtime Environment Product: IcedTea Version: 7-hg Hardware: x86_64 OS: Linux Status: NEW Severity: critical Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: tianhai.liu at gmail.com CC: unassigned at icedtea.classpath.org Created attachment 1084 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1084&action=edit error log of JVM # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f3ab68b1ba3, pid=26037, tid=139890048673536 # # JRE version: OpenJDK Runtime Environment (7.0_51) (build 1.7.0_51-b00) # Java VM: OpenJDK 64-Bit Server VM (24.45-b08 mixed mode linux-amd64 compressed oops) # Problematic frame: # V [libjvm.so+0x806ba3][thread 139890049726208 also had an error] oopDesc* PSPromotionManager::copy_to_survivor_space(oopDesc*)+0x233 # # 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: # /tmp/jvm-26037/hs_error.log [thread 139890043410176 also had an error] [thread 139890054989568 also had an error] [thread 139890054989568 also had an error] # # If you would like to submit a bug report, please include # instructions on how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at redhat.com Tue May 20 15:20:56 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 20 May 2014 17:20:56 +0200 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <537B7025.2080106@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> <537B7025.2080106@redhat.com> Message-ID: <537B72D8.4090607@redhat.com> > Otherwise I think this is good to go. Please send a new version with fixed formatting and testSetSize. > > Thanks, > And new changelog! Thanx for clean up! Good start!-) J. From omajid at redhat.com Tue May 20 15:40:01 2014 From: omajid at redhat.com (Omair Majid) Date: Tue, 20 May 2014 11:40:01 -0400 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <5374DA82.4030303@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> <20140512210341.GK2138@redhat.com> <5374DA82.4030303@redhat.com> Message-ID: <20140520154001.GC2672@redhat.com> * Jiri Vanek [2014-05-15 11:17]: > I have one more opinion to the final I have added. If somebody will > suddenly try to assign to final value, he will be warned by compiler. And > thats good thing. At least it will force him to double check what he is > doing. Fair enough. I prefer to make fields final only if all of them can be. It's my hint for immutable (and hence thread-safe) object. > I have also followed your recommendation to move few util classes to > UrlUtils. And write tests for them. Awesome! > There is one change in code then. The original notNullUrlEquals ignored > port! I added port check to new code. (this is actually code logic and to > not belongs here..) > > I will NOT push this line (unless it is approved directly). Nice! > +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Thu May 15 17:09:28 2014 +0200 > @@ -75,6 +74,7 @@ > > /** > * Returns the remote location this entry caches. > + * @return URL same, as the one on which this entry was created No comma needed here. But I must ask: why are you duplicating the same thing in two places right next to each other here? > /** > * Returns the time in the local system clock that the file was > * most recently checked for an update. > - * @return > + * @return when the item was updated in ms > */ > public long getLastUpdated() { > * Sets the time in the local system clock that the file was > * most recently checked for an update. > - * @param updatedTime > + * @param updatedTime the time to be set as last updated time > */ > public void setLastUpdated(long updatedTime) { Can you add the 'ms' reference to both methods? > - * @param lastModified > + * @param lastModified - current time detail as get from server I cant really understand the explanation in the comment. What is 'time detail'? Would it better to say 'the value of "Last-Modified" http header'? > > - try { > - long remoteModified = lastModified; > - long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); > + long remoteModified = lastModified; > + long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); > > - if (remoteModified > 0 && remoteModified <= cachedModified) > - return true; > - else > - return false; > - } catch (Exception ex) { > - OutputController.getLogger().log(ex);; > + return remoteModified > 0 && remoteModified <= cachedModified; There is one semantic change here: if properites.getProperty() returns null, Long.parseLong throws NumberFormatException. It would have been caught before, but isn't now. Is it safe to assume that this never happens? > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu May 15 17:09:28 2014 +0200 > - /** > * Returns the Permission object necessary to access the > * resource, or {@code null} if no permission is needed. > - * @param location > - * @param version > - * @return > + * @param location location of the resource > + * @param version the version, or {@code null} You know, if you named the variables resourceLocation and resourceVersion, you wouldn't need these comments :( > + * @return permissions of the location This really doesn't explain anything. It just restates (in less detail!) the name/return type of the method. Please just remove it. > * Returns the parent directory of the cached resource. > + * @return parent directory of cached resource This is just duplicating text :( > + * @return the stream towrite to resource There's a typo here, but it is also really awkward to read. Can you rephrase it to like "the stream to use when writing the resource to disk"? > + * @throws java.io.IOException if it appear Uh.. what does this mean? > */ > public static OutputStream getOutputStream(URL source, Version version) throws IOException { > File localFile = getCacheFile(source, version); > @@ -456,6 +405,9 @@ > * Copies from an input stream to an output stream. On > * completion, both streams will be closed. Streams are > * buffered automatically. > + * @param is stream to read from > + * @param os stream to write to Maybe rename variables to 'source' and 'dest' and there won't be a need for comments? > + * @throws java.io.IOException if copy fails I would just leave it out. It really doesn't say anything more than the method signature: > public static void streamCopy(InputStream is, OutputStream os) throws IOException { > - List urlList = new ArrayList(); > + List urlList = new ArrayList<>(); Please don't mix diamond changes in this patch. Okay as a separate patch, though. > +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Thu May 15 17:09:28 2014 +0200 > /** > * Return a shared Resource object representing the given > * location and version. > + * @param location final location of resource > + * @param requestVersion final version of resource > + * @param updatePolicy final policy for updating What does 'final' here mean? > @@ -290,6 +297,7 @@ > /** > * Removes the tracker to the list of trackers monitoring this > * resource. > + * @param tracker Please don't do this. At this point, it's just noise. > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu May 15 17:09:28 2014 +0200 > @@ -308,6 +309,7 @@ > * on each tracker that is monitoring the resource. Do not call > * this method with any locks because the listeners may call > * back to this ResourceTracker. > + * @param resource resource which event is fired Maybe rephrase it to 'resource on which event is fired'. > /** > * Open a URL connection and get the content length and other > * fields. > + * > + * @param resource the resource to download s/download/initialize/ > @@ -863,21 +873,28 @@ > /** > * testing wrapper > * > - * @param url > - * @param requestProperties > - * @param requestMethod > - * @return > + * @param url url of to be checked > + * @param requestProperties properties map for connection > + * @param requestMethod method of request - HEAD or GET This method should really be encapsulated in an enum. > + * @return the repsonse code from server > * @throws IOException > */ For a method documented as 'testing wrapper', I don't think it makes any sense to document the parameters. > +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu May 15 17:09:28 2014 +0200 > /** > * Add an Application listener > + * @param listener listener to be added > */ > public void addApplicationListener(ApplicationListener listener) { Why not rename the argument `listener` to `toAdd`? They you wont need the @param. > /** > * Remove an Application Listener > + * @param listener to be removed > */ > public void removeApplicationListener(ApplicationListener listener) { Same thing here. > @@ -268,6 +277,7 @@ > > /** > * Returns whether the application is running. > + * @return state of application No, please describe the return value. As in '@return true if the application is still running'. But, this comment is just repeating the method signature. There's no need for it. > @@ -349,11 +362,16 @@ > > /** > * Returns whether or not this jar is signed. > + * @return whether jar is signed. This is duplicating (incorrect) text. It really should be the application, not the jar, that's signed. > +++ b/tests/netx/unit/net/sourceforge/jnlp/util/UrlUtilsTest.java Thu May 15 17:09:28 2014 +0200 > > + @Test > + public void testUrlEquals() throws Exception { > + final URL n1 = null, n2 = null, u1 = new URL("http://example.com"), u2 = u1, u3 = new URL("http://example.com"); > + Assert.assertTrue("Two nulls should be equal", UrlUtils.urlEquals(n1, n2)); > + Assert.assertFalse("Null URL should not equal a non-null", UrlUtils.urlEquals(n1, u1)); > + Assert.assertTrue("URL should equal itself (same reference)", UrlUtils.urlEquals(u1, u2)); > + Assert.assertTrue("URLs should be equal when different reference but the same URL", UrlUtils.urlEquals(u1, u3)); You know, this really should be split into multiple tests: testUrlEqualsSameUrls testUrlEqualsNullUrls testUrlEqualsDifferentUrls And so on. If the tests are independent, moving them to different tests makes a lot of sense. > + public void notNullUrlEquals_nulls1() throws Exception { Please rename it to something like: verifyNotNullUrlEqualsThrowsExceptionWhenBothArgumentsAreNull() > + public void notNullUrlEquals_nulls2() throws Exception { How about: verifyNotNullUrlEqualsThrowsExceptionWhenFirstArgumentIsNull() > + > + public void notNullUrlEquals_nulls3() throws Exception { Missing @Test Please rename this method to: verifyNotNullUrlEqualsThrowsExceptionWhenSecondArgumentIsNull() Please apply similar changes to the rest of the code in this file. > +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Thu May 15 17:09:28 2014 +0200 > @@ -134,6 +123,8 @@ > * param "port" prints out the port > * nothing or number will run server on random(or on number specified) > * port in -Dtest.server.dir > + * @param args paramas from commandline. recognized are port and randomport s/paramas/params/ I am not sure I understand "recognized are port and randomport". Do you mean the first argument is port and the second is randomport? > + * @throws Exception > + * @throws Exception > + * @throws Exception Please, just leave these out. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Tue May 20 15:43:08 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 20 May 2014 15:43:08 +0000 Subject: [Bug 1743] Intermittant deadlock in PluginRequestProcessor In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1743 --- Comment #1 from Andrew Azores --- Hi, Sorry for taking so long to get back to you on this. The patch looks good to me and seems to work fine on Fedora 19 (the intermittant deadlock you describe was never observed and the patch has made no noticeable impact). If you could submit another patch that performs the cleanup you've outlined that would be greatly appreciated as well. Thank you very much for your work! -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Tue May 20 16:04:34 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 12:04:34 -0400 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked Message-ID: <537B7D12.1000907@redhat.com> Hi, I think the "Always Trust" checkbox that appears on the CertWarningPane for fully signed applets should not default to being checked anymore. I assume it is currently checked by default to encourage users to trust fully signed applets so that the dialogs do not continually appear - however, I don't think that's necessarily the right course of action now. Now that we have the ability to assign custom policies to different applets, persistently or per individual run of the applet I think more emphasis should be placed on this ability. Currently, the dialog also disables the Sandbox button (which then disables all ability to run the applet without granting it all permissions) when the checkbox is selected because it was decided at the time that it doesn't make sense to say "I always trust this publisher, but I want to run the applet as if I don't really trust the publisher." I think this behaviour should be kept. So the only change being made is to default the checkbox to unchecked, so that the Sandboxing options are presented as available to begin with, increasing their visibility. This comes down to simply changing one value for the checkbox. Also bundled with this patch are making a utility method static, and removing two unused fields. ChangeLog: * netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java (policyMenu, policyEditor): unused fields removed. (getImageIcon): made static. (addButtons): default alwaysTrust checkbox to not selected. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: certwarningpane-checkbox-unchecked.patch Type: text/x-patch Size: 1810 bytes Desc: not available URL: From jvanek at redhat.com Tue May 20 16:28:13 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 20 May 2014 18:28:13 +0200 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <537B7D12.1000907@redhat.com> References: <537B7D12.1000907@redhat.com> Message-ID: <537B829D.1030201@redhat.com> On 05/20/2014 06:04 PM, Andrew Azores wrote: > Hi, > > I think the "Always Trust" checkbox that appears on the CertWarningPane for fully signed applets should not default to being checked anymore. I assume it is currently checked by default to encourage users to trust fully signed applets so that the dialogs do not continually appear - however, I don't think that's necessarily the right course of action now. Now that we have the ability to assign custom policies to different applets, persistently or per individual run of the applet I think more emphasis should be placed on this ability. Currently, the dialog also disables the Sandbox button (which then disables all ability to run the applet without granting it all permissions) when the checkbox is selected because > it was decided at the time that it doesn't make sense to say "I always trust this publisher, but I want to run the applet as if I don't really trust the publisher." I think this behaviour should be kept. So the only change being made is to default the checkbox to unchecked, so that the Sandboxing options are presented as available to begin with, increasing their visibility. > > This comes down to simply changing one value for the checkbox. Also bundled with this patch are making a utility method static, and removing two unused fields. > > ChangeLog: > * netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java (policyMenu, policyEditor): unused fields removed. > (getImageIcon): made static. (addButtons): default alwaysTrust checkbox to not selected. > > Thanks, > Hmm. The "always trust" is prechecked only when certificate is verified and trusted. Otherwise it is not selected by defaul. or am I missing something? J. From aazores at redhat.com Tue May 20 17:31:11 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 13:31:11 -0400 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <537B829D.1030201@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> Message-ID: <537B915F.4000901@redhat.com> On 05/20/2014 12:28 PM, Jiri Vanek wrote: > On 05/20/2014 06:04 PM, Andrew Azores wrote: >> Hi, >> >> I think the "Always Trust" checkbox that appears on the >> CertWarningPane for fully signed applets should not default to being >> checked anymore. I assume it is currently checked by default to >> encourage users to trust fully signed applets so that the dialogs do >> not continually appear - however, I don't think that's necessarily >> the right course of action now. Now that we have the ability to >> assign custom policies to different applets, persistently or per >> individual run of the applet I think more emphasis should be placed >> on this ability. Currently, the dialog also disables the Sandbox >> button (which then disables all ability to run the applet without >> granting it all permissions) when the checkbox is selected because >> it was decided at the time that it doesn't make sense to say "I >> always trust this publisher, but I want to run the applet as if I >> don't really trust the publisher." I think this behaviour should be >> kept. So the only change being made is to default the checkbox to >> unchecked, so that the Sandboxing options are presented as available >> to begin with, increasing their visibility. >> >> This comes down to simply changing one value for the checkbox. Also >> bundled with this patch are making a utility method static, and >> removing two unused fields. >> >> ChangeLog: >> * netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java >> (policyMenu, policyEditor): unused fields removed. >> (getImageIcon): made static. (addButtons): default alwaysTrust >> checkbox to not selected. >> >> Thanks, >> > > > Hmm. The "always trust" is prechecked only when certificate is > verified and trusted. Otherwise it is not selected by defaul. > > or am I missing something? > > J. Yes, that's what I'm talking about. I think it makes sense for it by default to never be selected. Thanks, -- Andrew A From jvanek at redhat.com Tue May 20 18:12:07 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Tue, 20 May 2014 20:12:07 +0200 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <537B915F.4000901@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> Message-ID: <537B9AF7.8000207@redhat.com> On 05/20/2014 07:31 PM, Andrew Azores wrote: > On 05/20/2014 12:28 PM, Jiri Vanek wrote: >> On 05/20/2014 06:04 PM, Andrew Azores wrote: >>> Hi, >>> >>> I think the "Always Trust" checkbox that appears on the CertWarningPane for fully signed applets should not default to being checked anymore. I assume it is currently checked by default to encourage users to trust fully signed applets so that the dialogs do not continually appear - however, I don't think that's necessarily the right course of action now. Now that we have the ability to assign custom policies to different applets, persistently or per individual run of the applet I think more emphasis should be placed on this ability. Currently, the dialog also disables the Sandbox button (which then disables all ability to run the applet without granting it all permissions) when the checkbox is selected because >>> it was decided at the time that it doesn't make sense to say "I always trust this publisher, but I want to run the applet as if I don't really trust the publisher." I think this behaviour should be kept. So the only change being made is to default the checkbox to unchecked, so that the Sandboxing options are presented as available to begin with, increasing their visibility. >>> >>> This comes down to simply changing one value for the checkbox. Also bundled with this patch are making a utility method static, and removing two unused fields. >>> >>> ChangeLog: >>> * netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java (policyMenu, policyEditor): unused fields removed. >>> (getImageIcon): made static. (addButtons): default alwaysTrust checkbox to not selected. >>> >>> Thanks, >>> >> >> >> Hmm. The "always trust" is prechecked only when certificate is verified and trusted. Otherwise it is not selected by defaul. >> >> or am I missing something? >> >> J. > > Yes, that's what I'm talking about. I think it makes sense for it by default to never be selected. I think that verified (ONLY verified) certs should remain checked. But others my think differently (now we are 1:1 :) ) Sorry for blocking it. TBH i do not care :) And there are few applications which I actually really unselected although they are verified. So I scrumbled to stay 0.8:1 As for the code, - alwaysTrust.setSelected(alwaysTrustSelected); is alwaysTrustSelected now reused? I would suspect it to be abandoned... J. From helpcrypto at gmail.com Tue May 20 18:18:29 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Tue, 20 May 2014 20:18:29 +0200 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <537B9AF7.8000207@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> <537B9AF7.8000207@redhat.com> Message-ID: Really I don't care too much, but considering the certificate is already trusted, disabling the default-enabled checkbox causes users to have to click for each use (or clicking the checkbox). For our company, the less users have to think/do, the better. My two cents: leave it checked. My two cents (2): I really don't care :P On Tue, May 20, 2014 at 8:12 PM, Jiri Vanek wrote: > On 05/20/2014 07:31 PM, Andrew Azores wrote: > >> On 05/20/2014 12:28 PM, Jiri Vanek wrote: >> >>> On 05/20/2014 06:04 PM, Andrew Azores wrote: >>> >>>> Hi, >>>> >>>> I think the "Always Trust" checkbox that appears on the CertWarningPane >>>> for fully signed applets should not default to being checked anymore. I >>>> assume it is currently checked by default to encourage users to trust fully >>>> signed applets so that the dialogs do not continually appear - however, I >>>> don't think that's necessarily the right course of action now. Now that we >>>> have the ability to assign custom policies to different applets, >>>> persistently or per individual run of the applet I think more emphasis >>>> should be placed on this ability. Currently, the dialog also disables the >>>> Sandbox button (which then disables all ability to run the applet without >>>> granting it all permissions) when the checkbox is selected because >>>> it was decided at the time that it doesn't make sense to say "I always >>>> trust this publisher, but I want to run the applet as if I don't really >>>> trust the publisher." I think this behaviour should be kept. So the only >>>> change being made is to default the checkbox to unchecked, so that the >>>> Sandboxing options are presented as available to begin with, increasing >>>> their visibility. >>>> >>>> This comes down to simply changing one value for the checkbox. Also >>>> bundled with this patch are making a utility method static, and removing >>>> two unused fields. >>>> >>>> ChangeLog: >>>> * netx/net/sourceforge/jnlp/security/dialogs/CertWarningPane.java >>>> (policyMenu, policyEditor): unused fields removed. >>>> (getImageIcon): made static. (addButtons): default alwaysTrust >>>> checkbox to not selected. >>>> >>>> Thanks, >>>> >>>> >>> >>> Hmm. The "always trust" is prechecked only when certificate is verified >>> and trusted. Otherwise it is not selected by defaul. >>> >>> or am I missing something? >>> >>> J. >>> >> >> Yes, that's what I'm talking about. I think it makes sense for it by >> default to never be selected. >> > > I think that verified (ONLY verified) certs should remain checked. But > others my think differently (now we are 1:1 :) ) > > Sorry for blocking it. TBH i do not care :) And there are few applications > which I actually really unselected although they are verified. So I > scrumbled to stay 0.8:1 > > > As for the code, > - alwaysTrust.setSelected(alwaysTrustSelected); > > is alwaysTrustSelected now reused? I would suspect it to be abandoned... > > J. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Tue May 20 18:27:35 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 20 May 2014 18:27:35 +0000 Subject: [Bug 1780] New: Getting error while Compile and Execute Java Program. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1780 Bug ID: 1780 Summary: Getting error while Compile and Execute Java Program. Product: VisualVM Harness Version: 1.0 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement Priority: P5 Component: VisualVM Assignee: unassigned at icedtea.classpath.org Reporter: toukir_cse at yahoo.com I am facing following error while Compile and Execute Java Program. Error occurred during initialization of VM Cannot create VM thread. Out of system resources. -- You are receiving this mail because: You are the assignee for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From omajid at redhat.com Tue May 20 18:28:39 2014 From: omajid at redhat.com (Omair Majid) Date: Tue, 20 May 2014 14:28:39 -0400 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> <537B9AF7.8000207@redhat.com> Message-ID: <20140520182839.GF2672@redhat.com> * helpcrypto helpcrypto [2014-05-20 14:20]: > For our company, the less users have to think/do, the better. I think this is the right approach. If you prompt users all the time, even for things they have trusted before, they are likely to start accepting all prompts. It would be disasterous if they accidentally accepted a malicious signed applet. > My two cents: leave it checked. > My two cents (2): I really don't care :P Agreed. Lets make sensible decisions where we can, but allow users to override them. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From jkang at redhat.com Tue May 20 18:28:59 2014 From: jkang at redhat.com (Jie Kang) Date: Tue, 20 May 2014 14:28:59 -0400 (EDT) Subject: [rfc][icedtea-web]Localized Man Page Script In-Reply-To: <466629832.5401314.1400609299063.JavaMail.zimbra@redhat.com> Message-ID: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> Hello, I have created a bash script to build localized man pages. The man pages are based off a template and a key-value file that is used to replace the keys in the template with the appropriate localized text. At the moment it is run as localmanscript [lang] [command-name] (e.g. bash localmanscript.sh en policyeditor). I haven't added this as a task in the make file yet and have only completed the template/key for policyeditor. If anyone has a better idea on how to do this please let me know. 2014-05-20 Jie Kang * localmanscript.sh: Localized man page script * template_policyeditor: Template for policyeditor localized man page * en_key_policyeditor: Key-Value for english version of policyeditor man page Thanks, Jie -------------- next part -------------- A non-text attachment was scrubbed... Name: en_key_policyeditor Type: application/octet-stream Size: 2177 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: localmanscript.sh Type: application/x-shellscript Size: 623 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: template_policyeditor Type: application/octet-stream Size: 670 bytes Desc: not available URL: From ldracz at redhat.com Tue May 20 18:35:20 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Tue, 20 May 2014 14:35:20 -0400 (EDT) Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <537B72D8.4090607@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> <537B7025.2080106@redhat.com> <537B72D8.4090607@redhat.com> Message-ID: <851415161.5416911.1400610920583.JavaMail.zimbra@redhat.com> ----- Original Message ----- From: "Jiri Vanek" To: "Andrew Azores" , "Lukasz Dracz" Cc: distro-pkg-dev at openjdk.java.net Sent: Tuesday, May 20, 2014 11:20:56 AM Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring > Otherwise I think this is good to go. Please send a new version with fixed formatting and testSetSize. > > Thanks, > >And new changelog! > >Thanx for clean up! Good start!-) > >J. Hello, I changed the '10' to a constant in testIncrementTransferred(), changed my eclipse format settings to use 4 spaces for indentation and added the entry to the Changelog as suggested by Jiri. Thanks everyone for the help, Lukasz D -------------- next part -------------- A non-text attachment was scrubbed... Name: 2014-05-20-P-ResourceSetterGetters.patch Type: text/x-patch Size: 24074 bytes Desc: not available URL: From jkang at redhat.com Tue May 20 18:41:01 2014 From: jkang at redhat.com (Jie Kang) Date: Tue, 20 May 2014 14:41:01 -0400 (EDT) Subject: [rfc][icedtea-web]Localized Man Page Script In-Reply-To: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> References: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> Message-ID: <1530337932.5418716.1400611261222.JavaMail.zimbra@redhat.com> Hello, Sorry, I fixed tabs and spaces and included everything in one patch. Thanks, Jie -------------- next part -------------- A non-text attachment was scrubbed... Name: localmanscript.patch Type: text/x-patch Size: 4668 bytes Desc: not available URL: From aazores at redhat.com Tue May 20 18:46:10 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 14:46:10 -0400 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <20140520182839.GF2672@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> <537B9AF7.8000207@redhat.com> <20140520182839.GF2672@redhat.com> Message-ID: <537BA2F2.1090009@redhat.com> On 05/20/2014 02:28 PM, Omair Majid wrote: > * helpcrypto helpcrypto [2014-05-20 14:20]: >> For our company, the less users have to think/do, the better. > I think this is the right approach. If you prompt users all the time, > even for things they have trusted before, they are likely to start > accepting all prompts. It would be disasterous if they accidentally > accepted a malicious signed applet. We already prompt the users *a lot*, and we do it with defaulting to always trusting the applet in the future. Accepting a malicious applet is bad, *always* accepting it is worse... > >> My two cents: leave it checked. >> My two cents (2): I really don't care :P > Agreed. Lets make sensible decisions where we can, but allow users to > override them. > > Thanks, > Omair > IMO the more sensible choice is to not, by default, assume the user will "always trust" any applet at all. If they want to always trust an applet and not ever be asked about it again, I think that should be a decision they actively make, rather than be the default that occurs if they blindly click OK until the applet appears. Thanks, -- Andrew A From omajid at redhat.com Tue May 20 18:54:16 2014 From: omajid at redhat.com (Omair Majid) Date: Tue, 20 May 2014 14:54:16 -0400 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <537BA2F2.1090009@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> <537B9AF7.8000207@redhat.com> <20140520182839.GF2672@redhat.com> <537BA2F2.1090009@redhat.com> Message-ID: <20140520185416.GG2672@redhat.com> * Andrew Azores [2014-05-20 14:46]: > On 05/20/2014 02:28 PM, Omair Majid wrote: > >* helpcrypto helpcrypto [2014-05-20 14:20]: > >>For our company, the less users have to think/do, the better. > >I think this is the right approach. If you prompt users all the time, > >even for things they have trusted before, they are likely to start > >accepting all prompts. It would be disasterous if they accidentally > >accepted a malicious signed applet. > > We already prompt the users *a lot*, and we do it with defaulting to always > trusting the applet in the future. Accepting a malicious applet is bad, > *always* accepting it is worse... It's a bug if we check the "accept-by-default" box by default for an applet not signed by a trusted CA. > >>My two cents: leave it checked. > >>My two cents (2): I really don't care :P > >Agreed. Lets make sensible decisions where we can, but allow users to > >override them. > > > > IMO the more sensible choice is to not, by default, assume the user will > "always trust" any applet at all. If they want to always trust an applet and > not ever be asked about it again, I think that should be a decision they > actively make, rather than be the default that occurs if they blindly click > OK until the applet appears. I am not sure I understand what the new model would be. Wouldn't it be prompting more and then asking them to understand something make a decision (sandbox with appropriate policies vs run) that they are not knowledgeable about in general to make? Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From aazores at redhat.com Tue May 20 18:56:40 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 14:56:40 -0400 Subject: [rfc][icedtea-web]Localized Man Page Script In-Reply-To: <1530337932.5418716.1400611261222.JavaMail.zimbra@redhat.com> References: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> <1530337932.5418716.1400611261222.JavaMail.zimbra@redhat.com> Message-ID: <537BA568.6090607@redhat.com> On 05/20/2014 02:41 PM, Jie Kang wrote: > Hello, > > Sorry, I fixed tabs and spaces and included everything in one patch. > > Thanks, > Jie There's some weird formatting/indentation in the localmanscript.sh. Also, there are a few things that can be changed in it: (1) String comparisons. if [[ "$STR" == "some string" ]]; then works, but this would be better: if [ "$STR" = "some string" ]; then (1)b [[ "$STR" == "" ]] can be replaced by [ -z "$STR" ] (2) The debug "echo" statement should either be removed, or you can check for some debugging environment variable before printing perhaps (3) Add a license header to the file (see html-gen.sh) and maybe a comment as well explaining the two arguments to the script Try adding it to the Makefile as well, see if you can get it working. I think the general approach is fine - we're already doing something quite similar for html-gen.sh (kicking off a shell script job from the Makefile), and the approach of the script itself looks fine to me. Thanks, -- Andrew A From aazores at redhat.com Tue May 20 18:59:24 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 14:59:24 -0400 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <20140520185416.GG2672@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> <537B9AF7.8000207@redhat.com> <20140520182839.GF2672@redhat.com> <537BA2F2.1090009@redhat.com> <20140520185416.GG2672@redhat.com> Message-ID: <537BA60C.9010305@redhat.com> On 05/20/2014 02:54 PM, Omair Majid wrote: > * Andrew Azores [2014-05-20 14:46]: >> On 05/20/2014 02:28 PM, Omair Majid wrote: >>> * helpcrypto helpcrypto [2014-05-20 14:20]: >>>> For our company, the less users have to think/do, the better. >>> I think this is the right approach. If you prompt users all the time, >>> even for things they have trusted before, they are likely to start >>> accepting all prompts. It would be disasterous if they accidentally >>> accepted a malicious signed applet. >> We already prompt the users *a lot*, and we do it with defaulting to always >> trusting the applet in the future. Accepting a malicious applet is bad, >> *always* accepting it is worse... > It's a bug if we check the "accept-by-default" box by default for an > applet not signed by a trusted CA. I'm not saying the current behaviour is buggy, I'm just saying I don't know if I agree with the choice of defaulting it to always accepting for the user in the future. > >>>> My two cents: leave it checked. >>>> My two cents (2): I really don't care :P >>> Agreed. Lets make sensible decisions where we can, but allow users to >>> override them. >>> >> IMO the more sensible choice is to not, by default, assume the user will >> "always trust" any applet at all. If they want to always trust an applet and >> not ever be asked about it again, I think that should be a decision they >> actively make, rather than be the default that occurs if they blindly click >> OK until the applet appears. > I am not sure I understand what the new model would be. Wouldn't it be > prompting more and then asking them to understand something make a > decision (sandbox with appropriate policies vs run) that they are not > knowledgeable about in general to make? > > Thanks, > Omair > I think the "Run" button is obvious enough for users who are not informed about the Sandboxing options that they can simply choose Run and not worry about it. The new model is the same as the old model except without assuming that an applet being signed by a "Trusted CA" is really enough to decide that the user really does trust the applet to always run on their machine with full unrestricted access. Thanks, -- Andrew A From aazores at redhat.com Tue May 20 19:51:56 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 15:51:56 -0400 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <851415161.5416911.1400610920583.JavaMail.zimbra@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> <537B7025.2080106@redhat.com> <537B72D8.4090607@redhat.com> <851415161.5416911.1400610920583.JavaMail.zimbra@redhat.com> Message-ID: <537BB25C.4050106@redhat.com> On 05/20/2014 02:35 PM, Lukasz Dracz wrote: > > ----- Original Message ----- > From: "Jiri Vanek" > To: "Andrew Azores" , "Lukasz Dracz" > Cc: distro-pkg-dev at openjdk.java.net > Sent: Tuesday, May 20, 2014 11:20:56 AM > Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring > > >> Otherwise I think this is good to go. Please send a new version with fixed formatting and testSetSize. >> >> Thanks, >> >> And new changelog! >> >> Thanx for clean up! Good start!-) >> >> J. > Hello, > > I changed the '10' to a constant in testIncrementTransferred(), changed my eclipse format settings to use 4 spaces for indentation and added the entry to the Changelog as suggested by Jiri. > > Thanks everyone for the help, > Lukasz D > Hi, + public void setDownloadVersion(Version dVersion) { + downloadVersion = dVersion; + } This kind of thing was fixed for setTransferred, so I'd like to see it fixed here as well, and for setSize, and any others I may have missed. The comment on getTracker is also kind of questionable. I don't know if the @return is adding anything helpful here, and in any case, it's worded a bit awkwardly. Finally, where you have "resource.incrementTransferred(downloadLocationFile.length())", are you sure that this replacement is equivalent to the original line, which directly set the "transferred" field to this value rather than incrementing it? ie are you sure that at this point, "transferred" will always be 0? Perhaps a comment here stating this would be useful, so that it's clear that this is really a "set transferred" even though it appears to be an increment. Thanks, -- Andrew A From jkang at redhat.com Tue May 20 19:52:24 2014 From: jkang at redhat.com (Jie Kang) Date: Tue, 20 May 2014 15:52:24 -0400 (EDT) Subject: [rfc][icedtea-web]Localized Man Page Script In-Reply-To: <537BA568.6090607@redhat.com> References: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> <1530337932.5418716.1400611261222.JavaMail.zimbra@redhat.com> <537BA568.6090607@redhat.com> Message-ID: <887325711.5450945.1400615544040.JavaMail.zimbra@redhat.com> Hello, I've made all the suggested fixes and am working on the makefile at the moment. Thanks, ----- Original Message ----- From: "Andrew Azores" To: "Jie Kang" , distro-pkg-dev at openjdk.java.net Sent: Tuesday, May 20, 2014 2:56:40 PM Subject: Re: [rfc][icedtea-web]Localized Man Page Script On 05/20/2014 02:41 PM, Jie Kang wrote: > Hello, > > Sorry, I fixed tabs and spaces and included everything in one patch. > > Thanks, > Jie There's some weird formatting/indentation in the localmanscript.sh. Also, there are a few things that can be changed in it: (1) String comparisons. if [[ "$STR" == "some string" ]]; then works, but this would be better: if [ "$STR" = "some string" ]; then (1)b [[ "$STR" == "" ]] can be replaced by [ -z "$STR" ] (2) The debug "echo" statement should either be removed, or you can check for some debugging environment variable before printing perhaps (3) Add a license header to the file (see html-gen.sh) and maybe a comment as well explaining the two arguments to the script Try adding it to the Makefile as well, see if you can get it working. I think the general approach is fine - we're already doing something quite similar for html-gen.sh (kicking off a shell script job from the Makefile), and the approach of the script itself looks fine to me. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: localmanscript.patch Type: text/x-patch Size: 6765 bytes Desc: not available URL: From aazores at redhat.com Tue May 20 19:53:52 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 15:53:52 -0400 Subject: [rfc][icedtea-web]Localized Man Page Script In-Reply-To: <887325711.5450945.1400615544040.JavaMail.zimbra@redhat.com> References: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> <1530337932.5418716.1400611261222.JavaMail.zimbra@redhat.com> <537BA568.6090607@redhat.com> <887325711.5450945.1400615544040.JavaMail.zimbra@redhat.com> Message-ID: <537BB2D0.9090007@redhat.com> On 05/20/2014 03:52 PM, Jie Kang wrote: > Hello, > > I've made all the suggested fixes and am working on the makefile at the moment. > > Thanks, > > Looks good to me. Please post the new patch when you have your script integrated and tested working in the Makefile. Thanks, -- Andrew A From ldracz at redhat.com Tue May 20 19:56:50 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Tue, 20 May 2014 15:56:50 -0400 (EDT) Subject: [rfc][icedtea-web] Policy Editor PR 1776 Bug Fix In-Reply-To: <1026424965.5450802.1400615499303.JavaMail.zimbra@redhat.com> Message-ID: <885356867.5453813.1400615810811.JavaMail.zimbra@redhat.com> Hello, Fixed the bug PR 1776 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1776 for Policy Editor by adding a check for map being null. Found a bug where adding a codebase, then removing it, and adding it again would not be added. Andrew Azores fixed it by removing Custom Permissions Map from the codebase when removeCodebase is called. Thank you, Lukasz Dracz 2014-05-20 Lukasz Dracz * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: Bug fixes, Added a check for map being null -------------- next part -------------- A non-text attachment was scrubbed... Name: 2014-05-20-PR-1776-Bug-Fix.patch Type: text/x-patch Size: 1367 bytes Desc: not available URL: From aazores at redhat.com Tue May 20 20:13:49 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 16:13:49 -0400 Subject: [rfc][icedtea-web] Policy Editor PR 1776 Bug Fix In-Reply-To: <885356867.5453813.1400615810811.JavaMail.zimbra@redhat.com> References: <885356867.5453813.1400615810811.JavaMail.zimbra@redhat.com> Message-ID: <537BB77D.5000300@redhat.com> On 05/20/2014 03:56 PM, Lukasz Dracz wrote: > Hello, > > Fixed the bug PR 1776 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1776 for Policy Editor by adding a check for map being null. > Found a bug where adding a codebase, then removing it, and adding it again would not be added. Andrew Azores fixed it by removing Custom Permissions Map from the codebase when removeCodebase is called. > > Thank you, > Lukasz Dracz > > 2014-05-20 Lukasz Dracz > > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: > Bug fixes, Added a check for map being null The patch doesn't appear to actually fix PR1776, or perhaps it fixes the original stack trace, but there's still an exception that appears. Anyway, it's a good check to add, because null definitely can be passed in to setState if updateCheckboxesImpl is called with a String codebase argument that does not correspond to any existing codebases. Please give a more descriptive ChangeLog though. "Bug fixes" doesn't help much :) Thanks, -- Andrew A From ldracz at redhat.com Tue May 20 20:35:09 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Tue, 20 May 2014 16:35:09 -0400 (EDT) Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <537BB25C.4050106@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> <537B7025.2080106@redhat.com> <537B72D8.4090607@redhat.com> <851415161.5416911.1400610920583.JavaMail.zimbra@redhat.com> <537BB25C.4050106@redhat.com> Message-ID: <1537506061.5468318.1400618109762.JavaMail.zimbra@redhat.com> ----- Original Message ----- From: "Andrew Azores" To: "Lukasz Dracz" , "Jiri Vanek" Cc: distro-pkg-dev at openjdk.java.net Sent: Tuesday, May 20, 2014 3:51:56 PM Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring On 05/20/2014 02:35 PM, Lukasz Dracz wrote: > > ----- Original Message ----- > From: "Jiri Vanek" > To: "Andrew Azores" , "Lukasz Dracz" > Cc: distro-pkg-dev at openjdk.java.net > Sent: Tuesday, May 20, 2014 11:20:56 AM > Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring > > >> Otherwise I think this is good to go. Please send a new version with fixed formatting and testSetSize. >> >> Thanks, >> >> And new changelog! >> >> Thanx for clean up! Good start!-) >> >> J. > Hello, > > I changed the '10' to a constant in testIncrementTransferred(), changed my eclipse format settings to use 4 spaces for indentation and added the entry to the Changelog as suggested by Jiri. > > Thanks everyone for the help, > Lukasz D > > >Hi, > >+ public void setDownloadVersion(Version dVersion) { >+ downloadVersion = dVersion; >+ } > > >This kind of thing was fixed for setTransferred, so I'd like to see it >fixed here as well, and for setSize, and any others I may have missed. > >The comment on getTracker is also kind of questionable. I don't know if >the @return is adding anything helpful here, and in any case, it's >worded a bit awkwardly. > >Finally, where you have >"resource.incrementTransferred(downloadLocationFile.length())", are you >sure that this replacement is equivalent to the original line, which >directly set the "transferred" field to this value rather than >incrementing it? ie are you sure that at this point, "transferred" will >always be 0? Perhaps a comment here stating this would be useful, so >that it's clear that this is really a "set transferred" even though it >appears to be an increment. > >Thanks, > >-- >Andrew A Hello, Thank you for your suggestions I have applied them. As for the incrementTransferred I have changed it to setTransferred to ensure it works as previously defined for sure. Thanks, Lukasz Dracz -------------- next part -------------- A non-text attachment was scrubbed... Name: 2014-05-20-P2-ResourceSetterGetter.patch Type: text/x-patch Size: 24023 bytes Desc: not available URL: From aazores at redhat.com Tue May 20 20:42:36 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 16:42:36 -0400 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <1537506061.5468318.1400618109762.JavaMail.zimbra@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> <537B7025.2080106@redhat.com> <537B72D8.4090607@redhat.com> <851415161.5416911.1400610920583.JavaMail.zimbra@redhat.com> <537BB25C.4050106@redhat.com> <1537506061.5468318.1400618109762.JavaMail.zimbra@redhat.com> Message-ID: <537BBE3C.40507@redhat.com> On 05/20/2014 04:35 PM, Lukasz Dracz wrote: > > ----- Original Message ----- > From: "Andrew Azores" > To: "Lukasz Dracz" , "Jiri Vanek" > Cc: distro-pkg-dev at openjdk.java.net > Sent: Tuesday, May 20, 2014 3:51:56 PM > Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring > > On 05/20/2014 02:35 PM, Lukasz Dracz wrote: >> ----- Original Message ----- >> From: "Jiri Vanek" >> To: "Andrew Azores" , "Lukasz Dracz" >> Cc: distro-pkg-dev at openjdk.java.net >> Sent: Tuesday, May 20, 2014 11:20:56 AM >> Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring >> >> >>> Otherwise I think this is good to go. Please send a new version with fixed formatting and testSetSize. >>> >>> Thanks, >>> >>> And new changelog! >>> >>> Thanx for clean up! Good start!-) >>> >>> J. >> Hello, >> >> I changed the '10' to a constant in testIncrementTransferred(), changed my eclipse format settings to use 4 spaces for indentation and added the entry to the Changelog as suggested by Jiri. >> >> Thanks everyone for the help, >> Lukasz D >> >> >> Hi, >> >> + public void setDownloadVersion(Version dVersion) { >> + downloadVersion = dVersion; >> + } >> >> >> This kind of thing was fixed for setTransferred, so I'd like to see it >> fixed here as well, and for setSize, and any others I may have missed. >> >> The comment on getTracker is also kind of questionable. I don't know if >> the @return is adding anything helpful here, and in any case, it's >> worded a bit awkwardly. >> >> Finally, where you have >> "resource.incrementTransferred(downloadLocationFile.length())", are you >> sure that this replacement is equivalent to the original line, which >> directly set the "transferred" field to this value rather than >> incrementing it? ie are you sure that at this point, "transferred" will >> always be 0? Perhaps a comment here stating this would be useful, so >> that it's clear that this is really a "set transferred" even though it >> appears to be an increment. >> >> Thanks, >> >> -- >> Andrew A > Hello, > > Thank you for your suggestions I have applied them. As for the incrementTransferred I have changed it to setTransferred to ensure it works as previously defined for sure. > > Thanks, > Lukasz Dracz Looks okay to go to me. Thanks, -- Andrew A From aazores at redhat.com Tue May 20 20:48:32 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 20 May 2014 16:48:32 -0400 Subject: [rfc][icetea-web] Resource Setter/Getter Refactoring In-Reply-To: <537BBE3C.40507@redhat.com> References: <1839364216.4277498.1400271817017.JavaMail.zimbra@redhat.com> <53768307.8050204@redhat.com> <1761955217.5311710.1400597658465.JavaMail.zimbra@redhat.com> <537B7025.2080106@redhat.com> <537B72D8.4090607@redhat.com> <851415161.5416911.1400610920583.JavaMail.zimbra@redhat.com> <537BB25C.4050106@redhat.com> <1537506061.5468318.1400618109762.JavaMail.zimbra@redhat.com> <537BBE3C.40507@redhat.com> Message-ID: <537BBFA0.8060000@redhat.com> On 05/20/2014 04:42 PM, Andrew Azores wrote: > On 05/20/2014 04:35 PM, Lukasz Dracz wrote: >> >> ----- Original Message ----- >> From: "Andrew Azores" >> To: "Lukasz Dracz" , "Jiri Vanek" >> Cc: distro-pkg-dev at openjdk.java.net >> Sent: Tuesday, May 20, 2014 3:51:56 PM >> Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring >> >> On 05/20/2014 02:35 PM, Lukasz Dracz wrote: >>> ----- Original Message ----- >>> From: "Jiri Vanek" >>> To: "Andrew Azores" , "Lukasz Dracz" >>> >>> Cc: distro-pkg-dev at openjdk.java.net >>> Sent: Tuesday, May 20, 2014 11:20:56 AM >>> Subject: Re: [rfc][icetea-web] Resource Setter/Getter Refactoring >>> >>> >>>> Otherwise I think this is good to go. Please send a new version >>>> with fixed formatting and testSetSize. >>>> >>>> Thanks, >>>> >>>> And new changelog! >>>> >>>> Thanx for clean up! Good start!-) >>>> >>>> J. >>> Hello, >>> >>> I changed the '10' to a constant in testIncrementTransferred(), >>> changed my eclipse format settings to use 4 spaces for indentation >>> and added the entry to the Changelog as suggested by Jiri. >>> >>> Thanks everyone for the help, >>> Lukasz D >>> >>> >>> Hi, >>> >>> + public void setDownloadVersion(Version dVersion) { >>> + downloadVersion = dVersion; >>> + } >>> >>> >>> This kind of thing was fixed for setTransferred, so I'd like to see it >>> fixed here as well, and for setSize, and any others I may have missed. >>> >>> The comment on getTracker is also kind of questionable. I don't know if >>> the @return is adding anything helpful here, and in any case, it's >>> worded a bit awkwardly. >>> >>> Finally, where you have >>> "resource.incrementTransferred(downloadLocationFile.length())", are you >>> sure that this replacement is equivalent to the original line, which >>> directly set the "transferred" field to this value rather than >>> incrementing it? ie are you sure that at this point, "transferred" will >>> always be 0? Perhaps a comment here stating this would be useful, so >>> that it's clear that this is really a "set transferred" even though it >>> appears to be an increment. >>> >>> Thanks, >>> >>> -- >>> Andrew A >> Hello, >> >> Thank you for your suggestions I have applied them. As for the >> incrementTransferred I have changed it to setTransferred to ensure it >> works as previously defined for sure. >> >> Thanks, >> Lukasz Dracz > > Looks okay to go to me. > > Thanks, > Actually one note, sorry - your in-patch ChangeLog isn't formatted properly, everything is indented too much. I will fix this myself before committing though. Thanks, -- Andrew A From ldracz at redhat.com Tue May 20 20:56:50 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Tue, 20 May 2014 16:56:50 -0400 (EDT) Subject: [rfc][icedtea-web] Policy Editor PR 1776 Bug Fix In-Reply-To: <537BB77D.5000300@redhat.com> References: <885356867.5453813.1400615810811.JavaMail.zimbra@redhat.com> <537BB77D.5000300@redhat.com> Message-ID: <1950669961.5475616.1400619410219.JavaMail.zimbra@redhat.com> ----- Original Message ----- From: "Andrew Azores" To: "Lukasz Dracz" , distro-pkg-dev at openjdk.java.net Sent: Tuesday, May 20, 2014 4:13:49 PM Subject: Re: [rfc][icedtea-web] Policy Editor PR 1776 Bug Fix On 05/20/2014 03:56 PM, Lukasz Dracz wrote: > Hello, > > Fixed the bug PR 1776 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1776 for Policy Editor by adding a check for map being null. > Found a bug where adding a codebase, then removing it, and adding it again would not be added. Andrew Azores fixed it by removing Custom Permissions Map from the codebase when removeCodebase is called. > > Thank you, > Lukasz Dracz > > 2014-05-20 Lukasz Dracz > > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java: > Bug fixes, Added a check for map being null > >The patch doesn't appear to actually fix PR1776, or perhaps it fixes the >original stack trace, but there's still an exception that appears. >Anyway, it's a good check to add, because null definitely can be passed >in to setState if updateCheckboxesImpl is called with a String codebase >argument that does not correspond to any existing codebases. > >Please give a more descriptive ChangeLog though. "Bug fixes" doesn't >help much :) > >Thanks, > >-- >Andrew A Hello, I updated the changelog to be more descriptive and credited Andrew Azores in the patch which I forgot to do originally. Sorry. I will look into fully fixing the bug. Thank you, Lukasz Dracz -------------- next part -------------- A non-text attachment was scrubbed... Name: 2014-05-20-P2-PR-1776-Bug-Fix.patch Type: text/x-patch Size: 1485 bytes Desc: not available URL: From aazores at icedtea.classpath.org Tue May 20 21:09:27 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Tue, 20 May 2014 21:09:27 +0000 Subject: /hg/icedtea-web: Resource refactor for setters and getters Message-ID: changeset 8151448ecea2 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=8151448ecea2 author: Andrew Azores date: Tue May 20 16:52:21 2014 -0400 Resource refactor for setters and getters 2014-05-20 Lukasz Dracz Jie Kang * netx/net/sourceforge/jnlp/cache/Resource.java: (location, localFile, requestVersion, downloadVersion, transferred, size, status) made fields private and added setters and getters, and all calling sites refactored * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Calling sites refactored * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: Calling sites refactored * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: (testGetLocation, testGetRequestVersion, testGetDownloadVersion, testTransferredIsZero, testIncrementTransferred, testSizeIsNegativeOne, testSetSize, testStatusIsCopied) added tests diffstat: ChangeLog | 16 + netx/net/sourceforge/jnlp/cache/Resource.java | 107 +++++++++- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 73 +++--- netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java | 8 +- tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java | 85 ++++++++- 5 files changed, 234 insertions(+), 55 deletions(-) diffs (truncated from 575 to 500 lines): diff -r 22761e42d5b3 -r 8151448ecea2 ChangeLog --- a/ChangeLog Wed May 14 15:44:19 2014 -0400 +++ b/ChangeLog Tue May 20 16:52:21 2014 -0400 @@ -1,3 +1,19 @@ +2014-05-20 Lukasz Dracz + Jie Kang + + * netx/net/sourceforge/jnlp/cache/Resource.java: + (location, localFile, requestVersion, downloadVersion, + transferred, size, status) made fields private and added + setters and getters, and all calling sites refactored + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: + Calling sites refactored + * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: + Calling sites refactored + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: + (testGetLocation, testGetRequestVersion, testGetDownloadVersion, + testTransferredIsZero, testIncrementTransferred, testSizeIsNegativeOne, + testSetSize, testStatusIsCopied) added tests + 2014-05-14 Andrew Azores * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: diff -r 22761e42d5b3 -r 8151448ecea2 netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Wed May 14 15:44:19 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Tue May 20 16:52:21 2014 -0400 @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.EnumSet; import java.util.List; +import java.util.Set; import net.sourceforge.jnlp.Version; import net.sourceforge.jnlp.util.WeakList; @@ -62,7 +63,6 @@ STARTED // enqueued or being worked on } - /** list of weak references of resources currently in use */ private static final WeakList resources = new WeakList<>(); @@ -70,31 +70,31 @@ private final WeakList trackers = new WeakList<>(); /** the remote location of the resource */ - final URL location; + private final URL location; /** the location to use when downloading */ private URL downloadLocation; /** the local file downloaded to */ - File localFile; + private File localFile; /** the requested version */ - final Version requestVersion; + private final Version requestVersion; /** the version downloaded from server */ - Version downloadVersion; + private Version downloadVersion; /** amount in bytes transferred */ - volatile long transferred = 0; + private volatile long transferred = 0; /** total size of the resource, or -1 if unknown */ - volatile long size = -1; + private volatile long size = -1; /** the status of the resource */ - final EnumSet status = EnumSet.noneOf(Status.class); - + private final EnumSet status = EnumSet.noneOf(Status.class); + /** Update policy for this resource */ - final UpdatePolicy updatePolicy; + private final UpdatePolicy updatePolicy; /** * Create a resource. @@ -152,8 +152,8 @@ * Set the url to use for downloading the resource * @param location */ - public void setDownloadLocation(URL location) { - downloadLocation = location; + public void setDownloadLocation(URL downloadLocation) { + this.downloadLocation = downloadLocation; } /** @@ -170,6 +170,85 @@ return null; } } + + /** + * Returns the local file currently being downloaded + */ + public File getLocalFile() { + return localFile; + } + + /** + * Sets the local file to be downloaded + */ + public void setLocalFile(File localFile) { + this.localFile = localFile; + } + + /** + * Returns the requested version + */ + public Version getRequestVersion() { + return requestVersion; + } + + /** + * Returns the version downloaded from server + */ + public Version getDownloadVersion() { + return downloadVersion; + } + + /** + * Sets the version downloaded from server + */ + public void setDownloadVersion(Version downloadVersion) { + this.downloadVersion = downloadVersion; + } + + /** + * Returns the amount in bytes transferred + */ + public long getTransferred() { + return transferred; + } + + /** + * Sets the amount transferred + */ + public void setTransferred(long transferred) { + this.transferred = transferred; + } + + /** + * Increments the amount transferred (in bytes) + */ + public void incrementTransferred(long incTrans) { + transferred += incTrans; + } + + /** + * Returns the size of the resource + * @return size of resource (-1 if unknown) + */ + public long getSize() { + return size; + } + + /** + * Sets the size of the resource + */ + public void setSize(long size) { + this.size = size; + } + + /** + * Returns the status of the resource + */ + public Set getCopyOfStatus() { + return EnumSet.copyOf(status); + + } /** * Check if the specified flag is set. @@ -195,8 +274,6 @@ /** * Returns the update policy for this resource - * - * @return The update policy */ public UpdatePolicy getUpdatePolicy() { return this.updatePolicy; @@ -355,5 +432,7 @@ public String toString() { return "location=" + location.toString() + " state=" + getStatusString(); } + + } diff -r 22761e42d5b3 -r 8151448ecea2 netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed May 14 15:44:19 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue May 20 16:52:21 2014 -0400 @@ -239,7 +239,7 @@ * @return whether the resource are already downloaded */ private boolean checkCache(Resource resource, UpdatePolicy updatePolicy) { - if (!CacheUtil.isCacheable(resource.location, resource.downloadVersion)) { + if (!CacheUtil.isCacheable(resource.getLocation(), resource.getDownloadVersion())) { // pretend that they are already downloaded; essentially // they will just 'pass through' the tracker as if they were // never added (for example, not affecting the total download size). @@ -251,15 +251,15 @@ } if (updatePolicy != UpdatePolicy.ALWAYS && updatePolicy != UpdatePolicy.FORCE) { // save loading entry props file - CacheEntry entry = new CacheEntry(resource.location, resource.downloadVersion); + CacheEntry entry = new CacheEntry(resource.getLocation(), resource.getDownloadVersion()); if (entry.isCached() && !updatePolicy.shouldUpdate(entry)) { - OutputController.getLogger().log("not updating: " + resource.location); + OutputController.getLogger().log("not updating: " + resource.getLocation()); synchronized (resource) { - resource.localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); - resource.size = resource.localFile.length(); - resource.transferred = resource.localFile.length(); + resource.setLocalFile(CacheUtil.getCacheFile(resource.getLocation(), resource.getDownloadVersion())); + resource.setSize(resource.getLocalFile().length()); + resource.setTransferred(resource.getLocalFile().length()); resource.changeStatus(EnumSet.noneOf(Resource.Status.class), EnumSet.of(DOWNLOADED, CONNECTED, STARTED)); } fireDownloadEvent(resource); @@ -317,7 +317,7 @@ Collection status; synchronized (resource) { - status = resource.status; + status = resource.getCopyOfStatus(); } DownloadEvent event = new DownloadEvent(this, resource); @@ -381,8 +381,8 @@ if (resource.isSet(ERROR)) return null; - if (resource.localFile != null) - return resource.localFile; + if (resource.getLocalFile() != null) + return resource.getLocalFile(); if (location.getProtocol().equalsIgnoreCase("file")) { File file = UrlUtils.decodeUrlAsFile(location); @@ -416,10 +416,10 @@ if (!(resource.isSet(DOWNLOADED) || resource.isSet(ERROR))) waitForResource(location, 0); - if (resource.localFile != null) - return new FileInputStream(resource.localFile); + if (resource.getLocalFile() != null) + return new FileInputStream(resource.getLocalFile()); - return resource.location.openStream(); + return resource.getLocation().openStream(); } catch (InterruptedException ex) { throw new IOException("wait was interrupted"); } @@ -474,7 +474,7 @@ public long getAmountRead(URL location) { // not atomic b/c transferred is a long, but so what (each // byte atomic? so probably won't affect anything...) - return getResource(location).transferred; + return getResource(location).getTransferred(); } /** @@ -544,7 +544,7 @@ * @throws IllegalResourceDescriptorException if the resource is not being tracked */ public long getTotalSize(URL location) { - return getResource(location).size; // atomic + return getResource(location).getSize(); // atomic } /** @@ -642,7 +642,7 @@ private void downloadResource(Resource resource) { resource.fireDownloadEvent(); // fire DOWNLOADING URLConnection con = null; - CacheEntry origEntry = new CacheEntry(resource.location, resource.downloadVersion); // This is where the jar file will be. + CacheEntry origEntry = new CacheEntry(resource.getLocation(), resource.getDownloadVersion()); // This is where the jar file will be. origEntry.lock(); try { @@ -658,11 +658,11 @@ * foo.jar, the server might send us foo.jar.pack.gz or foo.jar.gz * instead. So we save the file with the appropriate extension */ - URL downloadLocation = resource.location; + URL downloadLocation = resource.getLocation(); String contentEncoding = con.getContentEncoding(); - OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Downloading" + resource.location + " using " + + OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "Downloading" + resource.getLocation() + " using " + realLocation + " (encoding : " + contentEncoding + ")"); boolean packgz = "pack200-gzip".equals(contentEncoding) || @@ -679,9 +679,10 @@ downloadLocation = new URL(downloadLocation.toString() + ".gz"); } - File downloadLocationFile = CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion); - CacheEntry downloadEntry = new CacheEntry(downloadLocation, resource.downloadVersion); - File finalFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); // This is where extracted version will be, or downloaded file if not compressed. + File downloadLocationFile = CacheUtil.getCacheFile(downloadLocation, resource.getDownloadVersion()); + CacheEntry downloadEntry = new CacheEntry(downloadLocation, resource.getDownloadVersion()); + // This is where extracted version will be, or downloaded file if not compressed. + File finalFile = CacheUtil.getCacheFile(resource.getLocation(), resource.getDownloadVersion()); if (!downloadEntry.isCurrent(con.getLastModified())) { // Make sure we don't re-download the file. however it will wait as if it was downloading. @@ -693,10 +694,10 @@ long lastModified = con.getLastModified(); InputStream in = new BufferedInputStream(con.getInputStream()); - OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.downloadVersion); + OutputStream out = CacheUtil.getOutputStream(downloadLocation, resource.getDownloadVersion()); while (-1 != (rlen = in.read(buf))) { - resource.transferred += rlen; + resource.incrementTransferred(rlen); out.write(buf, 0, rlen); } @@ -718,11 +719,11 @@ */ if (packgz) { GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil - .getCacheFile(downloadLocation, resource.downloadVersion))); + .getCacheFile(downloadLocation, resource.getDownloadVersion()))); InputStream inputStream = new BufferedInputStream(gzInputStream); JarOutputStream outputStream = new JarOutputStream(new FileOutputStream(CacheUtil - .getCacheFile(resource.location, resource.downloadVersion))); + .getCacheFile(resource.getLocation(), resource.getDownloadVersion()))); Unpacker unpacker = Pack200.newUnpacker(); unpacker.unpack(inputStream, outputStream); @@ -732,11 +733,11 @@ gzInputStream.close(); } else if (gzip) { GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil - .getCacheFile(downloadLocation, resource.downloadVersion))); + .getCacheFile(downloadLocation, resource.getDownloadVersion()))); InputStream inputStream = new BufferedInputStream(gzInputStream); BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(CacheUtil - .getCacheFile(resource.location, resource.downloadVersion))); + .getCacheFile(resource.getLocation(), resource.getDownloadVersion()))); while (-1 != (rlen = inputStream.read(buf))) { outputStream.write(buf, 0, rlen); @@ -747,7 +748,7 @@ gzInputStream.close(); } } else { - resource.transferred = downloadLocationFile.length(); + resource.setTransferred(downloadLocationFile.length()); } if (!downloadLocationFile.getPath().equals(finalFile.getPath())) { @@ -787,17 +788,17 @@ private void initializeResource(Resource resource) { resource.fireDownloadEvent(); // fire CONNECTING - CacheEntry entry = new CacheEntry(resource.location, resource.requestVersion); + CacheEntry entry = new CacheEntry(resource.getLocation(), resource.getRequestVersion()); entry.lock(); try { - File localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); + File localFile = CacheUtil.getCacheFile(resource.getLocation(), resource.getDownloadVersion()); // connect URL finalLocation = findBestUrl(resource); if (finalLocation == null) { - OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Attempted to download " + resource.location + ", but failed to connect!"); + OutputController.getLogger().log(OutputController.Level.ERROR_ALL, "Attempted to download " + resource.getLocation() + ", but failed to connect!"); throw new NullPointerException("finalLocation == null"); // Caught below } @@ -806,14 +807,14 @@ connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); int size = connection.getContentLength(); - boolean current = CacheUtil.isCurrent(resource.location, resource.requestVersion, connection.getLastModified()) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; + boolean current = CacheUtil.isCurrent(resource.getLocation(), resource.getRequestVersion(), connection.getLastModified()) && resource.getUpdatePolicy() != UpdatePolicy.FORCE; if (!current) { if (entry.isCached()) { entry.markForDelete(); entry.store(); // Old entry will still exist. (but removed at cleanup) - localFile = CacheUtil.makeNewCacheFile(resource.location, resource.downloadVersion); - CacheEntry newEntry = new CacheEntry(resource.location, resource.requestVersion); + localFile = CacheUtil.makeNewCacheFile(resource.getLocation(), resource.getDownloadVersion()); + CacheEntry newEntry = new CacheEntry(resource.getLocation(), resource.getRequestVersion()); newEntry.lock(); entry.unlock(); entry = newEntry; @@ -821,9 +822,9 @@ } synchronized (resource) { - resource.localFile = localFile; + resource.setLocalFile(localFile); // resource.connection = connection; - resource.size = size; + resource.setSize(size); resource.changeStatus(EnumSet.of(CONNECT, CONNECTING), EnumSet.of(CONNECTED)); // check if up-to-date; if so set as downloaded @@ -1170,7 +1171,7 @@ private Resource getResource(URL location) { synchronized (resources) { for (Resource resource : resources) { - if (CacheUtil.urlEquals(resource.location, location)) + if (CacheUtil.urlEquals(resource.getLocation(), location)) return resource; } } diff -r 22761e42d5b3 -r 8151448ecea2 netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java --- a/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Wed May 14 15:44:19 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Tue May 20 16:52:21 2014 -0400 @@ -120,7 +120,7 @@ return resource.getLocation(); } String filename = location.substring(lastSlash + 1); - if (useVersion && resource.requestVersion != null) { + if (useVersion && resource.getRequestVersion() != null) { // With 'useVersion', j2-commons-cli.jar becomes, for example, j2-commons-cli__V1.0.jar String parts[] = filename.split("\\.", -1 /* Keep blank strings*/); @@ -129,7 +129,7 @@ sb.append(parts[i]); // Append __V before last '.' if (i == parts.length -2) { - sb.append("__V" + resource.requestVersion); + sb.append("__V" + resource.getRequestVersion()); } sb.append('.'); } @@ -172,13 +172,13 @@ if (!query.isEmpty()) { query = "?" + query; } - if (resource.requestVersion != null && resource.requestVersion.isVersionId()) { + if (resource.getRequestVersion() != null && resource.getRequestVersion().isVersionId()) { if (!query.isEmpty()) { query += "&"; } else { query = "?" + query; } - query += "version-id=" + resource.requestVersion; + query += "version-id=" + resource.getRequestVersion(); } try { URL url = new URL(protocol + userInfo + host + port + path + query); diff -r 22761e42d5b3 -r 8151448ecea2 tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java --- a/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java Wed May 14 15:44:19 2014 -0400 +++ b/tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java Tue May 20 16:52:21 2014 -0400 @@ -37,14 +37,23 @@ package net.sourceforge.jnlp.cache; -import static net.sourceforge.jnlp.cache.Resource.Status.*; +import static net.sourceforge.jnlp.cache.Resource.Status.CONNECT; +import static net.sourceforge.jnlp.cache.Resource.Status.CONNECTED; +import static net.sourceforge.jnlp.cache.Resource.Status.CONNECTING; +import static net.sourceforge.jnlp.cache.Resource.Status.DOWNLOAD; +import static net.sourceforge.jnlp.cache.Resource.Status.DOWNLOADED; +import static net.sourceforge.jnlp.cache.Resource.Status.DOWNLOADING; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertTrue; + import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; import java.util.EnumSet; +import java.util.Set; import net.sourceforge.jnlp.Version; @@ -52,6 +61,80 @@ public class ResourceTest { + public static final long INCREMENT_TRANSFERRED_CONSTANT = 10; + From jvanek at redhat.com Wed May 21 06:45:11 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 21 May 2014 08:45:11 +0200 Subject: [rfc][icedtea-web] "Always trust content from this publisher" defaulting to checked In-Reply-To: <537BA60C.9010305@redhat.com> References: <537B7D12.1000907@redhat.com> <537B829D.1030201@redhat.com> <537B915F.4000901@redhat.com> <537B9AF7.8000207@redhat.com> <20140520182839.GF2672@redhat.com> <537BA2F2.1090009@redhat.com> <20140520185416.GG2672@redhat.com> <537BA60C.9010305@redhat.com> Message-ID: <537C4B77.4070504@redhat.com> On 05/20/2014 08:59 PM, Andrew Azores wrote: > On 05/20/2014 02:54 PM, Omair Majid wrote: >> * Andrew Azores [2014-05-20 14:46]: >>> On 05/20/2014 02:28 PM, Omair Majid wrote: >>>> * helpcrypto helpcrypto [2014-05-20 14:20]: >>>>> For our company, the less users have to think/do, the better. >>>> I think this is the right approach. If you prompt users all the time, >>>> even for things they have trusted before, they are likely to start >>>> accepting all prompts. It would be disasterous if they accidentally >>>> accepted a malicious signed applet. >>> We already prompt the users *a lot*, and we do it with defaulting to always >>> trusting the applet in the future. Accepting a malicious applet is bad, >>> *always* accepting it is worse... >> It's a bug if we check the "accept-by-default" box by default for an >> applet not signed by a trusted CA. afaik this is working fine for me. > > I'm not saying the current behaviour is buggy, I'm just saying I don't know if I agree with the > choice of defaulting it to always accepting for the user in the future. > >> >>>>> My two cents: leave it checked. >>>>> My two cents (2): I really don't care :P >>>> Agreed. Lets make sensible decisions where we can, but allow users to >>>> override them. >>>> >>> IMO the more sensible choice is to not, by default, assume the user will >>> "always trust" any applet at all. If they want to always trust an applet and >>> not ever be asked about it again, I think that should be a decision they >>> actively make, rather than be the default that occurs if they blindly click >>> OK until the applet appears. >> I am not sure I understand what the new model would be. Wouldn't it be >> prompting more and then asking them to understand something make a >> decision (sandbox with appropriate policies vs run) that they are not >> knowledgeable about in general to make? >> >> Thanks, >> Omair >> > > I think the "Run" button is obvious enough for users who are not informed about the Sandboxing > options that they can simply choose Run and not worry about it. The new model is the same as the old > model except without assuming that an applet being signed by a "Trusted CA" is really enough to > decide that the user really does trust the applet to always run on their machine with full > unrestricted access. > One item to think about - the run in sandbox option is for adavanced users. And even more, in state in which it is now, it needs tuning, and sometimes even the tuning is not enough. I'm inclining to helpcrypto and Omair - let it be as it is. so my 0.8 of vote increased to 0.9...Sorry :( J. Yes. Users blindly click ok until they run. If they dont run, they rock us. Well I understand your point, let them click ok, but force them to think before "remember" decision... But wil lthey really think? Somebody said it "our bfu - less thinking, even better" And verified cacert should be still rocky solid ;( JJ. From jvanek at redhat.com Wed May 21 07:56:15 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 21 May 2014 09:56:15 +0200 Subject: [rfc][icedtea-web]Localized Man Page Script In-Reply-To: <537BB2D0.9090007@redhat.com> References: <489988795.5413717.1400610539851.JavaMail.zimbra@redhat.com> <1530337932.5418716.1400611261222.JavaMail.zimbra@redhat.com> <537BA568.6090607@redhat.com> <887325711.5450945.1400615544040.JavaMail.zimbra@redhat.com> <537BB2D0.9090007@redhat.com> Message-ID: <537C5C1F.5080407@redhat.com> On 05/20/2014 09:53 PM, Andrew Azores wrote: > On 05/20/2014 03:52 PM, Jie Kang wrote: >> Hello, >> >> I've made all the suggested fixes and am working on the makefile at the moment. >> >> Thanks, >> >> > > Looks good to me. Please post the new patch when you have your script integrated and tested working > in the Makefile. > > Thanks, > hi! The creepy voice from behind the sea have nasty words to say :( I'm afraid we ca not use this approach. And as it is it must not be pushed. The original idea of this feature was to *reuse* already existing, localized properties files. Also it was intended to share output between manpages *and* applications (javaws, policieditor, itw-settngs) --help option. Also maybe add icedtea-web manpage, and (probably) also have an possibility to generate more then man pages - eg html "man pages" or whatever. You can see that -help swihhc already provides eg full list of programs switches, or some about sntences.... Well your approach do not implement any of this. Well, as opposite it file new file to localize and even more fiels to maintain. My original idea on this to have java based generator, included in netx itself. Its "main" class will be able to : - be called during the build (just put $CLASSES to CLASSPATH and invoke main) - generate man pages in reqested language - genreate html man pages (well I think there is some man2html, so maybe this is waste of everything) - the html files may save as base for help in gui modes - be called from javaws/itwsettings/policieditor and so - generate -help output - implementation detail - do not add "language swithc" generate files baed of currently set LOCALE - much more :) As benefit you will get - all the messages will come form properties - only properties to maintain! - parsing of properties in free - unicode support, and insertion of parametres from JDK itself - improved -help output (from man pages) - improved manpages form -help outputs - list of all switches - all default file locations! - get rid of about/help code from main classes of itw - much more;) If some messages are in man pages, but not in properties, you can add them into proeprties, but please verify that there is no similar in properties. And of course vice versa. Well most of http://icedtea.classpath.org/wiki/IcedTea-Web#Release_Plans since 1.3 are mostly somehow inserted by me. Sometime from need, sometimes from wish (feel free to add yours, or suggest modifications!) But pelase, always consult a bit before first patch. Mostly IRCis enough :) Sorry for this email:( But this is really stop show for this approach). Please try to post the patch ins small hunks, but it can be harder then write patch itself, andnot always possible, or meaningful. I hope I havenot forget something :( But we can tune it during the process. But I'm afraid nowyou are dammed to wait with final push on this topic to me returned from PTO :o) All the best! J Few notes to code itself just "education purposes": - changelog - the first line of changes should be caption. Eg "Added generator of man pages" for this particualr setthsi date-name-email [emtyline] [tab]caption [tab]* file:changes In changelog - always clearly say that it is new file. like [tab[ * file: new file, its purpose I'm not sure how good templates for man pages will be suitable in java based solution.. Well then may be. We will see. I hoped to have some class like "Content provider" which will use some class "markup" and together they will provide - context of desired verbosity - marked in markup you wont You can think about it as execise from some "system architecture" because it is isolated system in netx :) (whch you are designing from ground) In case of template - I would suggest %{key} rather then simple @KEY (although for your sh based solution @KEY is most correct) Otherwise splendid work on code, and sorry for wasting it:( From ptisnovs at icedtea.classpath.org Wed May 21 09:14:20 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 21 May 2014 09:14:20 +0000 Subject: /hg/gfx-test: Three new helper methods added into CommonBitmapOp... Message-ID: changeset a1186fdfb52b in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=a1186fdfb52b author: Pavel Tisnovsky date: Wed May 21 11:15:04 2014 +0200 Three new helper methods added into CommonBitmapOperations. diffstat: ChangeLog | 5 + src/org/gfxtest/framework/CommonBitmapOperations.java | 78 +++++++++++++++++++ 2 files changed, 83 insertions(+), 0 deletions(-) diffs (114 lines): diff -r 8c51f9c636ab -r a1186fdfb52b ChangeLog --- a/ChangeLog Mon May 19 09:41:33 2014 +0200 +++ b/ChangeLog Wed May 21 11:15:04 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-21 Pavel Tisnovsky + + * src/org/gfxtest/framework/CommonBitmapOperations.java: + Three new helper methods added into CommonBitmapOperations. + 2014-05-19 Pavel Tisnovsky * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingRectangles.java: diff -r 8c51f9c636ab -r a1186fdfb52b src/org/gfxtest/framework/CommonBitmapOperations.java --- a/src/org/gfxtest/framework/CommonBitmapOperations.java Mon May 19 09:41:33 2014 +0200 +++ b/src/org/gfxtest/framework/CommonBitmapOperations.java Wed May 21 11:15:04 2014 +0200 @@ -999,6 +999,32 @@ /** * Create new buffered image containing black and white horizontal stripes 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 bgcolor + * background color + */ + public static TestResult doBitBltTestWithHorizontalStripesImage(TestImage image, Graphics2D graphics2d, int imageType, Color bgcolor) + { + // create new buffered bitmap with given type + // bitmap should contains horizontal stripes + BufferedImage bufferedImage = ImageFactory.createHorizontalStripesImage(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, no flipping and no cropping + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, bgcolor) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image containing black and white horizontal stripes then perform basic BitBlt test. * * @param image * image to which another image is to be drawn @@ -1078,6 +1104,32 @@ /** * Create new buffered image containing black and white vertical stripes 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 bgcolor + * background color + */ + public static TestResult doBitBltTestWithVerticalStripesImage(TestImage image, Graphics2D graphics2d, int imageType, Color bgcolor) + { + // create new buffered bitmap with given type + // bitmap should contains vertical stripes + BufferedImage bufferedImage = ImageFactory.createVerticalStripesImage(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, no flipping and no cropping + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, bgcolor) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image containing black and white vertical stripes then perform basic BitBlt test. * * @param image * image to which another image is to be drawn @@ -1157,6 +1209,32 @@ /** * Create new buffered image containing black and white diagonal stripes 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 bgcolor + * background color + */ + public static TestResult doBitBltTestWithDiagonalStripesImage(TestImage image, Graphics2D graphics2d, int imageType, Color bgcolor) + { + // create new buffered bitmap with given type + // bitmap should contains diagonal stripes + BufferedImage bufferedImage = ImageFactory.createDiagonalStripesImage(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, no flipping and no cropping + return BitBltOperations.performBitBlt(bufferedImage, image, graphics2d, bgcolor) ? TestResult.PASSED : TestResult.FAILED; + } + + /** + * Create new buffered image containing black and white diagonal stripes then perform basic BitBlt test. * * @param image * image to which another image is to be drawn From jvanek at redhat.com Wed May 21 09:48:38 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 21 May 2014 11:48:38 +0200 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <20140520154001.GC2672@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> <20140512210341.GK2138@redhat.com> <5374DA82.4030303@redhat.com> <20140520154001.GC2672@redhat.com> Message-ID: <537C7676.4030009@redhat.com> On 05/20/2014 05:40 PM, Omair Majid wrote: > * Jiri Vanek [2014-05-15 11:17]: >> I have one more opinion to the final I have added. If somebody will >> suddenly try to assign to final value, he will be warned by compiler. And >> thats good thing. At least it will force him to double check what he is >> doing. > > Fair enough. I prefer to make fields final only if all of them can be. > It's my hint for immutable (and hence thread-safe) object. > >> I have also followed your recommendation to move few util classes to >> UrlUtils. And write tests for them. > > Awesome! > >> There is one change in code then. The original notNullUrlEquals ignored >> port! I added port check to new code. (this is actually code logic and to >> not belongs here..) >> >> I will NOT push this line (unless it is approved directly). > > Nice! > >> +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Thu May 15 17:09:28 2014 +0200 >> @@ -75,6 +74,7 @@ >> >> /** >> * Returns the remote location this entry caches. >> + * @return URL same, as the one on which this entry was created > > No comma needed here. But I must ask: why are you duplicating the > same thing in two places right next to each other here? > >> /** >> * Returns the time in the local system clock that the file was >> * most recently checked for an update. >> - * @return >> + * @return when the item was updated in ms >> */ >> public long getLastUpdated() { > >> * Sets the time in the local system clock that the file was >> * most recently checked for an update. >> - * @param updatedTime >> + * @param updatedTime the time to be set as last updated time >> */ >> public void setLastUpdated(long updatedTime) { > > Can you add the 'ms' reference to both methods? will be done > >> - * @param lastModified >> + * @param lastModified - current time detail as get from server > > I cant really understand the explanation in the comment. What is 'time > detail'? Would it better to say 'the value of "Last-Modified" http > header'? + * @param lastModified - current time as get from server. Mostly value of "Last-Modified" http header'? > >> >> - try { >> - long remoteModified = lastModified; >> - long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); >> + long remoteModified = lastModified; >> + long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); >> >> - if (remoteModified > 0 && remoteModified <= cachedModified) >> - return true; >> - else >> - return false; >> - } catch (Exception ex) { >> - OutputController.getLogger().log(ex);; >> + return remoteModified > 0 && remoteModified <= cachedModified; > > There is one semantic change here: if properites.getProperty() returns > null, Long.parseLong throws NumberFormatException. It would have been > caught before, but isn't now. Is it safe to assume that this never > happens? > >> +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu May 15 17:09:28 2014 +0200 > >> - /** >> * Returns the Permission object necessary to access the >> * resource, or {@code null} if no permission is needed. >> - * @param location >> - * @param version >> - * @return >> + * @param location location of the resource >> + * @param version the version, or {@code null} > > You know, if you named the variables resourceLocation and > resourceVersion, you wouldn't need these comments :( see lower > >> + * @return permissions of the location > > This really doesn't explain anything. It just restates (in less detail!) > the name/return type of the method. Please just remove it. > I would say it does. It i snot clear which permissions those are. >> * Returns the parent directory of the cached resource. > >> + * @return parent directory of cached resource > > This is just duplicating text :( see lower > >> + * @return the stream towrite to resource > > There's a typo here, but it is also really awkward to read. Can you > rephrase it to like "the stream to use when writing the resource to > disk"? > >> + * @throws java.io.IOException if it appear > > Uh.. what does this mean? > Well one of the most dummy comments I come with :) >> */ >> public static OutputStream getOutputStream(URL source, Version version) throws IOException { >> File localFile = getCacheFile(source, version); >> @@ -456,6 +405,9 @@ >> * Copies from an input stream to an output stream. On >> * completion, both streams will be closed. Streams are >> * buffered automatically. >> + * @param is stream to read from >> + * @param os stream to write to > > Maybe rename variables to 'source' and 'dest' and there won't be a need > for comments? nope. Those are is for input stream and os for output stream Well and excelent comment expalining whatshappenng with them :) See lower again. > >> + * @throws java.io.IOException if copy fails > > I would just leave it out. It really doesn't say anything more than the > method signature: see lower > >> public static void streamCopy(InputStream is, OutputStream os) throws IOException { > > >> - List urlList = new ArrayList(); >> + List urlList = new ArrayList<>(); > > Please don't mix diamond changes in this patch. Okay as a separate > patch, though. Ugh.. ok.. I iwll try to push this as separate comment, but - I do not wont to bother with it. - replace all with <> is too big and unnecessary patch - so I replaced those minors I stumbled across... Is it so bad? > >> +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Thu May 15 17:09:28 2014 +0200 > >> /** >> * Return a shared Resource object representing the given >> * location and version. >> + * @param location final location of resource >> + * @param requestVersion final version of resource >> + * @param updatePolicy final policy for updating > > What does 'final' here mean? Tha` it is set and never changed later. > >> @@ -290,6 +297,7 @@ >> /** >> * Removes the tracker to the list of trackers monitoring this >> * resource. >> + * @param tracker > > Please don't do this. At this point, it's just noise. see lower > >> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu May 15 17:09:28 2014 +0200 > >> @@ -308,6 +309,7 @@ >> * on each tracker that is monitoring the resource. Do not call >> * this method with any locks because the listeners may call >> * back to this ResourceTracker. >> + * @param resource resource which event is fired > > Maybe rephrase it to 'resource on which event is fired'. ok! > >> /** >> * Open a URL connection and get the content length and other >> * fields. >> + * >> + * @param resource the resource to download > > s/download/initialize/ > >> @@ -863,21 +873,28 @@ >> /** >> * testing wrapper >> * >> - * @param url >> - * @param requestProperties >> - * @param requestMethod >> - * @return >> + * @param url url of to be checked >> + * @param requestProperties properties map for connection >> + * @param requestMethod method of request - HEAD or GET > > This method should really be encapsulated in an enum. > Worthy idea. Can I include it inside this patch? >> + * @return the repsonse code from server >> * @throws IOException >> */ > > For a method documented as 'testing wrapper', I don't think it makes any > sense to document the parameters. > +- deppends.. se lower >> +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu May 15 17:09:28 2014 +0200 > >> /** >> * Add an Application listener >> + * @param listener listener to be added >> */ >> public void addApplicationListener(ApplicationListener listener) { > > Why not rename the argument `listener` to `toAdd`? They you wont need > the @param. > >> /** >> * Remove an Application Listener >> + * @param listener to be removed >> */ >> public void removeApplicationListener(ApplicationListener listener) { > > Same thing here. May be. But stil there wil be an comment... > >> @@ -268,6 +277,7 @@ >> >> /** >> * Returns whether the application is running. >> + * @return state of application > > No, please describe the return value. As in '@return true if the > application is still running'. > > But, this comment is just repeating the method signature. There's no > need for it. > >> @@ -349,11 +362,16 @@ >> >> /** >> * Returns whether or not this jar is signed. >> + * @return whether jar is signed. > > This is duplicating (incorrect) text. It really should be the > application, not the jar, that's signed. ok. Thats why even this noise is good. > >> +++ b/tests/netx/unit/net/sourceforge/jnlp/util/UrlUtilsTest.java Thu May 15 17:09:28 2014 +0200 > >> >> + @Test >> + public void testUrlEquals() throws Exception { >> + final URL n1 = null, n2 = null, u1 = new URL("http://example.com"), u2 = u1, u3 = new URL("http://example.com"); >> + Assert.assertTrue("Two nulls should be equal", UrlUtils.urlEquals(n1, n2)); >> + Assert.assertFalse("Null URL should not equal a non-null", UrlUtils.urlEquals(n1, u1)); >> + Assert.assertTrue("URL should equal itself (same reference)", UrlUtils.urlEquals(u1, u2)); >> + Assert.assertTrue("URLs should be equal when different reference but the same URL", UrlUtils.urlEquals(u1, u3)); > > You know, this really should be split into multiple tests: Nope. On one side, test doing one thing is greate, but to have 100000 of test which are doing neraly the same is not so greate. I tried to separate those tests by behavior. And it seems to be right. > > testUrlEqualsSameUrls > testUrlEqualsNullUrls > testUrlEqualsDifferentUrls > > And so on. If the tests are independent, moving them to different tests > makes a lot of sense. as above. Does not. > >> + public void notNullUrlEquals_nulls1() throws Exception { > > Please rename it to something like: > > verifyNotNullUrlEqualsThrowsExceptionWhenBothArgumentsAreNull() ok ;) > >> + public void notNullUrlEquals_nulls2() throws Exception { > > How about: > > verifyNotNullUrlEqualsThrowsExceptionWhenFirstArgumentIsNull() ok ;) /you should start to learn Finish :) > > >> + >> + public void notNullUrlEquals_nulls3() throws Exception { > > Missing @Test oh good catch. Will be fixed. > > Please rename this method to: > > verifyNotNullUrlEqualsThrowsExceptionWhenSecondArgumentIsNull() ok > > Please apply similar changes to the rest of the code in this file. ok :( > >> +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Thu May 15 17:09:28 2014 +0200 > >> @@ -134,6 +123,8 @@ >> * param "port" prints out the port >> * nothing or number will run server on random(or on number specified) >> * port in -Dtest.server.dir >> + * @param args paramas from commandline. recognized are port and randomport > > s/paramas/params/ > > I am not sure I understand "recognized are port and randomport". Do you > mean the first argument is port and the second is randomport? > > >> + * @throws Exception > >> + * @throws Exception > >> + * @throws Exception > > Please, just leave these out. hmmm This is the "see lower" part We are a bit deadlocking around usability of comments. Well from where you are looking on it? I got an impression you are looking on them from *code*. I think most of your arguments become invalid, when you look to them as on final html file. ANd Imean pure html file without the code. If tose which you wont me to remove will be removed (or when you wont some infomratin to be removed in behalf of somthing else...) then this information is really missing in final html. Is this what you wont? J. From aazores at redhat.com Wed May 21 13:51:14 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 21 May 2014 09:51:14 -0400 Subject: [rfc][icedtea-web] PolicyEditor NPE-on-save fix Message-ID: <537CAF52.4080404@redhat.com> Hi, Currently, PolicyEditor has an NPE bug which can be reproduced as follows: 1) Open PolicyEditor with no arguments 2) Select and deselect a checkbox 3) Click "Close" 4) "Yes" to save changes before exiting 5) NPE occurs I think this is a regression from the PolicyEditorFrame/PolicyEditorDialog refactor, but I'm not sure of that as it doesn't seem worth the time to go back and check anyway. The problem is just that the quit() methods provided by these two classes do not verify that there is a File to save to before attempting to save to that file, so unless PolicyEditor is opened with a file path argument or the user specifically uses the Open or Save/Save As options, no file will ever be selected to save to, hence the NPE in the savePolicyFile method. The attached patch simply performs a check in the quit() methods and adds a file chooser dialog if the file has not yet been selected and the user chooses to save their changes. After applying the patch, the NPE in (5) should no longer occur, and a file chooser should appear instead, allowing the file to be saved to the desired location. ChangeLog: * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java (quit): select file to save to using fileChooser if file is null Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyeditor-save-npe.patch Type: text/x-patch Size: 1959 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Wed May 21 14:09:33 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 21 May 2014 14:09:33 +0000 Subject: [Bug 1781] New: [IcedTea7] NSS PKCS11 provider fails to handle multipart AES encryption Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1781 Bug ID: 1781 Summary: [IcedTea7] NSS PKCS11 provider fails to handle multipart AES encryption Product: IcedTea Version: 7-hg Hardware: all OS: All Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org Clone of PR914 for 7 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=914 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Wed May 21 14:10:07 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 21 May 2014 14:10:07 +0000 Subject: [Bug 1781] [IcedTea7] NSS PKCS11 provider fails to handle multipart AES encryption In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1781 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Target Milestone|--- |2.4.8 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkang at redhat.com Wed May 21 14:29:50 2014 From: jkang at redhat.com (Jie Kang) Date: Wed, 21 May 2014 10:29:50 -0400 (EDT) Subject: [rfc][icedtea-web] Policy Editor typo fix In-Reply-To: <343885617.5755479.1400682479168.JavaMail.zimbra@redhat.com> Message-ID: <1717563155.5756317.1400682590879.JavaMail.zimbra@redhat.com> Hi, Just changed a small typo in policy editor's GUI: "Read to system" -> "Read from system" 2014-05-16 Jie Kang * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): Changed from "Read to" to "Read from" Thanks, -------------- next part -------------- A non-text attachment was scrubbed... Name: policyeditor-readto.patch Type: text/x-patch Size: 518 bytes Desc: not available URL: From aazores at redhat.com Wed May 21 14:42:12 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 21 May 2014 10:42:12 -0400 Subject: [rfc][icedtea-web] Policy Editor typo fix In-Reply-To: <1717563155.5756317.1400682590879.JavaMail.zimbra@redhat.com> References: <1717563155.5756317.1400682590879.JavaMail.zimbra@redhat.com> Message-ID: <537CBB44.2080204@redhat.com> On 05/21/2014 10:29 AM, Jie Kang wrote: > Hi, > > Just changed a small typo in policy editor's GUI: > "Read to system" -> "Read from system" > > 2014-05-16 Jie Kang > > * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): > Changed from "Read to" to "Read from" > > Thanks, Thanks, looks good. I'll push this for you. -- Andrew A From aazores at icedtea.classpath.org Wed May 21 14:44:41 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Wed, 21 May 2014 14:44:41 +0000 Subject: /hg/icedtea-web: Fix typo in PolicyEditor GUI Message-ID: changeset bced866e7c1f in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bced866e7c1f author: Andrew Azores date: Wed May 21 10:44:23 2014 -0400 Fix typo in PolicyEditor GUI 2014-05-21 Jie Kang * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): Changed from "Read to" to "Read from" diffstat: ChangeLog | 5 +++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-) diffs (24 lines): diff -r 8151448ecea2 -r bced866e7c1f ChangeLog --- a/ChangeLog Tue May 20 16:52:21 2014 -0400 +++ b/ChangeLog Wed May 21 10:44:23 2014 -0400 @@ -1,3 +1,8 @@ +2014-05-21 Jie Kang + + * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): + Changed from "Read to" to "Read from" + 2014-05-20 Lukasz Dracz Jie Kang diff -r 8151448ecea2 -r bced866e7c1f netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue May 20 16:52:21 2014 -0400 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed May 21 10:44:23 2014 -0400 @@ -577,7 +577,7 @@ PEGAccesUnowenedCode = Execute unowned code PEGMediaAccess = Media access PEGrightClick = right click to fold/unfold -PEGReadFileSystem = Read to system +PEGReadFileSystem = Read from system PEGWriteFileSystem = Write to system From jvanek at redhat.com Wed May 21 14:51:27 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 21 May 2014 16:51:27 +0200 Subject: /hg/icedtea-web: Fix typo in PolicyEditor GUI In-Reply-To: References: Message-ID: <537CBD6F.4000402@redhat.com> On 05/21/2014 04:44 PM, aazores at icedtea.classpath.org wrote: > changeset bced866e7c1f in /hg/icedtea-web > details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bced866e7c1f > author: Andrew Azores > date: Wed May 21 10:44:23 2014 -0400 > > Fix typo in PolicyEditor GUI > > 2014-05-21 Jie Kang > > * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): > Changed from "Read to" to "Read from" > > > diffstat: > > ChangeLog | 5 +++++ > netx/net/sourceforge/jnlp/resources/Messages.properties | 2 +- > 2 files changed, 6 insertions(+), 1 deletions(-) > > diffs (24 lines): > > diff -r 8151448ecea2 -r bced866e7c1f ChangeLog > --- a/ChangeLog Tue May 20 16:52:21 2014 -0400 > +++ b/ChangeLog Wed May 21 10:44:23 2014 -0400 > @@ -1,3 +1,8 @@ > +2014-05-21 Jie Kang > + > + * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): > + Changed from "Read to" to "Read from" > + > 2014-05-20 Lukasz Dracz > Jie Kang > > diff -r 8151448ecea2 -r bced866e7c1f netx/net/sourceforge/jnlp/resources/Messages.properties > --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue May 20 16:52:21 2014 -0400 > +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed May 21 10:44:23 2014 -0400 > @@ -577,7 +577,7 @@ > PEGAccesUnowenedCode = Execute unowned code > PEGMediaAccess = Media access > PEGrightClick = right click to fold/unfold > -PEGReadFileSystem = Read to system > +PEGReadFileSystem = Read from system > PEGWriteFileSystem = Write to system > > > Both Jie and Lukasz have already pushed changes. Although not yet push access, they deserve to be added to Authors. Since first chnageset ;) J. From jvanek at redhat.com Wed May 21 14:56:01 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 21 May 2014 16:56:01 +0200 Subject: Painting issues with "autosize". My fault? Your fault? In-Reply-To: References: Message-ID: <537CBE81.2050907@redhat.com> On 05/16/2014 09:43 AM, helpcrypto helpcrypto wrote: > Hi. > > > Before filling a bug, I would like to ask if I'm doing it properly. > > Consider the following scenario: > -Dialog+BorderLayout+center JPanel with JLabel > > In runtime I modify the label from "" to "lorem ipsum..." (The lorem ipsum part are several paragraphs) > And do pack() and repaint(). > > *The objective is to automatically resize the dialog depending on panels contents* > > > Using ORACLE JRE the dialog is redrawn to fit the content, but this is not happening on icedtea-web, so part of the text is hidden under north, south, east and west panels. > > Did I explained myself properly? > Should I file a bug and attach a test case or I must do it another way? > > Yes this sounds like a bug. But From desciption is not clear wheter it is IcedTea-Web or Openjdk. It is worthy to try openjdk 6 / 7 / 8 snd proprietary plugin and Proprietary JDK 7/8 and icedtea-web to eliminate dead branches. And hence you see it in Jdialog I suspect OpenJDK itself. Not Icedtea web. Was the window manager always the same? Are you able to prepare minimalistic reproducer? ( I guess main class with few lines of jdialog setup). ? Then we can try on various JDKS for you. J. From omajid at redhat.com Wed May 21 15:02:55 2014 From: omajid at redhat.com (Omair Majid) Date: Wed, 21 May 2014 11:02:55 -0400 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <537C7676.4030009@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> <20140512210341.GK2138@redhat.com> <5374DA82.4030303@redhat.com> <20140520154001.GC2672@redhat.com> <537C7676.4030009@redhat.com> Message-ID: <20140521150255.GA3957@redhat.com> * Jiri Vanek [2014-05-21 05:48]: > We are a bit deadlocking around usability of comments. Well from where you > are looking on it? I got an impression you are looking on them from *code*. Yes, that's right. > I think most of your arguments become invalid, when you look to them as on > final html file. ANd Imean pure html file without the code. If tose which > you wont me to remove will be removed (or when you wont some infomratin to > be removed in behalf of somthing else...) then this information is really > missing in final html. I see your point. And I admit that the html "looks" a bit empty when you remove redundant comments. I say "looks" because the same information is conveyed: for example, do you really need a comment describing the parameter's purpose when the name of the parameter makes it obvious? But even more than that, I am wondering what the point of html docs is. They are nice to have, for sure, but who would be using them? To me, focusing on them means more (on-going) effort without any benefit. In fact, it means a harder-to-understand system when your comments disagree with the code. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Wed May 21 15:04:07 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 21 May 2014 15:04:07 +0000 Subject: [Bug 1743] Intermittant deadlock in PluginRequestProcessor In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1743 Kurt Miller changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1073|0 |1 is obsolete| | --- Comment #2 from Kurt Miller --- Created attachment 1085 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1085&action=edit Deadlock and global variable fix -version 2 Thanks for reviewing and testing. I've attached an updated patch which does the following: . makes the message_queue and related variables private . added a new public method called queueProcessorThread() where the logic that was in queue_processor() is moved to queueProcessorThread() . I noted that several public methods called by queueProcessorThread() are not used outside the class anymore so I privatized these methods as well. This patch should be no functional change when compared to version 1. PluginRequestProcessor public interface is very simple now; constructor, destructor, queing method and dequeing thread method. Thanks again for your review. Please let me know if there are any questions or changes needed. Regards, -Kurt -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Wed May 21 15:05:38 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 21 May 2014 11:05:38 -0400 Subject: /hg/icedtea-web: Fix typo in PolicyEditor GUI In-Reply-To: <537CBD6F.4000402@redhat.com> References: <537CBD6F.4000402@redhat.com> Message-ID: <537CC0C2.3030709@redhat.com> On 05/21/2014 10:51 AM, Jiri Vanek wrote: > On 05/21/2014 04:44 PM, aazores at icedtea.classpath.org wrote: >> changeset bced866e7c1f in /hg/icedtea-web >> details: >> http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bced866e7c1f >> author: Andrew Azores >> date: Wed May 21 10:44:23 2014 -0400 >> >> Fix typo in PolicyEditor GUI >> >> 2014-05-21 Jie Kang >> >> * netx/net/sourceforge/jnlp/resources/Messages.properties >> (PEGReadFileSystem): >> Changed from "Read to" to "Read from" >> >> >> diffstat: >> >> ChangeLog | 5 +++++ >> netx/net/sourceforge/jnlp/resources/Messages.properties | 2 +- >> 2 files changed, 6 insertions(+), 1 deletions(-) >> >> diffs (24 lines): >> >> diff -r 8151448ecea2 -r bced866e7c1f ChangeLog >> --- a/ChangeLog Tue May 20 16:52:21 2014 -0400 >> +++ b/ChangeLog Wed May 21 10:44:23 2014 -0400 >> @@ -1,3 +1,8 @@ >> +2014-05-21 Jie Kang >> + >> + * netx/net/sourceforge/jnlp/resources/Messages.properties >> (PEGReadFileSystem): >> + Changed from "Read to" to "Read from" >> + >> 2014-05-20 Lukasz Dracz >> Jie Kang >> >> diff -r 8151448ecea2 -r bced866e7c1f >> netx/net/sourceforge/jnlp/resources/Messages.properties >> --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue May >> 20 16:52:21 2014 -0400 >> +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed May >> 21 10:44:23 2014 -0400 >> @@ -577,7 +577,7 @@ >> PEGAccesUnowenedCode = Execute unowned code >> PEGMediaAccess = Media access >> PEGrightClick = right click to fold/unfold >> -PEGReadFileSystem = Read to system >> +PEGReadFileSystem = Read from system >> PEGWriteFileSystem = Write to system >> >> >> > > Both Jie and Lukasz have already pushed changes. Although not yet push > access, they deserve to be added to Authors. Since first chnageset ;) > > J. Aha good point, I forgot we even had such a file... :) I'll add them both now. Thanks, -- Andrew A From aazores at icedtea.classpath.org Wed May 21 15:08:35 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Wed, 21 May 2014 15:08:35 +0000 Subject: /hg/icedtea-web: Lukasz Dracz and Jie Kang added to AUTHORS Message-ID: changeset 02a18cce94c7 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=02a18cce94c7 author: Andrew Azores date: Wed May 21 11:08:18 2014 -0400 Lukasz Dracz and Jie Kang added to AUTHORS diffstat: AUTHORS | 2 ++ ChangeLog | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-) diffs (27 lines): diff -r bced866e7c1f -r 02a18cce94c7 AUTHORS --- a/AUTHORS Wed May 21 10:44:23 2014 -0400 +++ b/AUTHORS Wed May 21 11:08:18 2014 -0400 @@ -7,10 +7,12 @@ Ricardo Mart??n Camarero Danesh Dadachanji Adam Domurad +Lukasz Dracz Thomas Fitzsimmons Mark Greenwood Peter Hatina Andrew John Hughes +Jie Kang Matthias Klose Alexandr Kolouch Micha?? G??rny < mgorny at gentoo.org > diff -r bced866e7c1f -r 02a18cce94c7 ChangeLog --- a/ChangeLog Wed May 21 10:44:23 2014 -0400 +++ b/ChangeLog Wed May 21 11:08:18 2014 -0400 @@ -1,3 +1,7 @@ +2014-05-21 Andrew Azores + + * AUTHORS: added Lukasz Dracz and Jie Kang + 2014-05-21 Jie Kang * netx/net/sourceforge/jnlp/resources/Messages.properties (PEGReadFileSystem): From bugzilla-daemon at icedtea.classpath.org Wed May 21 15:22:14 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 21 May 2014 15:22:14 +0000 Subject: [Bug 1743] Intermittant deadlock in PluginRequestProcessor In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1743 JiriVanek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvanek at redhat.com --- Comment #3 from JiriVanek --- Hi Kurt! Yes the patch looks good, and thank you for nice bugreport and fix. May I ask you to test, on system where you can reproduce this - ITW 1.5 (or head) with ICEDTEAPLUGIN_DEBUG=true? 1.5 have special debug messages and queue and thread. Well it can cause similar deadlock as regualr messages. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Wed May 21 15:36:48 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 21 May 2014 15:36:48 +0000 Subject: [Bug 1743] Intermittant deadlock in PluginRequestProcessor In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1743 --- Comment #4 from Andrew Azores --- +1 for this new patch from me as well. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Wed May 21 15:54:47 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 21 May 2014 11:54:47 -0400 Subject: [rfc][icedtea-web] PolicyEditor empty entries save to file Message-ID: <537CCC47.9070400@redhat.com> Hi, This patch makes it so that "empty" codebase entries (those with no permissions applied to them) will still be written to the policy file, so that on re-open, the "empty" codebase is still present. A special exception is added for the default "All Applets" codebase, since it always appears in the editor anyway and it doesn't make sense to have a persistent empty entry in that case. For example: 1) policyeditor -file .config/icedtea-web/security/java.policy 2) add a new codebase which isn't already present, eg http://example.com 3) save the file 4) $EDITOR config/icedtea-web/security/java.policy - verify the empty "grant codeBase http://example/com" block is present 5) policyeditor -file .config/icedtea-web/security/java.policy - verify the example.com codebase appears and has no permissions applied ChangeLog: Empty codebase entries in PolicyEditor are saved to file * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java (savePolicyFile): fileLock made final, enabledPermissions declaration moved closer to usage * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEntry.java (toString): add codebase.isEmpty() condition to returning empty string result Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyeditor-empty-entries.patch Type: text/x-patch Size: 2292 bytes Desc: not available URL: From jvanek at redhat.com Wed May 21 17:01:45 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 21 May 2014 19:01:45 +0200 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <20140521150255.GA3957@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> <20140512210341.GK2138@redhat.com> <5374DA82.4030303@redhat.com> <20140520154001.GC2672@redhat.com> <537C7676.4030009@redhat.com> <20140521150255.GA3957@redhat.com> Message-ID: <537CDBF9.3000106@redhat.com> On 05/21/2014 05:02 PM, Omair Majid wrote: > * Jiri Vanek [2014-05-21 05:48]: >> We are a bit deadlocking around usability of comments. Well from where you >> are looking on it? I got an impression you are looking on them from *code*. > > Yes, that's right. > >> I think most of your arguments become invalid, when you look to them as on >> final html file. ANd Imean pure html file without the code. If tose which >> you wont me to remove will be removed (or when you wont some infomratin to >> be removed in behalf of somthing else...) then this information is really >> missing in final html. > > I see your point. And I admit that the html "looks" a bit empty when you > remove redundant comments. I say "looks" because the same information is > conveyed: for example, do you really need a comment describing the > parameter's purpose when the name of the parameter makes it obvious? > > But even more than that, I am wondering what the point of html docs is. To be publicly accessible online, and allow browsing. But yes we are not library (but we can become once!) > They are nice to have, for sure, but who would be using them? To me, And I would like to publish them (if they are a bit better :) ) And we are packaging them O:) > focusing on them means more (on-going) effort without any benefit. In For IDE? NetBeasn are showing javadoc to each method I'm going to call... > fact, it means a harder-to-understand system when your comments disagree > with the code. Anyway - As you are one of the most honourable persons around, I tried to remove as much "nastynes-for-you" as possible. Well. The patch grow a bit again :-/ One is the enum you suggested. Not big deal. I hope we are somewhere in the middle between our opinions. I even hope closer to yours! Thanx for patience! J. ghmhmh THe patch should become general cleanup... As I told Once Approved I will try to push it in separate changesets (enum, diamond, rest?) J. -------------- next part -------------- A non-text attachment was scrubbed... Name: javadocCleaning3.patch Type: text/x-patch Size: 55160 bytes Desc: not available URL: From andrew at icedtea.classpath.org Wed May 21 18:02:04 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 21 May 2014 18:02:04 +0000 Subject: /hg/release/icedtea7-forest-2.4/hotspot: 8038392: Generating pre... Message-ID: changeset ffef4049ab32 in /hg/release/icedtea7-forest-2.4/hotspot details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/hotspot?cmd=changeset;node=ffef4049ab32 author: andrew date: Fri May 16 16:39:47 2014 +0100 8038392: Generating prelink cache breaks JAVA 'jinfo' utility normal behavior Summary: See RH1064383 (https://bugzilla.redhat.com/show_bug.cgi?id=1064383) Contributed-by: Carlos Santos diffstat: agent/src/os/linux/ps_proc.c | 52 +++++++++++++++++++++++++++++++++++++++---- 1 files changed, 47 insertions(+), 5 deletions(-) diffs (69 lines): diff -r 0c479601fd12 -r ffef4049ab32 agent/src/os/linux/ps_proc.c --- a/agent/src/os/linux/ps_proc.c Thu Apr 17 17:20:17 2014 +0100 +++ b/agent/src/os/linux/ps_proc.c Fri May 16 16:39:47 2014 +0100 @@ -261,7 +261,7 @@ static bool read_lib_info(struct ps_prochandle* ph) { char fname[32]; - char buf[256]; + char buf[PATH_MAX]; FILE *fp = NULL; sprintf(fname, "/proc/%d/maps", ph->pid); @@ -271,10 +271,52 @@ return false; } - while(fgets_no_cr(buf, 256, fp)){ - char * word[6]; - int nwords = split_n_str(buf, 6, word, ' ', '\0'); - if (nwords > 5 && find_lib(ph, word[5]) == false) { + while(fgets_no_cr(buf, PATH_MAX, fp)){ + char * word[7]; + int nwords = split_n_str(buf, 7, word, ' ', '\0'); + + if (nwords < 6) { + // not a shared library entry. ignore. + continue; + } + + if (word[5][0] == '[') { + // not a shared library entry. ignore. + if (strncmp(word[5],"[stack",6) == 0) { + continue; + } + if (strncmp(word[5],"[heap]",6) == 0) { + continue; + } + + // SA don't handle VDSO + if (strncmp(word[5],"[vdso]",6) == 0) { + continue; + } + if (strncmp(word[5],"[vsyscall]",6) == 0) { + continue; + } + } + + if (nwords > 6) { + // prelink altered mapfile when the program is running. + // Entries like one below have to be skipped + // /lib64/libc-2.15.so (deleted) + // SO name in entries like one below have to be stripped. + // /lib64/libpthread-2.15.so.#prelink#.EECVts + char *s = strstr(word[5],".#prelink#"); + if (s == NULL) { + // No prelink keyword. skip deleted library + print_debug("skip shared object %s deleted by prelink\n", word[5]); + continue; + } + + // Fall through + print_debug("rectifing shared object name %s changed by prelink\n", word[5]); + *s = 0; + } + + if (find_lib(ph, word[5]) == false) { intptr_t base; lib_info* lib; #ifdef _LP64 From jkang at redhat.com Wed May 21 19:32:46 2014 From: jkang at redhat.com (Jie Kang) Date: Wed, 21 May 2014 15:32:46 -0400 (EDT) Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <507234455.5896051.1400700289410.JavaMail.zimbra@redhat.com> Message-ID: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> Hi, Fixed the PolicyEditor's save function, allowing for appropriate saving with respect to file (on-disk) modification and user (in-app) changes. Previously one could not Save As to a new file without any in-app changes. Also previously, one could not save changes to a deleted file properly when no in-app changes were present. These issues are both addressed. Also removed unused imports in MD5SumWatcher.java. 2014-05-20 Jie Kang * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save (savePolicyFile): no longer immediately returns if changesMade is false (updateMd5WithDialog): use changesMade along with file MD5 sum changes to determine whether to continue saving to disk, also privatized method and renamed method to checkPolicyChangesWithDialog * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java Removed unused imports. Thanks, -------------- next part -------------- A non-text attachment was scrubbed... Name: policyeditor-save.patch Type: text/x-patch Size: 3382 bytes Desc: not available URL: From aazores at redhat.com Wed May 21 20:30:20 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 21 May 2014 16:30:20 -0400 Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> References: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> Message-ID: <537D0CDC.5010003@redhat.com> On 05/21/2014 03:32 PM, Jie Kang wrote: > Hi, > > Fixed the PolicyEditor's save function, allowing for appropriate saving with respect to file (on-disk) modification and user (in-app) changes. Previously one could not Save As to a new file without any in-app changes. Also previously, one could not save changes to a deleted file properly when no in-app changes were present. These issues are both addressed. > > Also removed unused imports in MD5SumWatcher.java. > > > 2014-05-20 Jie Kang > > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java > (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save > (savePolicyFile): no longer immediately returns if changesMade is false > (updateMd5WithDialog): use changesMade along with file MD5 sum changes to determine > whether to continue saving to disk, also privatized method and renamed method > to checkPolicyChangesWithDialog > * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java > Removed unused imports. > > > Thanks, Can you give reproduction steps please? Both things you describe appear to work for me without your patch applied. Thanks, -- Andrew A From aazores at redhat.com Wed May 21 20:42:55 2014 From: aazores at redhat.com (Andrew Azores) Date: Wed, 21 May 2014 16:42:55 -0400 Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <537D0CDC.5010003@redhat.com> References: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> <537D0CDC.5010003@redhat.com> Message-ID: <537D0FCF.4030302@redhat.com> On 05/21/2014 04:30 PM, Andrew Azores wrote: > On 05/21/2014 03:32 PM, Jie Kang wrote: >> Hi, >> >> Fixed the PolicyEditor's save function, allowing for appropriate >> saving with respect to file (on-disk) modification and user (in-app) >> changes. Previously one could not Save As to a new file without any >> in-app changes. Also previously, one could not save changes to a >> deleted file properly when no in-app changes were present. These >> issues are both addressed. >> >> Also removed unused imports in MD5SumWatcher.java. >> >> >> 2014-05-20 Jie Kang >> >> * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java >> (saveAsButtonAction): set changesMade to true to allow >> savePolicyFile to save >> (savePolicyFile): no longer immediately returns if changesMade >> is false >> (updateMd5WithDialog): use changesMade along with file MD5 sum >> changes to determine >> whether to continue saving to disk, also privatized method and >> renamed method >> to checkPolicyChangesWithDialog >> * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java >> Removed unused imports. >> >> Thanks, > > Can you give reproduction steps please? Both things you describe > appear to work for me without your patch applied. > > Thanks, > Ah nevermind sorry, I seem to have some weird build stuff going on. With a freshly cloned copy of ITW I can reproduce the issues, even though my other copy claims to be up to date and clean :/ seems somehow I have a patch applied and mercurial doesn't think I do maybe... Still, reproduction steps please! :) Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Wed May 21 20:51:34 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 21 May 2014 20:51:34 +0000 Subject: [Bug 1743] Intermittant deadlock in PluginRequestProcessor In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1743 --- Comment #5 from Kurt Miller --- (In reply to JiriVanek from comment #3) > Hi Kurt! > > Yes the patch looks good, and thank you for nice bugreport and fix. Thanks. > May I ask you to test, on system where you can reproduce this - ITW 1.5 (or > head) with ICEDTEAPLUGIN_DEBUG=true? Sure, will do. > 1.5 have special debug messages and queue and thread. Well it can cause > similar deadlock as regualr messages. Are you refering to the pre_jvm_message queue or something else? Regards, -Kurt -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Thu May 22 07:53:39 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 22 May 2014 07:53:39 +0000 Subject: /hg/gfx-test: Ten new helper methods added into BitBltBufferedIm... Message-ID: changeset e62c92a96c62 in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=e62c92a96c62 author: Pavel Tisnovsky date: Thu May 22 09:54:26 2014 +0200 Ten new helper methods added into BitBltBufferedImageOp. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/BitBltBufferedImageOp.java | 170 ++++++++++++++++++ 2 files changed, 175 insertions(+), 0 deletions(-) diffs (192 lines): diff -r a1186fdfb52b -r e62c92a96c62 ChangeLog --- a/ChangeLog Wed May 21 11:15:04 2014 +0200 +++ b/ChangeLog Thu May 22 09:54:26 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-22 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: + Ten new helper methods added into BitBltBufferedImageOp. + 2014-05-21 Pavel Tisnovsky * src/org/gfxtest/framework/CommonBitmapOperations.java: diff -r a1186fdfb52b -r e62c92a96c62 src/org/gfxtest/testsuites/BitBltBufferedImageOp.java --- a/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Wed May 21 11:15:04 2014 +0200 +++ b/src/org/gfxtest/testsuites/BitBltBufferedImageOp.java Thu May 22 09:54:26 2014 +0200 @@ -2268,6 +2268,176 @@ } /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_ARGB}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeIntARGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_INT_ARGB_PRE}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeIntARGB_Pre(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_INT_ARGB_PRE, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_555_RGB}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeUshort555RGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_555_RGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_565_RGB}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeUshort565RGB(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_565_RGB, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_USHORT_GRAY}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltVerticalColorStripesTypeUshortGray(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithVerticalColorStripesImage(image, graphics2d, BufferedImage.TYPE_USHORT_GRAY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_3BYTE_BGR}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltDiagonalColorStripesType3ByteBGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_3BYTE_BGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltDiagonalColorStripesType4ByteABGR(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_4BYTE_ABGR_PRE}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltDiagonalColorStripesType4ByteABGR_Pre(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_4BYTE_ABGR_PRE, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_BYTE_BINARY}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltDiagonalColorStripesTypeByteBinary(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_BINARY, rasterOp); + } + + /** + * Test basic BitBlt operation for buffered image with type {@link BufferedImage#TYPE_BYTE_INDEXED}. + * + * @param image + * image used as a destination for BitBlt-type operations + * @param graphics2d + * graphics canvas + * @param rasterOp + * selected raster operation + * @return test result status - PASSED, FAILED or ERROR + */ + protected TestResult doBitBltDiagonalColorStripesTypeByteIndexed(TestImage image, Graphics2D graphics2d, + BufferedImageOp rasterOp) + { + return CommonBitmapOperations.doBitBltTestWithDiagonalColorStripesImage(image, graphics2d, BufferedImage.TYPE_BYTE_INDEXED, rasterOp); + } + + /** * Entry point to the test suite. * * @param args not used in this case From jkang at redhat.com Thu May 22 13:23:08 2014 From: jkang at redhat.com (Jie Kang) Date: Thu, 22 May 2014 09:23:08 -0400 (EDT) Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <537D0FCF.4030302@redhat.com> References: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> <537D0CDC.5010003@redhat.com> <537D0FCF.4030302@redhat.com> Message-ID: <1181312707.6154417.1400764988442.JavaMail.zimbra@redhat.com> Hi, Reproduction steps as follows: Save as Bug: Open PolicyEditor. Check four permissions for 'All Applet' Save as 'abc' Save as 'def' : this fails to work Saving with on-disk modification Bug: Open PolicyEditor Check four permissions for 'All Applet' Save as 'abc' Delete 'abc' from disk Save as 'abc' : this fails to work Regards, ----- Original Message ----- From: "Andrew Azores" To: "Jie Kang" , distro-pkg-dev at openjdk.java.net Sent: Wednesday, May 21, 2014 4:42:55 PM Subject: Re: [rfc][icedtea-web] PolicyEditor Save As Changes On 05/21/2014 04:30 PM, Andrew Azores wrote: > On 05/21/2014 03:32 PM, Jie Kang wrote: >> Hi, >> >> Fixed the PolicyEditor's save function, allowing for appropriate >> saving with respect to file (on-disk) modification and user (in-app) >> changes. Previously one could not Save As to a new file without any >> in-app changes. Also previously, one could not save changes to a >> deleted file properly when no in-app changes were present. These >> issues are both addressed. >> >> Also removed unused imports in MD5SumWatcher.java. >> >> >> 2014-05-20 Jie Kang >> >> * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java >> (saveAsButtonAction): set changesMade to true to allow >> savePolicyFile to save >> (savePolicyFile): no longer immediately returns if changesMade >> is false >> (updateMd5WithDialog): use changesMade along with file MD5 sum >> changes to determine >> whether to continue saving to disk, also privatized method and >> renamed method >> to checkPolicyChangesWithDialog >> * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java >> Removed unused imports. >> >> Thanks, > > Can you give reproduction steps please? Both things you describe > appear to work for me without your patch applied. > > Thanks, > Ah nevermind sorry, I seem to have some weird build stuff going on. With a freshly cloned copy of ITW I can reproduce the issues, even though my other copy claims to be up to date and clean :/ seems somehow I have a patch applied and mercurial doesn't think I do maybe... Still, reproduction steps please! :) Thanks, -- Andrew A From aazores at redhat.com Thu May 22 13:24:14 2014 From: aazores at redhat.com (Andrew Azores) Date: Thu, 22 May 2014 09:24:14 -0400 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <537B543E.2050300@redhat.com> References: <537B51F3.6040001@redhat.com> <537B543E.2050300@redhat.com> Message-ID: <537DFA7E.2070603@redhat.com> On 05/20/2014 09:10 AM, Jiri Vanek wrote: > > On 05/17/2014 12:32 PM, Jiri Vanek wrote: >> On 05/16/2014 04:24 PM, Omair Majid wrote: >>> * Jiri Vanek [2014-05-16 08:25]: >>>> On 05/16/2014 12:24 AM, Omair Majid wrote: >>>> heheh :)) Somebody should review it ;) >>> > RFC! :) >>> >>>>>> On 05/13/2014 08:43 PM, Jiri Vanek wrote: >>>>>>> This is probably not final version of the patch - as it break all >>>>>>> tests using PluginAppletMocks - Its easy - tests do not run on >>>>>>> bootclassapth, so the Ancestor of my Access class is in different >>>>>>> classlaoder. >>> >>> Are you planning on fixing this first? >> I wonted, and i would like to. Its work in progress, and may longer >> then I thought. >> >> Between first verion of patch - where was this original statement - >> and second version, where I >> wrote a bit more, several things happened: >> >> I tried to force to load sveral explicit classes directly in java >> code by bootclasslaoder, however, >> not successfully. >> So I tried to change xbootclasspath parameter. It didn`t help >> either! However, same change on >> commandline usage outside makefile helped :-/. But caused 7other >> tests to fail (the parser family) >> >> So I ended in no op for Friday. There is still few ways to try but - >> as we (did we?) agreed - it do >> not need to be blocker for patch itself. The patch can lurk for a >> while in Head before tests are fixed. >> >> >> So answer is yes. But may happen taht with longer delay :( >> >> Thanx for your thought! >> >> J. >> > > This patch have all the tests fixed. > The changes in netx itself are 100% same as before. Only makefiel.am > and two tests have changed. > > This patch should be (and will be befor I push) split into three parts. > 1) the patch to netx itself, which alows us to run with > usptreamopenjdk, oracle jdk and ibm jdk > 2) the fixes to tests and makefile which adapt to need of > xbootclassapth instead of classapth > 3) added the semicolons behind every CLASSPATH variable which was > modified/added/used in 2 > > Well tbh, I do not fully understand why 2 is needed. But At least I > can guess. But I have absolutely > no idea why the semicolon (3) have so huge impact.... Any hints welcomed. > > J. > > Also for record - I have attempted to upstream the minor private->pkg > private patch: > http://mail.openjdk.java.net/pipermail/jdk9-dev/2014-May/000726.html > Still no reply. > > > > Well, I don't really feel fully qualified to review this, and I haven't run any tests with the patch applied - but looking over the patch it seems fine, and it builds fine and some light manual testing looks normal at least. So, +0.5? Thanks, -- Andrew A From aazores at redhat.com Thu May 22 13:31:13 2014 From: aazores at redhat.com (Andrew Azores) Date: Thu, 22 May 2014 09:31:13 -0400 Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <1181312707.6154417.1400764988442.JavaMail.zimbra@redhat.com> References: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> <537D0CDC.5010003@redhat.com> <537D0FCF.4030302@redhat.com> <1181312707.6154417.1400764988442.JavaMail.zimbra@redhat.com> Message-ID: <537DFC21.8040706@redhat.com> On 05/22/2014 09:23 AM, Jie Kang wrote: > Hi, > > Reproduction steps as follows: > > Save as Bug: > Open PolicyEditor. > Check four permissions for 'All Applet' > Save as 'abc' > Save as 'def' : this fails to work > > Saving with on-disk modification Bug: > Open PolicyEditor > Check four permissions for 'All Applet' > Save as 'abc' > Delete 'abc' from disk > Save as 'abc' : this fails to work > > Regards, > Thank you! I was able to confirm the flawed behaviour and that your patch resolves the problems. However, I think the UI feels a little funny in the case of the file being deleted by another process. If the file is modified then we prompt the user informing them and asking if they'd like to first reload/re-edit, or overwrite, or just cancel. If the file has disappeared from disk, then it just saves as usual, and the standard "Changes Saved" dialog appears. This is /okay/, and there's no point in showing the "Reload file?" dialog if the file is gone, but perhaps there should be a warning dialog that informs the user that their file has mysteriously disappeared from the disk, even though it used to be there? Anyway this is just a hint at a possible feature enhancement, if you disagree with this UI change let me know and this patch can go in as-is. Thanks, -- Andrew A From jvanek at redhat.com Thu May 22 16:11:22 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 22 May 2014 18:11:22 +0200 Subject: [rfc][icedtea-web] run on any open/oracle jdk (and ibm jdk!) In-Reply-To: <537DFA7E.2070603@redhat.com> References: <537B51F3.6040001@redhat.com> <537B543E.2050300@redhat.com> <537DFA7E.2070603@redhat.com> Message-ID: <537E21AA.6010009@redhat.com> On 05/22/2014 03:24 PM, Andrew Azores wrote: > On 05/20/2014 09:10 AM, Jiri Vanek wrote: >> >> On 05/17/2014 12:32 PM, Jiri Vanek wrote: >>> On 05/16/2014 04:24 PM, Omair Majid wrote: >>>> * Jiri Vanek [2014-05-16 08:25]: >>>>> On 05/16/2014 12:24 AM, Omair Majid wrote: >>>>> heheh :)) Somebody should review it ;) >>>> >> RFC! :) >>>> >>>>>>> On 05/13/2014 08:43 PM, Jiri Vanek wrote: >>>>>>>> This is probably not final version of the patch - as it break all >>>>>>>> tests using PluginAppletMocks - Its easy - tests do not run on >>>>>>>> bootclassapth, so the Ancestor of my Access class is in different >>>>>>>> classlaoder. >>>> >>>> Are you planning on fixing this first? >>> I wonted, and i would like to. Its work in progress, and may longer then I thought. >>> >>> Between first verion of patch - where was this original statement - and second version, where I >>> wrote a bit more, several things happened: >>> >>> I tried to force to load sveral explicit classes directly in java code by bootclasslaoder, however, >>> not successfully. >>> So I tried to change xbootclasspath parameter. It didn`t help either! However, same change on >>> commandline usage outside makefile helped :-/. But caused 7other tests to fail (the parser family) >>> >>> So I ended in no op for Friday. There is still few ways to try but - as we (did we?) agreed - it do >>> not need to be blocker for patch itself. The patch can lurk for a while in Head before tests are >>> fixed. >>> >>> >>> So answer is yes. But may happen taht with longer delay :( >>> >>> Thanx for your thought! >>> >>> J. >>> >> >> This patch have all the tests fixed. >> The changes in netx itself are 100% same as before. Only makefiel.am and two tests have changed. >> >> This patch should be (and will be befor I push) split into three parts. >> 1) the patch to netx itself, which alows us to run with usptreamopenjdk, oracle jdk and ibm jdk >> 2) the fixes to tests and makefile which adapt to need of xbootclassapth instead of classapth >> 3) added the semicolons behind every CLASSPATH variable which was modified/added/used in 2 >> >> Well tbh, I do not fully understand why 2 is needed. But At least I can guess. But I have absolutely >> no idea why the semicolon (3) have so huge impact.... Any hints welcomed. >> >> J. >> >> Also for record - I have attempted to upstream the minor private->pkg private patch: >> http://mail.openjdk.java.net/pipermail/jdk9-dev/2014-May/000726.html >> Still no reply. >> >> >> >> > > Well, I don't really feel fully qualified to review this, and I haven't run any tests with the patch > applied - but looking over the patch it seems fine, and it builds fine and some light manual testing > looks normal at least. So, +0.5? > Thanx. Although I do not approve from omair, I'm going to push in few seconds. I have alreadyscheduled last ITW daily tes. And Ireally would like to see this chgange in this run. Andrew, during my leave, may you run reproducers from time to time? Ty! J. From jvanek at icedtea.classpath.org Thu May 22 16:30:57 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Thu, 22 May 2014 16:30:57 +0000 Subject: /hg/icedtea-web: 5 new changesets Message-ID: changeset c6591d36d68a in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c6591d36d68a author: Jiri Vanek date: Thu May 22 16:45:11 2014 +0200 Made it works (basicaly) on any JDK changeset b1e4f8185c10 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=b1e4f8185c10 author: Jiri Vanek date: Thu May 22 17:21:35 2014 +0200 All tests adapted to run from XBootclaspath (forced by extending package private rt.jar class) changeset 7ce5153a6fd1 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=7ce5153a6fd1 author: Jiri Vanek date: Thu May 22 17:57:52 2014 +0200 Making the previous chnage actualy take an effect. All tests runs using CLASSPATH varibale on line, separated by semicolon. changeset 96ccc89ddb57 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=96ccc89ddb57 author: Jiri Vanek date: Thu May 22 18:08:36 2014 +0200 Added accidentally skipped hunk changeset 0c7dcde1cfe0 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=0c7dcde1cfe0 author: Jiri Vanek date: Thu May 22 18:30:41 2014 +0200 Fixed slipped test classlaoder fix in JavawsAWTRobotFindsButtonTest.java diffstat: ChangeLog | 52 ++++ Makefile.am | 37 +- acinclude.m4 | 43 +-- configure.ac | 2 +- netx/net/sourceforge/jnlp/NetxPanel.java | 24 +- netx/sun/applet/AppletViewerPanelAccess.java | 122 ++++++++++ netx/sun/applet/package-info.java | 37 +++ plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java | 2 +- plugin/icedteanp/java/sun/applet/PluginAppletViewer.java | 12 +- tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java | 2 +- tests/reproducers/simple/JavawsAWTRobotFindsButton/testcases/JavawsAWTRobotFindsButtonTest.java | 2 +- tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java | 2 +- 12 files changed, 269 insertions(+), 68 deletions(-) diffs (truncated from 603 to 500 lines): diff -r 02a18cce94c7 -r 0c7dcde1cfe0 ChangeLog --- a/ChangeLog Wed May 21 11:08:18 2014 -0400 +++ b/ChangeLog Thu May 22 18:30:41 2014 +0200 @@ -1,3 +1,55 @@ +2014-05-21 Jiri Vanek + + Fixed slipped test classlaoder fix + * sts/reproducers/simple/JavawsAWTRobotFindsButton/testcases/JavawsAWTRobotFindsButtonTest.java + (static init) used system classlaoder to laod image + +2014-05-21 Jiri Vanek + + * netx/sun/applet/AppletViewerPanelAccess.java: addedd accidentally skipped + createAppletThread method + +2014-05-21 Jiri Vanek + + Making the previous chnage actualy take an effect. + * Makefile.am: All tests runs using CLASSPATH varibale on line, separated by + semicolon. I have no idea wy this was needing. + +2014-05-21 Jiri Vanek + + All tests adapted to run from XBootclaspath (forced by extending package private + rt.jar class) + * Makefile.am: all sets of call of -Xbootclasspath in tests and coverage + are now adding $CLASSPATH to boot classapth. Where CLASSPATH was not deffined, + was added. + * tests/netx/unit/net/sourceforge/jnlp/JNLPMatcherTest.java: and + * tests/test-extensions/net/sourceforge/jnlp/awt/imagesearch/ComponentFinder.java: + resources loaded from boot classloader + +2014-05-21 Jiri Vanek + + Made it works (basicaly) on any JDK + * Makefile.am: (NETX_PKGS) sun.applet added to recognized netx packages + (netx-dist.stamp) sun directory included into packed list + * acinclude.m4: removed (IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE) check. Added + IT_CHECK_FOR_SUN_APPLET_ACCESSIBILITY, which test existence of + classes sun.applet.AppletPanel, sun.applet.AppletViewerPanel + fields applet, documentURL, baseURL and methods run and runLoader. Addapted messge + * configure.ac: call to IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE replaced by call + to IT_CHECK_FOR_SUN_APPLET_ACCESSIBILITY + * /netx/net/sourceforge/jnlp/NetxPanel.java: now extends AppletViewerPanelAccess + instead of AppletViewerPanel directly. Access to baseURL, applet and documentURL + replaced by dedicated getters/setters + * netx/sun/applet/AppletViewerPanelAccess.java: new class extending AppletViewerPanel + and enabling access to applet, documentURL and baseURL. Backed by reflection. + Also overriding run by usage of short copypasted code. + * netx/sun/applet/package-info.java: new file with worning about usage of this + package in itw + * plugin/icedteanp/java/sun/applet/PluginAppletPanelFactory.java: only call + to super debug repalced by ITW's debugging call + * plugin/icedteanp/java/sun/applet/PluginAppletViewer.java: used getters as in + NetxPanel + 2014-05-21 Andrew Azores * AUTHORS: added Lukasz Dracz and Jie Kang diff -r 02a18cce94c7 -r 0c7dcde1cfe0 Makefile.am --- a/Makefile.am Wed May 21 11:08:18 2014 -0400 +++ b/Makefile.am Thu May 22 18:30:41 2014 +0200 @@ -135,7 +135,8 @@ net.sourceforge.jnlp.controlpanel net.sourceforge.jnlp.event \ net.sourceforge.jnlp.runtime net.sourceforge.jnlp.security \ net.sourceforge.jnlp.security.viewer net.sourceforge.jnlp.services \ - net.sourceforge.jnlp.tools net.sourceforge.jnlp.util + net.sourceforge.jnlp.tools net.sourceforge.jnlp.util \ + sun.applet NETX_EXCLUDE_SRCS= @@ -502,11 +503,11 @@ (cd $(NETX_DIR) ; \ mkdir -p lib ; \ $(BOOT_DIR)/bin/jar cfm lib/classes.jar \ - $(abs_top_builddir)/netx.manifest javax/jnlp net ; \ + $(abs_top_builddir)/netx.manifest javax/jnlp net sun; \ cp -pPR $(SRC_DIR_LINK) $(NETX_SRCDIR) src; \ find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \ cd src ; \ - $(ZIP) -qr $(NETX_DIR)/lib/src.zip javax net ) + $(ZIP) -qr $(NETX_DIR)/lib/src.zip javax net sun) mkdir -p stamps touch $@ @@ -893,9 +894,9 @@ $(TESTS_DIR)/$(REPORT_STYLES_DIRNAME) $(REPRODUCERS_CLASS_NAMES) stamps/process-custom-reproducers.stamp cd $(TEST_EXTENSIONS_DIR) ; \ class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR):$(TEST_EXTENSIONS_SRCDIR) \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR):$(TEST_EXTENSIONS_SRCDIR) ; \ $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) CommandLine $$class_names + -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH CommandLine $$class_names if WITH_XSLTPROC -$(XSLTPROC) --stringparam logs logs_reproducers.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(TEST_EXTENSIONS_DIR)/tests-output.xml > $(TESTS_DIR)/index_reproducers.html -$(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(TEST_EXTENSIONS_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_reproducers.html @@ -1072,8 +1073,8 @@ done ; \ cd $(NETX_UNIT_TEST_DIR) ; \ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):.:$(TEST_EXTENSIONS_SRCDIR):$(TAGSOUP_JAR) \ - $(BOOT_DIR)/bin/java -Xbootclasspath:$(RUNTIME) CommandLine $$class_names + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):.:$(TEST_EXTENSIONS_SRCDIR):$(TAGSOUP_JAR) ; \ + $(BOOT_DIR)/bin/java -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH CommandLine $$class_names if WITH_XSLTPROC -$(XSLTPROC) --stringparam logs logs_unit.html $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/jreport.xsl $(NETX_UNIT_TEST_DIR)/tests-output.xml > $(TESTS_DIR)/index_unit.html -$(XSLTPROC) $(TESTS_SRCDIR)/$(REPORT_STYLES_DIRNAME)/logs.xsl $(NETX_UNIT_TEST_DIR)/ServerAccess-logs.xml > $(TESTS_DIR)/logs_unit.html @@ -1093,7 +1094,8 @@ mv $(NETX_UNIT_TEST_DIR)/$$file $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \ done ;\ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ - $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):.:$(TEST_EXTENSIONS_SRCDIR) ; \ + $(BOOT_DIR)/bin/java $(EMMA_JAVA_ARGS) -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH -cp $(EMMA_JAR) -Demma.report.html.out.encoding=UTF-8 emmarun \ -Dreport.html.out.encoding=UTF-8 \ -raw \ -sp $(NETX_SRCDIR) \ @@ -1157,8 +1159,8 @@ mv $(NETX_UNIT_TEST_DIR)/$$file $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" ; \ done ;\ class_names=`cat $(UNIT_CLASS_NAMES)` ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):$(JACOCO_CLASSPATH):.:$(TEST_EXTENSIONS_SRCDIR):$(TAGSOUP_JAR) \ - $(BOOT_DIR)/bin/java $(JACOCO_AGENT_SWITCH) -Xbootclasspath:$(RUNTIME) CommandLine $$class_names ; \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):$(JACOCO_CLASSPATH):.:$(TEST_EXTENSIONS_SRCDIR):$(TAGSOUP_JAR) ; \ + $(BOOT_DIR)/bin/java $(JACOCO_AGENT_SWITCH) -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH CommandLine $$class_names ; \ for file in $(EMMA_MODIFIED_FILES) ; do \ mv $(NETX_UNIT_TEST_DIR)/$$file $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_SUFFIX)" ; \ mv $(NETX_UNIT_TEST_DIR)/"$$file""$(EMMA_BACKUP_SUFFIX)" $(NETX_UNIT_TEST_DIR)/$$file ; \ @@ -1214,10 +1216,11 @@ done ; \ cd $(TEST_EXTENSIONS_DIR) ; \ class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(abs_top_builddir)/liveconnect/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):$(TEST_EXTENSIONS_DIR):.:$(TEST_EXTENSIONS_SRCDIR) ; \ $(BOOT_DIR)/bin/java \ $(EMMA_JAVA_ARGS) \ $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) -cp $(EMMA_JAR) emmarun \ + -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH -cp $(EMMA_JAR) emmarun \ -raw \ -cp $(NETX_DIR)/lib/classes.jar \ -cp $(JUNIT_JAR) \ @@ -1331,9 +1334,9 @@ done ; \ cd $(TEST_EXTENSIONS_DIR) ; \ class_names=`cat $(REPRODUCERS_CLASS_NAMES)` ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_DIR):$(JACOCO_CLASSPATH):$(TEST_EXTENSIONS_TESTS_DIR):$(TEST_EXTENSIONS_SRCDIR) \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_DIR):$(JACOCO_CLASSPATH):$(TEST_EXTENSIONS_TESTS_DIR):$(TEST_EXTENSIONS_SRCDIR) ; \ $(BOOT_DIR)/bin/java $(JACOCO_AGENT_SWITCH) $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) CommandLine $$class_names ; \ + -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH CommandLine $$class_names ; \ if [ -f $(JACOCO_JAVAWS_RESULTS) ] ; then \ jacoco_javaws_results=$(JACOCO_JAVAWS_RESULTS) ; \ $(JACOCO_OPERATOR_EXEC) \ @@ -1440,16 +1443,16 @@ run-test-server-on-44321: stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \ stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp cd $(TEST_EXTENSIONS_DIR) ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) ; \ $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) net.sourceforge.jnlp.ServerAccess + -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH net.sourceforge.jnlp.ServerAccess run-test-server-on-random-port: stamps/netx.stamp stamps/junit-jnlp-dist-dirs stamps/netx-dist-tests-import-cert-to-public \ stamps/test-extensions-compile.stamp stamps/compile-reproducers-testcases.stamp $(JUNIT_RUNNER_JAR) stamps/copy-reproducers-resources.stamp cd $(TEST_EXTENSIONS_DIR) ; \ - CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) \ + CLASSPATH=$(NETX_DIR)/lib/classes.jar:$(JUNIT_JAR):$(JUNIT_RUNNER_JAR):.:$(TEST_EXTENSIONS_TESTS_DIR) ; \ $(BOOT_DIR)/bin/java $(REPRODUCERS_DPARAMETERS) \ - -Xbootclasspath:$(RUNTIME) net.sourceforge.jnlp.ServerAccess randomport + -Xbootclasspath/a:$(RUNTIME):$$CLASSPATH net.sourceforge.jnlp.ServerAccess randomport clean-netx-tests: clean-netx-unit-tests clean-junit-runner clean-netx-dist-tests clean-test-code-coverage-jacoco clean-test-code-coverage if [ -e $(TESTS_DIR)/netx ]; then \ diff -r 02a18cce94c7 -r 0c7dcde1cfe0 acinclude.m4 --- a/acinclude.m4 Wed May 21 11:08:18 2014 -0400 +++ b/acinclude.m4 Thu May 22 18:30:41 2014 +0200 @@ -868,38 +868,29 @@ dnl Checks that sun.applet.AppletViewerPanel is available dnl and public (via the patch in IcedTea6, applet_hole.patch) dnl Can be removed when that is upstream or unneeded -AC_DEFUN([IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE],[ +AC_DEFUN([IT_CHECK_FOR_SUN_APPLET_ACCESSIBILITY],[ AC_REQUIRE([IT_FIND_JAVAC]) AC_REQUIRE([IT_FIND_JAVA]) -AC_CACHE_CHECK([if sun.applet.AppletViewerPanel is available and public], it_cv_applet_hole, [ +AC_CACHE_CHECK([if selected classes, fields and methods from sun.applet are accessible via reflection], it_cv_applet_hole, [ CLASS=TestAppletViewer.java BYTECODE=$(echo $CLASS|sed 's#\.java##') mkdir -p tmp.$$ cd tmp.$$ cat << \EOF > $CLASS [/* [#]line __oline__ "configure" */ -import java.lang.reflect.Modifier; +import java.lang.reflect.*; public class TestAppletViewer { - public static void main(String[] args) + public static void main(String[] args) throws Exception { - try - { - Class clazz = Class.forName("sun.applet.AppletViewerPanel"); - if (Modifier.isPublic(clazz.getModifiers())) - { - System.err.println("Found public sun.applet.AppletViewerPanel"); - System.exit(0); - } - System.err.println("Found non-public sun.applet.AppletViewerPanel"); - System.exit(2); - } - catch (ClassNotFoundException e) - { - System.err.println("Could not find sun.applet.AppletViewerPanel"); - System.exit(1); - } + Class ap = Class.forName("sun.applet.AppletPanel"); + Class avp = Class.forName("sun.applet.AppletViewerPanel"); + Field f1 = ap.getDeclaredField("applet"); + Field f2 = avp.getDeclaredField("documentURL"); + Method m1 = ap.getDeclaredMethod("run"); + Method m2 = ap.getDeclaredMethod("runLoader"); + Field f3 = avp.getDeclaredField("baseURL"); } } ] @@ -908,21 +899,17 @@ if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then it_cv_applet_hole=yes; else - it_cv_applet_hole=$?; + it_cv_applet_hole=no; fi else - it_cv_applet_hole=3; + it_cv_applet_hole=no; fi ]) rm -f $CLASS *.class cd .. rmdir tmp.$$ -if test x"${it_cv_applet_hole}" = "x1"; then - AC_MSG_ERROR([sun.applet.AppletViewerPanel is not available.]) -elif test x"${it_cv_applet_hole}" = "x2"; then - AC_MSG_ERROR([sun.applet.AppletViewerPanel is not public.]) -elif test x"${it_cv_applet_hole}" = "x3"; then - AC_MSG_ERROR([Compilation failed. See config.log.]) +if test x"${it_cv_applet_hole}" = "xno"; then + AC_MSG_ERROR([Some of the checked items is not avaiable. Check logs.]) fi AC_PROVIDE([$0])dnl ]) diff -r 02a18cce94c7 -r 0c7dcde1cfe0 configure.ac --- a/configure.ac Wed May 21 11:08:18 2014 -0400 +++ b/configure.ac Thu May 22 18:30:41 2014 +0200 @@ -86,7 +86,7 @@ IT_CHECK_FOR_CLASS(SUN_MISC_REF, [sun.misc.Ref]) IT_CHECK_FOR_CLASS(COM_SUN_JNDI_TOOLKIT_URL_URLUTIL, [com.sun.jndi.toolkit.url.UrlUtil]) IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) -IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE +IT_CHECK_FOR_SUN_APPLET_ACCESSIBILITY IT_CHECK_GLIB_VERSION IT_CHECK_XULRUNNER_MIMEDESCRIPTION_CONSTCHAR IT_CHECK_XULRUNNER_REQUIRES_C11 diff -r 02a18cce94c7 -r 0c7dcde1cfe0 netx/net/sourceforge/jnlp/NetxPanel.java --- a/netx/net/sourceforge/jnlp/NetxPanel.java Wed May 21 11:08:18 2014 -0400 +++ b/netx/net/sourceforge/jnlp/NetxPanel.java Thu May 22 18:30:41 2014 +0200 @@ -35,7 +35,7 @@ import net.sourceforge.jnlp.splashscreen.SplashUtils; import net.sourceforge.jnlp.util.logging.OutputController; -import sun.applet.AppletViewerPanel; +import sun.applet.AppletViewerPanelAccess; import sun.awt.SunToolkit; /** @@ -44,7 +44,7 @@ * * @author Francis Kung <fkung at redhat.com> */ -public class NetxPanel extends AppletViewerPanel implements SplashController { +public class NetxPanel extends AppletViewerPanelAccess implements SplashController { private final PluginParameters parameters; private PluginBridge bridge = null; private AppletInstance appInst = null; @@ -76,7 +76,7 @@ String uniqueKey = params.getUniqueKey(getCodeBase()); synchronized(TGMapMutex) { if (!uKeyToTG.containsKey(uniqueKey)) { - ThreadGroup tg = new ThreadGroup(Launcher.mainGroup, this.documentURL.toString()); + ThreadGroup tg = new ThreadGroup(Launcher.mainGroup, this.getDocumentURL().toString()); uKeyToTG.put(uniqueKey, tg); } } @@ -95,10 +95,10 @@ //Overriding to use Netx classloader. You might need to relax visibility //in sun.applet.AppletPanel for runLoader(). @Override - protected void runLoader() { + protected void ourRunLoader() { try { - bridge = new PluginBridge(baseURL, + bridge = new PluginBridge(getBaseURL(), getDocumentBase(), getJarFiles(), getCode(), @@ -114,13 +114,13 @@ // May throw LaunchException: appInst = (AppletInstance) l.launch(bridge, this); - applet = appInst.getApplet(); + setApplet(appInst.getApplet()); - if (applet != null) { + if (getApplet() != null) { // Stick it in the frame - applet.setStub(this); - applet.setVisible(false); - add("Center", applet); + getApplet().setStub(this); + getApplet().setVisible(false); + add("Center", getApplet()); showAppletStatus("loaded"); validate(); } @@ -157,7 +157,7 @@ } } - handler = new Thread(getThreadGroup(), this, "NetxPanelThread@" + this.documentURL); + handler = new Thread(getThreadGroup(), this, "NetxPanelThread@" + this.getDocumentURL()); handler.start(); } @@ -213,5 +213,5 @@ public int getSplashHeigth() { return splashController.getSplashHeigth(); } - + } diff -r 02a18cce94c7 -r 0c7dcde1cfe0 netx/sun/applet/AppletViewerPanelAccess.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/sun/applet/AppletViewerPanelAccess.java Thu May 22 18:30:41 2014 +0200 @@ -0,0 +1,122 @@ +/* package-info.java + Copyright (C) 2014 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 sun.applet; + +import java.applet.Applet; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.URL; +import java.util.Hashtable; + +public abstract class AppletViewerPanelAccess extends AppletViewerPanel { + + public AppletViewerPanelAccess(URL documentURL, Hashtable atts) { + super(documentURL, atts); + } + + protected URL getDocumentURL() { + try { + Field field = AppletViewerPanel.class.getDeclaredField("documentURL"); + field.setAccessible(true); + return (URL) field.get(this); + } catch (IllegalAccessException | IllegalArgumentException | NoSuchFieldException | SecurityException ex) { + throw new RuntimeException(ex); + } + } + + protected void setApplet(Applet iapplet) { + try { + Field field = AppletPanel.class.getDeclaredField("applet"); + field.setAccessible(true); + field.set(this, iapplet); + } catch (IllegalAccessException | IllegalArgumentException | NoSuchFieldException | SecurityException ex) { + throw new RuntimeException(ex); + } + } + + @Override + public void run() { + // this is copypasted chunk from AppletPanel.run (the only current + // call of runLoader). Pray it do not change + Thread curThread = Thread.currentThread(); + if (curThread == loaderThread) { + ourRunLoader(); + return; + } + + super.run(); + } + + /** + * NOTE. We cannot override private method, and this call is unused and useless. + * But kept for record of troubles to run on any openjdk. + * upstream patch posted http://mail.openjdk.java.net/pipermail/awt-dev/2014-May/007828.html + */ + private void superRunLoader() { + try { + Class klazz = AppletPanel.class; + Method runLoaderMethod = klazz.getDeclaredMethod("runLoader"); + runLoaderMethod.setAccessible(true); + runLoaderMethod.invoke(getApplet()); + } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException ex) { + throw new RuntimeException(ex); + } + } + + + protected URL getBaseURL() { + try { + Field field = AppletViewerPanel.class + .getDeclaredField("baseURL"); + field.setAccessible( + true); + return (URL) field.get( + this); + } catch (IllegalAccessException | IllegalArgumentException | NoSuchFieldException | SecurityException ex) { + throw new RuntimeException(ex); + } + + } + + @Override + //remaining stub of unpatched jdk + protected synchronized void createAppletThread() { + throw new RuntimeException("Not yet implemented"); + //no need to call super, is overriden, and not used in upstream + //AppletViewerPanel or AppletPanel + } + + abstract protected void ourRunLoader(); + +} diff -r 02a18cce94c7 -r 0c7dcde1cfe0 netx/sun/applet/package-info.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/sun/applet/package-info.java Thu May 22 18:30:41 2014 +0200 @@ -0,0 +1,37 @@ +/* package-info.java + Copyright (C) 2014 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 From andrew at icedtea.classpath.org Thu May 22 17:33:18 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 22 May 2014 17:33:18 +0000 Subject: /hg/release/icedtea7-forest-2.4/jdk: 3 new changesets Message-ID: changeset b4fc2a92ae21 in /hg/release/icedtea7-forest-2.4/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/jdk?cmd=changeset;node=b4fc2a92ae21 author: andrew date: Wed May 21 15:25:53 2014 +0100 PR1781: NSS PKCS11 provider fails to handle multipart AES encryption changeset a982f3aa40ed in /hg/release/icedtea7-forest-2.4/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/jdk?cmd=changeset;node=a982f3aa40ed author: andrew date: Wed May 21 15:52:15 2014 +0100 RH905128: [CRASH] OpenJDK-1.7.0 while using NSS security provider and kerberos changeset 521761df8dea in /hg/release/icedtea7-forest-2.4/jdk details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/jdk?cmd=changeset;node=521761df8dea author: xuelei date: Mon Aug 12 02:34:25 2013 -0700 8013809: deadlock in SSLSocketImpl between between write and close Reviewed-by: wetmore diffstat: src/share/classes/sun/security/pkcs11/P11Cipher.java | 388 +++++++++++------ src/share/classes/sun/security/ssl/SSLSocketImpl.java | 4 +- 2 files changed, 241 insertions(+), 151 deletions(-) diffs (truncated from 572 to 500 lines): diff -r c8c15663cef6 -r 521761df8dea src/share/classes/sun/security/pkcs11/P11Cipher.java --- a/src/share/classes/sun/security/pkcs11/P11Cipher.java Thu Apr 17 17:20:13 2014 +0100 +++ b/src/share/classes/sun/security/pkcs11/P11Cipher.java Mon Aug 12 02:34:25 2013 -0700 @@ -69,7 +69,7 @@ private static interface Padding { // ENC: format the specified buffer with padding bytes and return the // actual padding length - int setPaddingBytes(byte[] paddingBuffer, int padLen); + int setPaddingBytes(byte[] paddingBuffer, int offset, int padLen); // DEC: return the length of trailing padding bytes given the specified // padded data @@ -90,8 +90,8 @@ this.blockSize = blockSize; } - public int setPaddingBytes(byte[] paddingBuffer, int padLen) { - Arrays.fill(paddingBuffer, 0, padLen, (byte) (padLen & 0x007f)); + public int setPaddingBytes(byte[] paddingBuffer, int offset, int padLen) { + Arrays.fill(paddingBuffer, offset, offset + padLen, (byte) (padLen & 0x007f)); return padLen; } @@ -160,10 +160,16 @@ // original IV, if in MODE_CBC or MODE_CTR private byte[] iv; - // number of bytes buffered internally by the native mechanism and padBuffer - // if we do the padding + // number of bytes buffered by the blockBuffer private int bytesBuffered; + // number of bytes buffered internally + private int bytesBufferedInt; + + // bytes buffered from an incomplete block + private byte[] blockBuffer; + private int blockBufferLen; + P11Cipher(Token token, String algorithm, long mechanism) throws PKCS11Exception, NoSuchAlgorithmException { super(); @@ -194,6 +200,9 @@ // should not happen throw new ProviderException(nspe); } + + if (blockSize > 0) + blockBuffer = new byte[blockSize]; } protected void engineSetMode(String mode) throws NoSuchAlgorithmException { @@ -403,7 +412,8 @@ token.p11.C_DecryptFinal(session.id(), 0, buffer, 0, bufLen); } } catch (PKCS11Exception e) { - throw new ProviderException("Cancel failed", e); + if (e.getErrorCode() != CKR_OPERATION_NOT_INITIALIZED) + throw new ProviderException("Cancel failed", e); } finally { reset(); } @@ -435,7 +445,9 @@ throw ex; } bytesBuffered = 0; + bytesBufferedInt = 0; padBufferLen = 0; + blockBufferLen = 0; initialized = true; } @@ -445,7 +457,7 @@ return 0; } - int result = inLen + bytesBuffered; + int result = inLen + bytesBuffered + bytesBufferedInt; if (blockSize != 0) { // minus the number of bytes in the last incomplete block. result -= (result & (blockSize - 1)); @@ -459,7 +471,7 @@ return 0; } - int result = inLen + bytesBuffered; + int result = inLen + bytesBuffered + bytesBufferedInt; if (blockSize != 0 && encrypt && paddingType != PAD_NONE) { // add the number of bytes to make the last block complete. result += (blockSize - (result & (blockSize - 1))); @@ -471,7 +483,9 @@ private void reset() { initialized = false; bytesBuffered = 0; + bytesBufferedInt = 0; padBufferLen = 0; + blockBufferLen = 0; if (session != null) { session = token.releaseSession(session); } @@ -546,50 +560,65 @@ } try { ensureInitialized(); - int k = 0; - if (encrypt) { - k = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, inLen, - 0, out, outOfs, outLen); - } else { - int newPadBufferLen = 0; - if (paddingObj != null) { - if (padBufferLen != 0) { - // NSS throws up when called with data not in multiple - // of blocks. Try to work around this by holding the - // extra data in padBuffer. - if (padBufferLen != padBuffer.length) { - int bufCapacity = padBuffer.length - padBufferLen; - if (inLen > bufCapacity) { - bufferInputBytes(in, inOfs, bufCapacity); - inOfs += bufCapacity; - inLen -= bufCapacity; - } else { - bufferInputBytes(in, inOfs, inLen); - return 0; - } - } - k = token.p11.C_DecryptUpdate(session.id(), - 0, padBuffer, 0, padBufferLen, - 0, out, outOfs, outLen); - padBufferLen = 0; - } - newPadBufferLen = inLen & (blockSize - 1); - if (newPadBufferLen == 0) { - newPadBufferLen = padBuffer.length; - } - inLen -= newPadBufferLen; - } - if (inLen > 0) { - k += token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, - inLen, 0, out, (outOfs + k), (outLen - k)); - } - // update 'padBuffer' if using our own padding impl. - if (paddingObj != null) { - bufferInputBytes(in, inOfs + inLen, newPadBufferLen); - } - } - bytesBuffered += (inLen - k); - return k; + int bufRes = 0; + int inRes = 0; + int newBlockBufferLen = 0; + + // NSS throws up when called with data not in multiple + // of blocks. Try to work around this by holding the + // extra data in blockBuffer. + if (blockBufferLen != 0) { + if (blockBufferLen != blockBuffer.length) { + int bufCapacity = blockBuffer.length - blockBufferLen; + if (inLen >= bufCapacity) { + bufferInputBytes(in, inOfs, bufCapacity); + inOfs += bufCapacity; + inLen -= bufCapacity; + } else { + bufferInputBytes(in, inOfs, inLen); + return 0; + } + } + if (encrypt) { + bufRes = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, + blockBufferLen, 0, out, outOfs, + outLen); + } else { + bufRes = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, + blockBufferLen, 0, out, outOfs, + outLen); + } + bytesBufferedInt += (blockBufferLen - bufRes); + blockBufferLen = 0; + bytesBuffered = 0; + } + + if (inLen == 0) + return bufRes; + + if (blockBuffer != null) { + newBlockBufferLen = inLen & (blockSize - 1); + if (!encrypt && paddingObj != null && newBlockBufferLen == 0) + // Hold the last block in the buffer if we need to unpad + newBlockBufferLen = blockBuffer.length; + inLen -= newBlockBufferLen; + bufferInputBytes(in, inOfs + inLen, newBlockBufferLen); + } + + if (inLen > 0) { + if (encrypt) { + inRes = token.p11.C_EncryptUpdate(session.id(), 0, in, inOfs, + inLen, 0, out, (outOfs + bufRes), + (outLen - bufRes)); + } else { + inRes = token.p11.C_DecryptUpdate(session.id(), 0, in, inOfs, + inLen, 0, out, (outOfs + bufRes), + (outLen - bufRes)); + } + bytesBufferedInt += (inLen - inRes); + } + + return inRes + bufRes; } catch (PKCS11Exception e) { if (e.getErrorCode() == CKR_BUFFER_TOO_SMALL) { throw (ShortBufferException) @@ -642,70 +671,79 @@ } } - int k = 0; - if (encrypt) { - if (inAddr == 0 && inArray == null) { - inArray = new byte[inLen]; - inBuffer.get(inArray); - } else { - inBuffer.position(origPos + inLen); - } - k = token.p11.C_EncryptUpdate(session.id(), - inAddr, inArray, inOfs, inLen, - outAddr, outArray, outOfs, outLen); - } else { - int newPadBufferLen = 0; - if (paddingObj != null) { - if (padBufferLen != 0) { - // NSS throws up when called with data not in multiple - // of blocks. Try to work around this by holding the - // extra data in padBuffer. - if (padBufferLen != padBuffer.length) { - int bufCapacity = padBuffer.length - padBufferLen; - if (inLen > bufCapacity) { - bufferInputBytes(inBuffer, bufCapacity); - inOfs += bufCapacity; - inLen -= bufCapacity; - } else { - bufferInputBytes(inBuffer, inLen); - return 0; - } - } - k = token.p11.C_DecryptUpdate(session.id(), 0, - padBuffer, 0, padBufferLen, outAddr, outArray, - outOfs, outLen); - padBufferLen = 0; - } - newPadBufferLen = inLen & (blockSize - 1); - if (newPadBufferLen == 0) { - newPadBufferLen = padBuffer.length; - } - inLen -= newPadBufferLen; - } - if (inLen > 0) { - if (inAddr == 0 && inArray == null) { - inArray = new byte[inLen]; - inBuffer.get(inArray); - } else { - inBuffer.position(inBuffer.position() + inLen); - } - k += token.p11.C_DecryptUpdate(session.id(), inAddr, - inArray, inOfs, inLen, outAddr, outArray, - (outOfs + k), (outLen - k)); - } - // update 'padBuffer' if using our own padding impl. - if (paddingObj != null && newPadBufferLen != 0) { - bufferInputBytes(inBuffer, newPadBufferLen); - } - } - bytesBuffered += (inLen - k); + int bufRes = 0; + int inRes = 0; + int newBlockBufferLen = 0; + + // NSS throws up when called with data not in multiple + // of blocks. Try to work around this by holding the + // extra data in blockBuffer. + if (blockBufferLen != 0) { + if (blockBufferLen != blockBuffer.length) { + int bufCapacity = blockBuffer.length - blockBufferLen; + if (inLen >= bufCapacity) { + bufferInputBytes(inBuffer, bufCapacity); + inOfs += bufCapacity; + inLen -= bufCapacity; + } else { + bufferInputBytes(inBuffer, inLen); + return 0; + } + } + if (encrypt) { + bufRes = token.p11.C_EncryptUpdate(session.id(), 0, blockBuffer, 0, + blockBufferLen, outAddr, outArray, outOfs, + outLen); + } else { + bufRes = token.p11.C_DecryptUpdate(session.id(), 0, blockBuffer, 0, + blockBufferLen, outAddr, outArray, outOfs, + outLen); + } + bytesBufferedInt += (blockBufferLen - bufRes); + blockBufferLen = 0; + bytesBuffered = 0; + } + + if (inLen == 0) + return bufRes; + + if (blockBuffer != null) { + newBlockBufferLen = inLen & (blockSize - 1); + if (!encrypt && paddingObj != null && newBlockBufferLen == 0) + // Hold the last block in the buffer if we need to unpad + newBlockBufferLen = blockBuffer.length; + inLen -= newBlockBufferLen; + bufferInputBytes(inBuffer, newBlockBufferLen); + } + + if (inAddr == 0 && inArray == null) { + inArray = new byte[inLen]; + inBuffer.get(inArray); + } else { + inBuffer.position(inBuffer.position() + inLen); + } + + if (inLen > 0) { + if (encrypt) { + inRes = token.p11.C_EncryptUpdate(session.id(), inAddr, inArray, inOfs, + inLen, outAddr, outArray, (outOfs + bufRes), + (outLen - bufRes)); + } else { + inRes = token.p11.C_DecryptUpdate(session.id(), inAddr, inArray, inOfs, + inLen, outAddr, outArray, (outOfs + bufRes), + (outLen - bufRes)); + } + bytesBufferedInt += (inLen - inRes); + } + + int total = inRes + bufRes; if (!(outBuffer instanceof DirectBuffer) && !outBuffer.hasArray()) { - outBuffer.put(outArray, outOfs, k); + outBuffer.put(outArray, outOfs, total); } else { - outBuffer.position(outBuffer.position() + k); + outBuffer.position(outBuffer.position() + total); } - return k; + return total; } catch (PKCS11Exception e) { // Reset input buffer to its original position for inBuffer.position(origPos); @@ -722,45 +760,71 @@ throws ShortBufferException, IllegalBlockSizeException, BadPaddingException { int requiredOutLen = doFinalLength(0); + boolean updating = false; + PKCS11Exception err = null; + if (outLen < requiredOutLen) { throw new ShortBufferException(); } try { ensureInitialized(); int k = 0; - if (encrypt) { - if (paddingObj != null) { - int actualPadLen = paddingObj.setPaddingBytes(padBuffer, - requiredOutLen - bytesBuffered); - k = token.p11.C_EncryptUpdate(session.id(), - 0, padBuffer, 0, actualPadLen, - 0, out, outOfs, outLen); - } + if (encrypt) { + if (blockBuffer != null) { + // Do we need to pad? + if (paddingObj != null) { + int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, + blockBufferLen, blockSize - blockBufferLen); + blockBufferLen = blockSize; + } + updating = true; + k = token.p11.C_EncryptUpdate(session.id(), + 0, blockBuffer, 0, blockBufferLen, + 0, out, outOfs, outLen); + updating = false; + } k += token.p11.C_EncryptFinal(session.id(), 0, out, (outOfs + k), (outLen - k)); } else { + if (blockBufferLen != 0) { + if (paddingObj == null) + k = token.p11.C_DecryptUpdate(session.id(), 0, + blockBuffer, 0, blockBufferLen, 0, + out, outOfs, outLen); + else + k = token.p11.C_DecryptUpdate(session.id(), 0, + blockBuffer, 0, blockBufferLen, 0, + padBuffer, 0, padBuffer.length); + } if (paddingObj != null) { - if (padBufferLen != 0) { - k = token.p11.C_DecryptUpdate(session.id(), 0, - padBuffer, 0, padBufferLen, 0, padBuffer, 0, - padBuffer.length); - } k += token.p11.C_DecryptFinal(session.id(), 0, padBuffer, k, padBuffer.length - k); int actualPadLen = paddingObj.unpad(padBuffer, k); k -= actualPadLen; System.arraycopy(padBuffer, 0, out, outOfs, k); } else { - k = token.p11.C_DecryptFinal(session.id(), 0, out, outOfs, - outLen); + k += token.p11.C_DecryptFinal(session.id(), 0, out, (outOfs + k), + (outLen - k)); } } return k; } catch (PKCS11Exception e) { + err = e; handleException(e); throw new ProviderException("doFinal() failed", e); } finally { - reset(); + if (err != null) { + if (err.getErrorCode() != CKR_BUFFER_TOO_SMALL) { + if (updating) + // Work around NSS not cancelling the + // operation on an error in update + cancelOperation(); + else + reset(); + } + } else { + reset(); + } } } @@ -769,6 +833,9 @@ BadPaddingException { int outLen = outBuffer.remaining(); int requiredOutLen = doFinalLength(0); + boolean updating = false; + PKCS11Exception err = null; + if (outLen < requiredOutLen) { throw new ShortBufferException(); } @@ -793,24 +860,34 @@ int k = 0; - if (encrypt) { - if (paddingObj != null) { - int actualPadLen = paddingObj.setPaddingBytes(padBuffer, - requiredOutLen - bytesBuffered); - k = token.p11.C_EncryptUpdate(session.id(), - 0, padBuffer, 0, actualPadLen, - outAddr, outArray, outOfs, outLen); - } + if (encrypt) { + if (blockBuffer != null) { + // Do we need to pad? + if (paddingObj != null) { + int actualPadLen = paddingObj.setPaddingBytes(blockBuffer, + blockBufferLen, blockSize - blockBufferLen); + blockBufferLen = blockSize; + } + updating = true; + k = token.p11.C_EncryptUpdate(session.id(), + 0, blockBuffer, 0, blockBufferLen, + outAddr, outArray, outOfs, outLen); + updating = false; + } k += token.p11.C_EncryptFinal(session.id(), outAddr, outArray, (outOfs + k), (outLen - k)); - } else { + } else { + if (blockBufferLen != 0) { + k = token.p11.C_DecryptUpdate(session.id(), 0, + blockBuffer, 0, blockBufferLen, outAddr, + outArray, outOfs, outLen); + } else { + k = token.p11.C_DecryptUpdate(session.id(), 0, + blockBuffer, 0, blockBufferLen, 0, + padBuffer, 0, padBuffer.length); + } + if (paddingObj != null) { - if (padBufferLen != 0) { - k = token.p11.C_DecryptUpdate(session.id(), - 0, padBuffer, 0, padBufferLen, - 0, padBuffer, 0, padBuffer.length); - padBufferLen = 0; - } k += token.p11.C_DecryptFinal(session.id(), 0, padBuffer, k, padBuffer.length - k); int actualPadLen = paddingObj.unpad(padBuffer, k); @@ -819,7 +896,8 @@ outOfs = 0; From bugzilla-daemon at icedtea.classpath.org Thu May 22 17:33:25 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 22 May 2014 17:33:25 +0000 Subject: [Bug 1781] [IcedTea7] NSS PKCS11 provider fails to handle multipart AES encryption In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1781 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/release/icedtea7-forest-2.4/jdk?cmd=changeset;node=b4fc2a92ae21 author: andrew date: Wed May 21 15:25:53 2014 +0100 PR1781: NSS PKCS11 provider fails to handle multipart AES encryption -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkang at redhat.com Thu May 22 18:36:26 2014 From: jkang at redhat.com (Jie Kang) Date: Thu, 22 May 2014 14:36:26 -0400 (EDT) Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <532569083.6319208.1400783307553.JavaMail.zimbra@redhat.com> References: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> <537D0CDC.5010003@redhat.com> <537D0FCF.4030302@redhat.com> <1181312707.6154417.1400764988442.JavaMail.zimbra@redhat.com> <537DFC21.8040706@redhat.com> <532569083.6319208.1400783307553.JavaMail.zimbra@redhat.com> Message-ID: <1850344499.6322816.1400783786732.JavaMail.zimbra@redhat.com> Hello, You are right that the UI is a bit inconsistent there. I actually thought the Reload pane would pop-up after deletion but there is no check for the FileNotFound exception inside checkPolicyChangesWithDialog(). I have made the appropriate adjustments and attached it to the patch file. Following is the revised changelog. 2014-05-20 Jie Kang * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save (savePolicyFile): no longer immediately returns if changesMade is false (updateMd5WithDialog): use changesMade along with file MD5 sum changes to determine whether to continue saving to disk, added check for FileNotFound and displays warning message telling user what has happened, also privatized method and renamed method to checkPolicyChangesWithDialog * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java Removed unused imports. * netx/net/sourceforge/jnlp/resources/Message.properties (PEFileMissing) Added new warning message for PolicyEditor Thanks, ----- Original Message ----- From: "Andrew Azores" To: "Jie Kang" Cc: distro-pkg-dev at openjdk.java.net Sent: Thursday, May 22, 2014 9:31:13 AM Subject: Re: [rfc][icedtea-web] PolicyEditor Save As Changes Thank you! I was able to confirm the flawed behaviour and that your patch resolves the problems. However, I think the UI feels a little funny in the case of the file being deleted by another process. If the file is modified then we prompt the user informing them and asking if they'd like to first reload/re-edit, or overwrite, or just cancel. If the file has disappeared from disk, then it just saves as usual, and the standard "Changes Saved" dialog appears. This is /okay/, and there's no point in showing the "Reload file?" dialog if the file is gone, but perhaps there should be a warning dialog that informs the user that their file has mysteriously disappeared from the disk, even though it used to be there? Anyway this is just a hint at a possible feature enhancement, if you disagree with this UI change let me know and this patch can go in as-is. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyeditor-saveas.patch Type: text/x-patch Size: 4485 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Thu May 22 19:23:17 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 22 May 2014 19:23:17 +0000 Subject: [Bug 1786] New: [IcedTea7] Allow x86 build to occur on x86_64 using a previously built x86_64 build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1786 Bug ID: 1786 Summary: [IcedTea7] Allow x86 build to occur on x86_64 using a previously built x86_64 build Product: IcedTea Version: 7-hg Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org With a few minor fixes, an x86 build can be made on x86_64, reusing an earlier x86_64 build to avoid rebuilding the pure Java CORBA/JAXP/JAXWS/langtools and many of the Java classes in the JDK which don't change. These fixes are: 1. Allow CROSS_COMPILE_ARCH to be used on OPENJDK builds (currently looks in a closed source directory for NIO files) 2. Use a different object directory for 32-bit vs. 64-bit object files for the demo code, as is already the case with the native JDK code. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 22 19:25:15 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 22 May 2014 19:25:15 +0000 Subject: [Bug 1698] [TRACKER] IcedTea 2.6.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1698 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1786 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 22 19:25:15 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 22 May 2014 19:25:15 +0000 Subject: [Bug 1786] [IcedTea7] Allow x86 build to occur on x86_64 using a previously built x86_64 build In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1786 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1698 Target Milestone|--- |2.6.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Thu May 22 19:41:43 2014 From: aazores at redhat.com (Andrew Azores) Date: Thu, 22 May 2014 15:41:43 -0400 Subject: [rfc][icedtea-web] PolicyEditor Save As Changes In-Reply-To: <1850344499.6322816.1400783786732.JavaMail.zimbra@redhat.com> References: <2073318574.5898467.1400700766987.JavaMail.zimbra@redhat.com> <537D0CDC.5010003@redhat.com> <537D0FCF.4030302@redhat.com> <1181312707.6154417.1400764988442.JavaMail.zimbra@redhat.com> <537DFC21.8040706@redhat.com> <532569083.6319208.1400783307553.JavaMail.zimbra@redhat.com> <1850344499.6322816.1400783786732.JavaMail.zimbra@redhat.com> Message-ID: <537E52F7.40303@redhat.com> On 05/22/2014 02:36 PM, Jie Kang wrote: > Hello, > > You are right that the UI is a bit inconsistent there. I actually thought the Reload pane would pop-up after deletion but there is no check for the FileNotFound exception inside checkPolicyChangesWithDialog(). I have made the appropriate adjustments and attached it to the patch file. Following is the revised changelog. > > 2014-05-20 Jie Kang > > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java > (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save > (savePolicyFile): no longer immediately returns if changesMade is false > (updateMd5WithDialog): use changesMade along with file MD5 sum changes to determine > whether to continue saving to disk, added check for FileNotFound and displays > warning message telling user what has happened, also privatized method and > renamed method to checkPolicyChangesWithDialog > * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java > Removed unused imports. > * netx/net/sourceforge/jnlp/resources/Message.properties > (PEFileMissing) Added new warning message for PolicyEditor > > > Thanks, > > ----- Original Message ----- > From: "Andrew Azores" > To: "Jie Kang" > Cc: distro-pkg-dev at openjdk.java.net > Sent: Thursday, May 22, 2014 9:31:13 AM > Subject: Re: [rfc][icedtea-web] PolicyEditor Save As Changes > > Thank you! I was able to confirm the flawed behaviour and that your > patch resolves the problems. However, I think the UI feels a little > funny in the case of the file being deleted by another process. If the > file is modified then we prompt the user informing them and asking if > they'd like to first reload/re-edit, or overwrite, or just cancel. If > the file has disappeared from disk, then it just saves as usual, and the > standard "Changes Saved" dialog appears. This is /okay/, and there's no > point in showing the "Reload file?" dialog if the file is gone, but > perhaps there should be a warning dialog that informs the user that > their file has mysteriously disappeared from the disk, even though it > used to be there? Anyway this is just a hint at a possible feature > enhancement, if you disagree with this UI change let me know and this > patch can go in as-is. > > Thanks, > This is excellent. I'm not 100% happy with the wording on the new "file missing" dialog, but I'm just being overly picky now. Thanks, -- Andrew A From aazores at icedtea.classpath.org Thu May 22 19:45:54 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Thu, 22 May 2014 19:45:54 +0000 Subject: /hg/icedtea-web: PolicyEditor fixes for Save As Message-ID: changeset 4e236cc7181c in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=4e236cc7181c author: Andrew Azores date: Thu May 22 15:45:37 2014 -0400 PolicyEditor fixes for Save As PolicyEditor can be made to Save As to a different file than the current file, without extra changes having to be made first in the editor. Additionally, if the file is deleted from the disk by another process, PolicyEditor will save over the file rather than again requiring the user make changes. 2014-05-22 Jie Kang * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save (savePolicyFile): no longer immediately returns if changesMade is false (updateMd5WithDialog): use changesMade along with file MD5 sum changes to determine whether to continue saving to disk, added check for FileNotFound and displays warning message telling user what has happened, also privatized method and renamed method to checkPolicyChangesWithDialog * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java: Removed unused imports. * netx/net/sourceforge/jnlp/resources/Message.properties (PEFileMissing): Added new warning message for PolicyEditor diffstat: ChangeLog | 13 ++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 1 + netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java | 27 ++++++--- netx/net/sourceforge/jnlp/util/MD5SumWatcher.java | 5 - 4 files changed, 32 insertions(+), 14 deletions(-) diffs (118 lines): diff -r 0c7dcde1cfe0 -r 4e236cc7181c ChangeLog --- a/ChangeLog Thu May 22 18:30:41 2014 +0200 +++ b/ChangeLog Thu May 22 15:45:37 2014 -0400 @@ -1,3 +1,16 @@ +2014-05-22 Jie Kang + + * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java + (saveAsButtonAction): set changesMade to true to allow savePolicyFile to save + (savePolicyFile): no longer immediately returns if changesMade is false + (updateMd5WithDialog): use changesMade along with file MD5 sum changes to + determine whether to continue saving to disk, added check for FileNotFound and + displays warning message telling user what has happened, also privatized + method and renamed method to checkPolicyChangesWithDialog + * netx/net/sourceforge/jnlp/util/MD5SumWatcher.java: Removed unused imports. + * netx/net/sourceforge/jnlp/resources/Message.properties (PEFileMissing): Added + new warning message for PolicyEditor + 2014-05-21 Jiri Vanek Fixed slipped test classlaoder fix diff -r 0c7dcde1cfe0 -r 4e236cc7181c netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Thu May 22 18:30:41 2014 +0200 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Thu May 22 15:45:37 2014 -0400 @@ -574,6 +574,7 @@ PECustomPermissionsItem=Custom Permissions... PEFileModified=File Modification Warning PEFileModifiedDetail=The policy file at {0} has been modified since it was opened. Reload and re-edit before saving? +PEFileMissing=The policy file was missing from disk. A new file has been saved with the same name. PEGAccesUnowenedCode = Execute unowned code PEGMediaAccess = Media access PEGrightClick = right click to fold/unfold diff -r 0c7dcde1cfe0 -r 4e236cc7181c netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java --- a/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java Thu May 22 18:30:41 2014 +0200 +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java Thu May 22 15:45:37 2014 -0400 @@ -312,6 +312,7 @@ final int choice = fileChooser.showSaveDialog(weakThis.get()); if (choice == JFileChooser.APPROVE_OPTION) { file = fileChooser.getSelectedFile(); + changesMade = true; savePolicyFile(); } } @@ -1276,14 +1277,11 @@ * Save the policy model into the file pointed to by the filePath field. */ private void savePolicyFile() { - if (!changesMade) { - return; - } new Thread() { @Override public void run() { try { - final int response = updateMd5WithDialog(); + final int response = checkPolicyChangesWithDialog(); switch (response) { case JOptionPane.YES_OPTION: openAndParsePolicyFile(); @@ -1377,22 +1375,33 @@ } /** - * Detect if the file's MD5 has changed. If so, track its new sum, and prompt the user on how to proceed - * @return the user's choice (Yes/No/Cancel - see JOptionPane constants). "No" if the file hasn't changed. - * @throws FileNotFoundException if the watched file does not exist + * Detect if the policy settings have changed, either on-disk or in-app. + * If an on-disk change has occurred, update the Md5. + * @return The user's choice (Yes/No/Cancel - see JOptionPane constants). + * "Cancel" if the file hasn't changed but the user has made modifications + * to the settings. "No" otherwise * @throws IOException if the file cannot be read */ - public int updateMd5WithDialog() throws FileNotFoundException, IOException { + private int checkPolicyChangesWithDialog() throws IOException { if (fileWatcher == null) { if (file != null) { fileWatcher = new MD5SumWatcher(file); } return JOptionPane.NO_OPTION; } - final boolean changed = fileWatcher.update(); + boolean changed; + try { + changed = fileWatcher.update(); + } catch (FileNotFoundException e){ + JOptionPane.showMessageDialog(weakThis.get(), R("PEFileMissing"), R("PEFileModified"), JOptionPane.WARNING_MESSAGE); + return JOptionPane.NO_OPTION; + } if (changed) { return JOptionPane.showConfirmDialog(weakThis.get(), R("PEFileModifiedDetail", file.getCanonicalPath()), R("PEFileModified"), JOptionPane.YES_NO_CANCEL_OPTION); + } else if (!changesMade) { + //Return without saving or reloading + return JOptionPane.CANCEL_OPTION; } return JOptionPane.NO_OPTION; } diff -r 0c7dcde1cfe0 -r 4e236cc7181c netx/net/sourceforge/jnlp/util/MD5SumWatcher.java --- a/netx/net/sourceforge/jnlp/util/MD5SumWatcher.java Thu May 22 18:30:41 2014 +0200 +++ b/netx/net/sourceforge/jnlp/util/MD5SumWatcher.java Thu May 22 15:45:37 2014 -0400 @@ -36,17 +36,12 @@ package net.sourceforge.jnlp.util; -import static net.sourceforge.jnlp.runtime.Translator.R; - import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.security.NoSuchAlgorithmException; import java.util.Arrays; -import javax.swing.JFrame; -import javax.swing.JOptionPane; - import net.sourceforge.jnlp.util.logging.OutputController; public class MD5SumWatcher { From ldracz at redhat.com Thu May 22 20:22:42 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Thu, 22 May 2014 16:22:42 -0400 (EDT) Subject: [rfc][icedtea-web] Headless Security Dialogs In-Reply-To: <1280866281.6361656.1400789381232.JavaMail.zimbra@redhat.com> Message-ID: <1867279840.6366267.1400790162906.JavaMail.zimbra@redhat.com> Hello, This patch is aimed at fixing the bug PR 1764 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1764 I have added checks for the headless parameter and based on the user's security level setting for extended applets it decides whether to allow or disallow an app to run. I have attached a document in .odt file format with an overview and justifications or assumptions for the decisions I have made. If a different file format is required feel free to message me and I will do my best to get you the document in a format readable for you. Any suggestions or comments would be appreciated. 2014-05-21 Lukasz Dracz * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: added checks for headless, and a behaviour based on the security dialog and security level as to whether allow or disallow an app to run Thanks, Lukasz Dracz -------------- next part -------------- A non-text attachment was scrubbed... Name: SecurityDialogs-Headless-P2.patch Type: text/x-patch Size: 9843 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Headless-Jusitifications-04.odt Type: application/vnd.oasis.opendocument.text Size: 24282 bytes Desc: not available URL: From ptisnovs at icedtea.classpath.org Fri May 23 06:16:13 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 23 May 2014 06:16:13 +0000 Subject: /hg/rhino-tests: Ten new tests added into SimpleBindingsTest. Message-ID: changeset 946d61915104 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=946d61915104 author: ptisnovs date: Fri May 23 08:16:04 2014 +0200 Ten new tests added into SimpleBindingsTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/SimpleBindingsTest.java | 140 +++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 0 deletions(-) diffs (162 lines): diff -r 67c8a396f43f -r 946d61915104 ChangeLog --- a/ChangeLog Tue May 20 09:12:11 2014 +0200 +++ b/ChangeLog Fri May 23 08:16:04 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-23 Pavel Tisnovsky + + * src/org/RhinoTests/SimpleBindingsTest.java: + Ten new tests added into SimpleBindingsTest. + 2014-05-20 Pavel Tisnovsky * src/org/RhinoTests/SimpleScriptContextTest.java: diff -r 67c8a396f43f -r 946d61915104 src/org/RhinoTests/SimpleBindingsTest.java --- a/src/org/RhinoTests/SimpleBindingsTest.java Tue May 20 09:12:11 2014 +0200 +++ b/src/org/RhinoTests/SimpleBindingsTest.java Fri May 23 08:16:04 2014 +0200 @@ -217,6 +217,146 @@ } /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative6() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + try { + simpleBindings.containsKey(null); + } + catch (NullPointerException e) { + return; + } + throw new Exception("NPE did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative7() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + try { + simpleBindings.containsKey(""); + } + catch (IllegalArgumentException e) { + return; + } + throw new Exception("IllegalArgumentException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative8() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + try { + simpleBindings.containsKey(new Integer(42)); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative9() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + try { + simpleBindings.containsKey(java.awt.Color.GREEN); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative10() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new HashMap()); + try { + simpleBindings.containsKey(this); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative11() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + try { + simpleBindings.containsKey(null); + } + catch (NullPointerException e) { + return; + } + throw new Exception("NPE did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative12() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + try { + simpleBindings.containsKey(""); + } + catch (IllegalArgumentException e) { + return; + } + throw new Exception("IllegalArgumentException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative13() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + try { + simpleBindings.containsKey(new Integer(42)); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative14() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + try { + simpleBindings.containsKey(java.awt.Color.GREEN); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** + * Test for method containsKey(String) + */ + protected void testContainsKeyNegative15() throws Exception { + SimpleBindings simpleBindings = new SimpleBindings(new TreeMap()); + try { + simpleBindings.containsKey(this); + } + catch (ClassCastException e) { + return; + } + throw new Exception("ClassCastException did not thrown as expected"); + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From ptisnovs at icedtea.classpath.org Fri May 23 06:25:32 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 23 May 2014 06:25:32 +0000 Subject: /hg/rhino-tests: Ten new tests added into ScriptContextTest. Message-ID: changeset ac41c65e3bb9 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=ac41c65e3bb9 author: ptisnovs date: Fri May 23 08:25:17 2014 +0200 Ten new tests added into ScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptContextTest.java | 159 ++++++++++++++++++++++++++++++ 2 files changed, 164 insertions(+), 0 deletions(-) diffs (181 lines): diff -r 946d61915104 -r ac41c65e3bb9 ChangeLog --- a/ChangeLog Fri May 23 08:16:04 2014 +0200 +++ b/ChangeLog Fri May 23 08:25:17 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-23 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextTest.java: + Ten new tests added into ScriptContextTest. + 2014-05-23 Pavel Tisnovsky * src/org/RhinoTests/SimpleBindingsTest.java: diff -r 946d61915104 -r ac41c65e3bb9 src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Fri May 23 08:16:04 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Fri May 23 08:25:17 2014 +0200 @@ -555,6 +555,165 @@ } /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute29() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", "", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute30() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("name", null, INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute31() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "value", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute32() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", "", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute33() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute("", null, INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute34() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "value", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute35() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, "", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute36() { + // tested object + ScriptContext object = new SimpleScriptContext(); + try { + object.setAttribute(null, null, INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute37() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("name", "value", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute38() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("name", "", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + } + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From helpcrypto at gmail.com Fri May 23 07:53:36 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Fri, 23 May 2014 09:53:36 +0200 Subject: Painting issues with "autosize". My fault? Your fault? In-Reply-To: <537CBE81.2050907@redhat.com> References: <537CBE81.2050907@redhat.com> Message-ID: Thanks as usual, Jiri. I'll prepare the test and fill a bug as soon as I can...very busy days at work (why the TODO list is always growing faster than the DONE list???) Have a great weekend. On Wed, May 21, 2014 at 4:56 PM, Jiri Vanek wrote: > On 05/16/2014 09:43 AM, helpcrypto helpcrypto wrote: > >> Hi. >> >> >> Before filling a bug, I would like to ask if I'm doing it properly. >> >> Consider the following scenario: >> -Dialog+BorderLayout+center JPanel with JLabel >> >> In runtime I modify the label from "" to "lorem ipsum..." >> (The lorem ipsum part are several paragraphs) >> And do pack() and repaint(). >> >> *The objective is to automatically resize the dialog depending on panels >> contents* >> >> >> >> Using ORACLE JRE the dialog is redrawn to fit the content, but this is >> not happening on icedtea-web, so part of the text is hidden under north, >> south, east and west panels. >> >> Did I explained myself properly? >> Should I file a bug and attach a test case or I must do it another way? >> >> >> > > Yes this sounds like a bug. But From desciption is not clear wheter it is > IcedTea-Web or Openjdk. > > It is worthy to try openjdk 6 / 7 / 8 snd proprietary plugin and > Proprietary JDK 7/8 and icedtea-web to eliminate dead branches. > > And hence you see it in Jdialog I suspect OpenJDK itself. Not Icedtea web. > > Was the window manager always the same? > > Are you able to prepare minimalistic reproducer? ( I guess main class with > few lines of jdialog setup). ? > > Then we can try on various JDKS for you. > > J. > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jvanek at redhat.com Fri May 23 07:54:17 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 23 May 2014 09:54:17 +0200 Subject: [rfc][icedtea-web] Headless Security Dialogs In-Reply-To: <1867279840.6366267.1400790162906.JavaMail.zimbra@redhat.com> References: <1867279840.6366267.1400790162906.JavaMail.zimbra@redhat.com> Message-ID: <537EFEA9.106@redhat.com> On 05/22/2014 10:22 PM, Lukasz Dracz wrote: > Hello, > > This patch is aimed at fixing the bug PR 1764 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1764 > I have added checks for the headless parameter and based on the user's security level setting for extended applets it > decides whether to allow or disallow an app to run. I have attached a document in .odt file format with an overview > and justifications or assumptions for the decisions I have made. If a different file format is required feel free to message > me and I will do my best to get you the document in a format readable for you. Any suggestions or comments > would be appreciated. > > 2014-05-21 Lukasz Dracz > > * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: > added checks for headless, and a behaviour based on the security dialog > and security level as to whether allow or disallow an app to run > Hi. This is not an review. Jut few evil hints ;) - the odt doccumet - Although I understand why you used it,and it is *good* in this case. I would strongly discourage you aganst posting such binary attachements. Dont forget that distro archives are accesisble from web, and one can simplynot view such ana attachement. Soem paste bin with rich formating, or simple plantext with tabs may serve in similar way. Code - There is huge amount of coypasted code. This must not be. - headless applets are practically nonsense (they run in webpage, in browser, in X mode... :) ) but - most of the dialogs are valid also for javaws. So you should use application instead of appelt, or - better - decide if it is appelt or application what is running - but as those lienes are really for javaws, I would recomamnd usage of "application". - alignment of long lines. .. just think about it :) General hint - does een have snese to use such an dialogues in headles mode? I mean, if the check will return mostly "false" then the app wil not run at all... Also I think this is misusing a AppletSecurityLevel.ALLOW_UNSIGNED in HUGE vector. Andrew A once sugested new item here. Sometink like BLINDLY_TRUST_ALL. I'm hesitating with introduction of this, but it may be better then missus this ALLOW_UNSIGNED J. ps. I generally agree with this patch. From aph at redhat.com Fri May 23 11:18:32 2014 From: aph at redhat.com (Andrew Haley) Date: Fri, 23 May 2014 12:18:32 +0100 Subject: Bug 1710 - Crash SIGSEGV in C2 Compilerthread when compiling one specific method Message-ID: <537F2E88.7070200@redhat.com> I've been thinking about what to do about this bug fix. It has only ever AFAIK been seen in one method. So, I was tempted not to back- port it to OpenJDK6. However, I've looked at it in detail, and there is nothing special about this method. It is a long-running method with nested loops, and it is compiled as an OSR method, with an entry point inside the outermost loop. Apart from that there is nothing special about it, and it seems to me that this bug could trigger with all sorts of code. I don't really know why it does not. It may be that there is some other factor which I can't see. So, it now seems to me that the risk of not applying this patch to OpenJDK 6 is greater than the risk of applying it, and that the patch should be applied to all live versions of OpenJDK. Andrew. net/sf/jasperreports/engine/export/JRGridLayout.horizontallyMergeEmptyCells(IIII)V interpreter_invocation_count: 1 invocation_counter: 10000 backedge_counter: 5020 0 iload_1 1 istore #5 3 fast_iload #5 5 iload_3 6 if_icmpge 174 0 bci: 6 BranchData taken(1) displacement(616) not taken(751) 9 iconst_m1 10 istore #6 12 iconst_0 13 istore #7 15 iload_2 16 istore #8 18 fast_iload2 #8 20 fast_iload #4 22 if_icmpge 124 32 bci: 22 BranchData taken(752) displacement(400) not taken(22547) 25 fast_aaccess_0 26 fast_agetfield 53 29 fast_iload #5 31 aaload 32 fast_iload #8 34 aaload 35 astore #9 37 aload #9 39 invokevirtual 100 64 bci: 39 VirtualCallData count(8245) entries(2) 'net/sf/jasperreports/engine/export/EmptyGridCell'(12423 0.55) 'net/sf/jasperreports/engine/export/ElementGridCell'(1879 0.08) 42 ifeq 68 112 bci: 42 BranchData taken(10124) displacement(136) not taken(12423) 45 fast_iload #6 47 iconst_m1 48 if_icmpne 55 144 bci: 48 BranchData taken(11292) displacement(32) not taken(1131) 51 fast_iload #8 53 istore #6 55 fast_iload #7 57 aload #9 59 invokevirtual 101 176 bci: 59 VirtualCallData count(0) entries(1) 'net/sf/jasperreports/engine/export/EmptyGridCell'(12423 1.00) 62 iadd 63 istore #7 65 goto 118 224 bci: 65 JumpData taken(12423) displacement(184) 68 fast_iload #6 70 iconst_m1 71 if_icmpeq 112 248 bci: 71 BranchData taken(9744) displacement(160) not taken(380) 74 fast_iload2 #8 76 fast_iload #6 78 isub 79 iconst_1 80 if_icmple 112 280 bci: 80 BranchData taken(377) displacement(128) not taken(3) 83 fast_aaccess_0 84 fast_agetfield 53 87 fast_iload #5 89 aaload 90 fast_iload #6 92 aaload 93 astore #10 95 aload #10 97 fast_iload2 #8 99 fast_iload #6 101 isub 102 invokevirtual 102 312 bci: 102 VirtualCallData count(0) entries(1) 'net/sf/jasperreports/engine/export/EmptyGridCell'(3 1.00) 105 aload #10 107 fast_iload #7 109 invokevirtual 103 360 bci: 109 VirtualCallData count(0) entries(1) 'net/sf/jasperreports/engine/export/EmptyGridCell'(3 1.00) 112 iconst_m1 113 istore #6 115 iconst_0 116 istore #7 118 iinc #8 1 121 goto 18 408 bci: 121 JumpData taken(22547) displacement(-376) 124 fast_iload #6 126 iconst_m1 127 if_icmpeq 168 432 bci: 127 BranchData taken(0) displacement(160) not taken(752) 130 fast_iload2 #8 132 fast_iload #6 134 isub 135 iconst_1 136 if_icmple 168 464 bci: 136 BranchData taken(0) displacement(128) not taken(752) 139 fast_aaccess_0 140 fast_agetfield 53 143 fast_iload #5 145 aaload 146 fast_iload #6 148 aaload 149 astore #9 151 aload #9 153 fast_iload2 #8 155 fast_iload #6 157 isub 158 invokevirtual 102 496 bci: 158 VirtualCallData count(0) entries(1) 'net/sf/jasperreports/engine/export/EmptyGridCell'(752 1.00) 161 aload #9 163 fast_iload #7 165 invokevirtual 103 544 bci: 165 VirtualCallData count(0) entries(1) 'net/sf/jasperreports/engine/export/EmptyGridCell'(752 1.00) 168 iinc #5 1 171 goto 3 592 bci: 171 JumpData taken(752) displacement(-592) 174 return ------------------------------------------------------------------------ 6664 172 net.sf.jasperreports.engine.base.JRBaseStyle::getStyle (5 bytes) From jvanek at icedtea.classpath.org Fri May 23 11:38:32 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 23 May 2014 11:38:32 +0000 Subject: /hg/icedtea-web: Minor javadoc enhancements Message-ID: changeset 7703f77be921 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=7703f77be921 author: Jiri Vanek date: Fri May 23 13:38:14 2014 +0200 Minor javadoc enhancements diffstat: ChangeLog | 12 + netx/net/sourceforge/jnlp/cache/CacheEntry.java | 5 +- netx/net/sourceforge/jnlp/cache/CacheUtil.java | 9 + netx/net/sourceforge/jnlp/cache/Resource.java | 7 + netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 14 ++ netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 19 ++- netx/net/sourceforge/jnlp/util/FileUtils.java | 16 +- tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 76 +++++++++-- 8 files changed, 133 insertions(+), 25 deletions(-) diffs (truncated from 541 to 500 lines): diff -r 4e236cc7181c -r 7703f77be921 ChangeLog --- a/ChangeLog Thu May 22 15:45:37 2014 -0400 +++ b/ChangeLog Fri May 23 13:38:14 2014 +0200 @@ -1,3 +1,15 @@ +2014-05-21 Jiri Vanek + + Minor javadoc enhancements + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: added or filled some javadocs + * netx/net/sourceforge/jnlp/cache/CacheUtil.java: same + * netx/net/sourceforge/jnlp/cache/Resource.java: same + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: same + * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java: same + * netx/net/sourceforge/jnlp/util/FileUtils.java: same + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: same + + 2014-05-22 Jie Kang * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java diff -r 4e236cc7181c -r 7703f77be921 netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Thu May 22 15:45:37 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Fri May 23 13:38:14 2014 +0200 @@ -75,6 +75,7 @@ /** * Returns the remote location this entry caches. + * @return URL same as the one on which this entry was created */ public URL getLocation() { return location; @@ -83,7 +84,7 @@ /** * Returns the time in the local system clock that the file was * most recently checked for an update. - * @return + * @return when the item was updated (in ms) */ public long getLastUpdated() { return getLongKey(KEY_LAST_UPDATED); @@ -92,7 +93,7 @@ /** * Sets the time in the local system clock that the file was * most recently checked for an update. - * @param updatedTime + * @param updatedTime the time (in ms) to be set as last updated time */ public void setLastUpdated(long updatedTime) { setLongKey(KEY_LAST_UPDATED, updatedTime); diff -r 4e236cc7181c -r 7703f77be921 netx/net/sourceforge/jnlp/cache/CacheUtil.java --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu May 22 15:45:37 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Fri May 23 13:38:14 2014 +0200 @@ -182,6 +182,7 @@ * Note: Because of how our caching system works, deleting jars of another javaws * process is using them can be quite disasterous. Hence why Launcher creates lock files * and we check for those by calling {@link #okToClearCache()} + * @return true if the cache could be cleared and was cleared */ public static boolean clearCache() { @@ -297,6 +298,9 @@ * Returns whether the resource can be cached as a local file; * if not, then URLConnection.openStream can be used to obtain * the contents. + * @param source the url of resource + * @param version version of resource + * @return whether this resource can be cached */ public static boolean isCacheable(URL source, Version version) { if (source == null) @@ -444,6 +448,7 @@ * * @param source the remote location * @param version the file version to write to + * @return the stream towrite to resource */ public static OutputStream getOutputStream(URL source, Version version) throws IOException { File localFile = getCacheFile(source, version); @@ -456,6 +461,9 @@ * Copies from an input stream to an output stream. On * completion, both streams will be closed. Streams are * buffered automatically. + * @param is stream to read from + * @param os stream to write to + * @throws java.io.IOException if copy fails */ public static void streamCopy(InputStream is, OutputStream os) throws IOException { if (!(is instanceof BufferedInputStream)) @@ -511,6 +519,7 @@ * Waits until the resources are downloaded, while showing a * progress indicator. * + * @param app application instance with context for this resource * @param tracker the resource tracker * @param resources the resources to wait for * @param title name of the download diff -r 4e236cc7181c -r 7703f77be921 netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Thu May 22 15:45:37 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Fri May 23 13:38:14 2014 +0200 @@ -109,8 +109,13 @@ /** * Return a shared Resource object representing the given * location and version. + * @param location final location of resource + * @param requestVersion final version of resource + * @param updatePolicy final policy for updating + * @return new resource, which is already added in resources list */ public static Resource getResource(URL location, Version requestVersion, UpdatePolicy updatePolicy) { + //TODO -rename to create resource? synchronized (resources) { Resource resource = new Resource(location, requestVersion, updatePolicy); @@ -133,6 +138,7 @@ /** * Returns the remote location of the resource. + * @return the same location as the one with which this resource was created */ public URL getLocation() { return location; @@ -378,6 +384,7 @@ /** * Adds the tracker to the list of trackers monitoring this * resource. + * @param tracker to observing resource */ public void addTracker(ResourceTracker tracker) { synchronized (trackers) { diff -r 4e236cc7181c -r 7703f77be921 netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu May 22 15:45:37 2014 -0400 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 23 13:38:14 2014 +0200 @@ -216,6 +216,7 @@ * not required as resources are reclaimed when the tracker is * collected. * + * @param location location of resource to be removed * @throws IllegalResourceDescriptorException if the resource is not being tracked */ public void removeResource(URL location) { @@ -308,6 +309,7 @@ * on each tracker that is monitoring the resource. Do not call * this method with any locks because the listeners may call * back to this ResourceTracker. + * @param resource resource on which event is fired */ protected void fireDownloadEvent(Resource resource) { DownloadListener l[] = null; @@ -407,6 +409,8 @@ * the cache. *

* + * @param location location of resource which stream will be obtained + * @return the stream of the resource * @throws IOException if there was an error opening the stream * @throws IllegalResourceDescriptorException if the resource is not being tracked */ @@ -432,6 +436,7 @@ * @param urls the resources to wait for * @param timeout the time in ms to wait before returning, 0 for no timeout * @return whether the resources downloaded before the timeout + * @throws java.lang.InterruptedException if thread is interrupted * @throws IllegalResourceDescriptorException if the resource is not being tracked */ public boolean waitForResources(URL urls[], long timeout) throws InterruptedException { @@ -481,6 +486,8 @@ * Returns whether a resource is available for use (ie, can be * accessed with the getCacheFile method). * + * @param location the resource location + * @return resource availability * @throws IllegalResourceDescriptorException if the resource is not being tracked */ public boolean checkResource(URL location) { @@ -495,6 +502,7 @@ * by the tracker because the tracker will only prefetch one * resource at a time to conserve system resources. * + * @param location the resource location * @return true if the resource is already downloaded (or an error occurred) * @throws IllegalResourceDescriptorException if the resource is not being tracked */ @@ -784,6 +792,8 @@ /** * Open a URL connection and get the content length and other * fields. + * + * @param resource the resource to initialize */ private void initializeResource(Resource resource) { resource.fireDownloadEvent(); // fire CONNECTING @@ -887,6 +897,10 @@ || result == 308); } + /** + * + * @return whether the return code is OK one - anything except <200,300) + */ public boolean isInvalid() { return (result < 200 || result >= 300); } diff -r 4e236cc7181c -r 7703f77be921 netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java --- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Thu May 22 15:45:37 2014 -0400 +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Fri May 23 13:38:14 2014 +0200 @@ -92,6 +92,9 @@ /** * Create an application instance for the file. This should be done in the * appropriate {@link ThreadGroup} only. + * @param file jnlpfile for which the instance do exists + * @param group thread group to which it belongs + * @param loader loader for this application */ public ApplicationInstance(JNLPFile file, ThreadGroup group, ClassLoader loader) { this.file = file; @@ -103,6 +106,7 @@ /** * Add an Application listener + * @param listener listener to be added */ public void addApplicationListener(ApplicationListener listener) { listeners.add(ApplicationListener.class, listener); @@ -110,6 +114,7 @@ /** * Remove an Application Listener + * @param listener to be removed */ public void removeApplicationListener(ApplicationListener listener) { listeners.remove(ApplicationListener.class, listener); @@ -253,7 +258,8 @@ } /** - * Returns the JNLP file for this task. + * Returns the jnlpfile on which is this application based + * @return JNLP file for this task. */ public JNLPFile getJNLPFile() { return file; @@ -261,6 +267,7 @@ /** * Returns the application title. + * @return the title of this application */ public String getTitle() { return file.getTitle(); @@ -268,6 +275,7 @@ /** * Returns whether the application is running. + * @return state of application */ public boolean isRunning() { return !stopped; @@ -317,6 +325,7 @@ /** * Returns the thread group. * + * @return thread group of this application, unless it is stopped * @throws IllegalStateException if the app is not running */ public ThreadGroup getThreadGroup() throws IllegalStateException { @@ -329,6 +338,7 @@ /** * Returns the classloader. * + * @return the classloader of this application, unless it is stopped * @throws IllegalStateException if the app is not running */ public ClassLoader getClassLoader() throws IllegalStateException { @@ -341,6 +351,7 @@ /** * Adds a window that this application opened. When the * application is disposed, these windows will also be disposed. + * @param window to be added */ protected void addWindow(Window window) { weakWindows.add(window); @@ -348,12 +359,16 @@ } /** - * Returns whether or not this jar is signed. + * Returns whether or not this application is signed. */ public boolean isSigned() { return isSigned; } + /** + * + * @return application context of this instance + */ public AppContext getAppContext() { return appContext; } diff -r 4e236cc7181c -r 7703f77be921 netx/net/sourceforge/jnlp/util/FileUtils.java --- a/netx/net/sourceforge/jnlp/util/FileUtils.java Thu May 22 15:45:37 2014 -0400 +++ b/netx/net/sourceforge/jnlp/util/FileUtils.java Fri May 23 13:38:14 2014 +0200 @@ -527,17 +527,25 @@ return lock; } - /** - * helping dummy method to save String as file +/** + * Method to save String as file in UTF-8 encoding. * - * @param content - * @param f + * @param content which will be saved as it is saved in this String + * @param f file to be saved. No warnings provided * @throws IOException */ public static void saveFile(String content, File f) throws IOException { saveFile(content, f, "utf-8"); } + /** + * Method to save String as file in specified encoding/. + * + * @param content which will be saved as it is saved in this String + * @param f file to be saved. No warnings provided + * @param encoding of output byte representation + * @throws IOException + */ public static void saveFile(String content, File f, String encoding) throws IOException { Writer output = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(f), encoding)); output.write(content); diff -r 4e236cc7181c -r 7703f77be921 tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java --- a/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Thu May 22 15:45:37 2014 -0400 +++ b/tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java Fri May 23 13:38:14 2014 +0200 @@ -134,6 +134,8 @@ * param "port" prints out the port * nothing or number will run server on random(or on number specified) * port in -Dtest.server.dir + * @param args params from commandline. recognized params are port and randomport + * @throws java.lang.Exception if anything happens */ public static void main(String[] args) throws Exception { if (args.length > 0 && args[0].equalsIgnoreCase("port")) { @@ -212,6 +214,7 @@ /** * + * @param port specific port on which this server is accepting requests * @return new not cached iserver instance on random port, * useful for testing application loading from different url then base */ @@ -226,6 +229,8 @@ /** * + * @param dir directory from which server returns resources + * @param port specific port on which this server is accepting requests * @return new not cached iserver instance on random port upon custom www root directory, * useful for testing application loading from different url then base */ @@ -342,7 +347,9 @@ /** * - * @return url pointing to cached server resource. If non singleton instance is running, new is created. + * @throws java.net.MalformedURLException if url for this resource can not be constructed + * @return complete url for this resource on this server + * @param resource relative path pointing to server resource. If non singleton instance is running, new is created. */ public URL getUrl(String resource) throws MalformedURLException { if (server == null) { @@ -355,6 +362,7 @@ /** * * @return url pointing to cached server . If non singleton instance is running, new is created. + * @throws java.net.MalformedURLException */ public URL getUrl() throws MalformedURLException { return getUrl(""); @@ -399,7 +407,7 @@ /** * utility method which can read bytes of any stream * - * @param input stream to be read + * @param is stream to be read * @return individual bytes of resource * @throws IOException if connection can't be established or resource does not exist */ @@ -417,7 +425,8 @@ /** * utility method which can read from any stream as one long String * - * @param input stream + * @param is stream to be read + * @param encoding encoding of this stream * @return stream as string * @throws IOException if connection can't be established or resource does not exist */ @@ -428,7 +437,7 @@ /** * utility method which can read from any stream as one long String * - * @param is + * @param is input stream to read from * @return stream as string * @throws IOException if connection can't be established or resource does not exist */ @@ -439,7 +448,7 @@ /** * utility method which can read bytes of resource from any url * - * @param u + * @param u full url to read from * @return individual bytes of resource * @throws IOException if connection can't be established or resource does not exist */ @@ -465,7 +474,7 @@ /** * utility method which can read string of resource from any url * - * @param u + * @param u full url to read from * @return resource as string * @throws IOException if connection can't be established or resource does * not exist @@ -489,15 +498,24 @@ } /** - * helping dummy method to save String as file + * helping dummy method to save String as file in UTF-8 encoding. * - * @param content - * @param f + * @param content which will be saved as it is saved in this String + * @param f file to be saved. No warnings provided * @throws IOException */ public static void saveFile(String content, File f) throws IOException { FileUtils.saveFile(content, f); } + + /** + * helping dummy method to save String as file in specified encoding/. + * + * @param content which will be saved as it is saved in this String + * @param f file to be saved. No warnings provided + * @param encoding of output byte representation + * @throws IOException + */ public static void saveFile(String content, File f,String encoding) throws IOException { FileUtils.saveFile(content, f, encoding); } @@ -569,14 +587,36 @@ return executeBrowser(string, outClosing, errClosing); } - + /** + * + * @param resource relative resource to be opened in browser for current server instance. + * @return result of browser run + * + */ public ProcessResult executeBrowser(String resource) throws Exception { return executeBrowser(getBrowserParams(), resource); } + + /** + * + * @param resource relative resource to be opened in browser for current server instance. + * @param stdoutl listener for stdout + * @param stderrl listener for stderr + * @return result of browser run + * + */ public ProcessResult executeBrowser(String resource,ContentReaderListener stdoutl,ContentReaderListener stderrl) throws Exception { return executeBrowser(getBrowserParams(), resource, stdoutl, stderrl); } + /** + * + * @param resource elative resource to be opened in browser for current server instance. + * @param stdoutl listeners for stdout + * @param stderrl listeners for stderr + * @return result of browser run + * + */ public ProcessResult executeBrowser(String resource, List stdoutl, List stderrl) throws Exception { return executeBrowser(getBrowserParams(), resource, stdoutl, stderrl); } @@ -651,9 +691,10 @@ } /** - * Ctreate resource on http, on 'localhost' on port on which this instance is running - * @param resource - * @return + * Create resource on http, on 'localhost' on port on which this instance is running + * @param instance of server to return the resource From jvanek at icedtea.classpath.org Fri May 23 12:13:36 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 23 May 2014 12:13:36 +0000 Subject: /hg/icedtea-web: Minor code enhancements: Enum for HEAD and GET,... Message-ID: changeset c97ba9284e7e in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c97ba9284e7e author: Jiri Vanek date: Fri May 23 14:13:26 2014 +0200 Minor code enhancements: Enum for HEAD and GET, urlutils classes moved to UrlUtil diffstat: ChangeLog | 40 ++++- netx/net/sourceforge/jnlp/cache/CacheEntry.java | 40 +-- netx/net/sourceforge/jnlp/cache/CacheUtil.java | 70 +------- netx/net/sourceforge/jnlp/cache/Resource.java | 3 +- netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 61 ++++--- netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 47 +++-- netx/net/sourceforge/jnlp/util/UrlUtils.java | 80 ++++++++- tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java | 15 +- tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java | 3 +- tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java | 21 +- tests/netx/unit/net/sourceforge/jnlp/util/UrlUtilsTest.java | 83 +++++++++- tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java | 20 +- tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java | 5 +- 13 files changed, 299 insertions(+), 189 deletions(-) diffs (truncated from 916 to 500 lines): diff -r 7703f77be921 -r c97ba9284e7e ChangeLog --- a/ChangeLog Fri May 23 13:38:14 2014 +0200 +++ b/ChangeLog Fri May 23 14:13:26 2014 +0200 @@ -1,4 +1,42 @@ -2014-05-21 Jiri Vanek +2014-05-23 Jiri Vanek + + Minor code enhancements: Enum for HEAD and GET, urlutils classes moved to UrlUtils + * netx/net/sourceforge/jnlp/cache/CacheEntry.java: "*" imports replaced by full + ones location, version and properties made final. (isCurrent) rewritten + * netx/net/sourceforge/jnlp/cache/CacheUtil.java: (urlEquals) and (notNullUrlEquals) + and (compare) moved to UrlUtils. (getReadPermission) got javadoc. urlList, keep, + remove colelctions redeclared to diamond + * netx/net/sourceforge/jnlp/cache/Resource.java: adapted imports and calls to + CacheUtil UrlUtils change. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: (requestMethods) hidden into + public inner enum of RequestMethods. prefetchTrackers, queue, downloadOptions, active, + resources, listeners marked final and redeclared with diamond. (getUrlResponseCode) + adapted to new enum, removed javadoc. (getUrlResponseCodeWithRedirectonResult) adapted + to new enum + * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java: file group loader + appContext weakWindows weakWindows made final and redeclared with diamond. Added + override annotations. (shouldCreateShortcut) changed to switch. + * netx/net/sourceforge/jnlp/util/UrlUtils.java: used multi catch where possible. + urlEquals, notNullUrlEquals, compareNullableStrings moved from CacheUtils + * tests/netx/unit/net/sourceforge/jnlp/cache/CacheUtilTest.java: adapted to + CacheUtils->UrlUtils method movement. + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTest.java: assertNotEquals + replaced by assertFalse and equals. Specific versions of JUnit have problems with + notEquals. + * tests/netx/unit/net/sourceforge/jnlp/cache/ResourceTrackerTest.java: Adapted + to new enum. + * tests/netx/unit/net/sourceforge/jnlp/util/UrlUtilsTest.java: added testUrlEquals + verifyNotNullUrlEqualsThrowsExceptionWhenBothArgumentsAreNull + nverifyNotNullUrlEqualsThrowsExceptionWhenFirstArgumentIsNull + verifyNotNullUrlEqualsThrowsExceptionWhenSecondArgumentIsNull + notNullUrlValuesEqualsCaseSensitiveIssuesTest + notNullUrlComapreWithPorts (known to fail), testCompareNullableStrings and + testCompareNullableStrings tests + * tests/test-extensions/net/sourceforge/jnlp/ServerAccess.java: removed unused + imports, used diamonds, removed dead code. + * tests/test-extensions/net/sourceforge/jnlp/TinyHttpdImpl.java: Adapted to new enum. + +2014-05-23 Jiri Vanek Minor javadoc enhancements * netx/net/sourceforge/jnlp/cache/CacheEntry.java: added or filled some javadocs diff -r 7703f77be921 -r c97ba9284e7e netx/net/sourceforge/jnlp/cache/CacheEntry.java --- a/netx/net/sourceforge/jnlp/cache/CacheEntry.java Fri May 23 13:38:14 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/CacheEntry.java Fri May 23 14:13:26 2014 +0200 @@ -16,14 +16,13 @@ package net.sourceforge.jnlp.cache; -import net.sourceforge.jnlp.util.logging.OutputController; import static net.sourceforge.jnlp.runtime.Translator.R; -import java.io.*; -import java.net.*; - -import net.sourceforge.jnlp.*; -import net.sourceforge.jnlp.util.*; +import java.io.File; +import java.net.URL; +import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.util.PropertiesFile; +import net.sourceforge.jnlp.util.logging.OutputController; /** * Describes an entry in the cache. @@ -41,13 +40,13 @@ private static final String KEY_LAST_UPDATED = "last-updated"; /** the remote resource location */ - private URL location; + private final URL location; /** the requested version */ - private Version version; + private final Version version; /** info about the cached file */ - private PropertiesFile properties; + private final PropertiesFile properties; /** * Create a CacheEntry for the resources specified as a remote @@ -152,30 +151,23 @@ /** * Returns whether there is a version of the URL contents in - * the cache and it is up to date. This method may not return - * immediately. + * the cache and it is up to date. * - * @param lastModified + * @param lastModified - current time as get from server (in ms). Mostly value of "Last-Modified" http header'? * @return whether the cache contains the version */ public boolean isCurrent(long lastModified) { boolean cached = isCached(); - if (!cached) + if (!cached) { return false; - + } try { - long remoteModified = lastModified; long cachedModified = Long.parseLong(properties.getProperty(KEY_LAST_MODIFIED)); - - if (remoteModified > 0 && remoteModified <= cachedModified) - return true; - else - return false; - } catch (Exception ex) { - OutputController.getLogger().log(ex);; - - return cached; // if can't connect return whether already in cache + return lastModified > 0 && lastModified <= cachedModified; + } catch (Exception ex){ + OutputController.getLogger().log(ex); + return cached; } } diff -r 7703f77be921 -r c97ba9284e7e netx/net/sourceforge/jnlp/cache/CacheUtil.java --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Fri May 23 13:38:14 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Fri May 23 14:13:26 2014 +0200 @@ -68,49 +68,6 @@ private static final HashMap propertiesLockPool = new HashMap(); /** - * Compares a URL using string compare of its protocol, host, - * port, path, query, and anchor. This method avoids the host - * name lookup that URL.equals does for http: protocol URLs. - * It may not return the same value as the URL.equals method - * (different hostnames that resolve to the same IP address, - * ie sourceforge.net and www.sourceforge.net). - */ - public static boolean urlEquals(URL u1, URL u2) { - if (u1 == u2) { - return true; - } - if (u1 == null || u2 == null) { - return false; - } - - if (notNullUrlEquals(u1, u2)) { - return true; - } - try { - URL nu1 = UrlUtils.normalizeUrl(u1); - URL nu2 = UrlUtils.normalizeUrl(u2); - if (notNullUrlEquals(nu1, nu2)) { - return true; - } - } catch (Exception ex) { - //keep silent here and return false - } - return false; - } - - private static boolean notNullUrlEquals(URL u1, URL u2) { - if (!compare(u1.getProtocol(), u2.getProtocol(), true) - || !compare(u1.getHost(), u2.getHost(), true) - || //u1.getDefaultPort() != u2.getDefaultPort() || // only in 1.4 - !compare(u1.getPath(), u2.getPath(), false) - || !compare(u1.getQuery(), u2.getQuery(), false) - || !compare(u1.getRef(), u2.getRef(), false)) { - return false; - } else { - return true; - } - } - /** * Caches a resource and returns a URL for it in the cache; * blocks until resource is cached. If the resource location is * not cacheable (points to a local file, etc) then the original @@ -133,26 +90,11 @@ } /** - * Compare strings that can be {@code null}. - */ - private static boolean compare(String s1, String s2, boolean ignore) { - if (s1 == s2) - return true; - if (s1 == null || s2 == null) - return false; - - if (ignore) - return s1.equalsIgnoreCase(s2); - else - return s1.equals(s2); - } - - /** * Returns the Permission object necessary to access the * resource, or {@code null} if no permission is needed. - * @param location - * @param version - * @return + * @param location location of the resource + * @param version the version, or {@code null} + * @return permissions of the location */ public static Permission getReadPermission(URL location, Version version) { Permission result = null; @@ -540,7 +482,7 @@ return; // only resources not starting out downloaded are displayed - List urlList = new ArrayList(); + List urlList = new ArrayList<>(); for (URL url : resources) { if (!tracker.checkResource(url)) urlList.add(url); @@ -591,8 +533,8 @@ if (okToClearCache()) { // First we want to figure out which stuff we need to delete. - HashSet keep = new HashSet(); - HashSet remove = new HashSet(); + HashSet keep = new HashSet<>(); + HashSet remove = new HashSet<>(); lruHandler.load(); long maxSize = -1; // Default diff -r 7703f77be921 -r c97ba9284e7e netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Fri May 23 13:38:14 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Fri May 23 14:13:26 2014 +0200 @@ -24,6 +24,7 @@ import java.util.Set; import net.sourceforge.jnlp.Version; +import net.sourceforge.jnlp.util.UrlUtils; import net.sourceforge.jnlp.util.WeakList; /** @@ -430,7 +431,7 @@ // time spent in synchronized addResource determining if // Resource is already in a tracker, and better for offline // mode on some OS. - return CacheUtil.urlEquals(location, ((Resource) other).location); + return UrlUtils.urlEquals(location, ((Resource) other).location); } return false; } diff -r 7703f77be921 -r c97ba9284e7e netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 23 13:38:14 2014 +0200 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Fri May 23 14:13:26 2014 +0200 @@ -104,6 +104,17 @@ // separately locks on (in order of aquire order, ie, sync on prefetch never syncs on lock): // lock, prefetch, this.resources, each resource, listeners + public static enum RequestMethods{ + HEAD, GET, TESTING_UNDEF; + + private static final RequestMethods[] requestMethods = {RequestMethods.HEAD, RequestMethods.GET}; + + public static RequestMethods[] getValidRequestMethods() { + return requestMethods; + } + + + } /** notified on initialization or download of a resource */ private static final Object lock = new Object(); // used to lock static structures @@ -111,31 +122,28 @@ /** max threads */ private static final int maxThreads = 5; - /** methods used to try individual URLs when choosing best*/ - private static final String[] requestMethods = {"HEAD", "GET"}; - /** running threads */ private static int threads = 0; /** weak list of resource trackers with resources to prefetch */ - private static WeakList prefetchTrackers = - new WeakList(); + private static final WeakList prefetchTrackers = + new WeakList<>(); /** resources requested to be downloaded */ - private static ArrayList queue = new ArrayList(); + private static final ArrayList queue = new ArrayList<>(); - private static ConcurrentHashMap downloadOptions = - new ConcurrentHashMap(); + private static final ConcurrentHashMap downloadOptions = + new ConcurrentHashMap<>(); /** resource trackers threads are working for (used for load balancing across multi-tracker downloads) */ - private static ArrayList active = - new ArrayList(); // + private final static ArrayList active = + new ArrayList<>(); // /** the resources known about by this resource tracker */ - private List resources = new ArrayList(); + private final List resources = new ArrayList<>(); /** download listeners for this tracker */ - private List listeners = new ArrayList(); + private final List listeners = new ArrayList<>(); /** whether to download parts before requested */ private boolean prefetch; @@ -871,24 +879,24 @@ entry.unlock(); } } - /** - * testing wrapper - * - * @param url - * @param requestProperties - * @param requestMethod - * @return - * @throws IOException - */ - static int getUrlResponseCode(URL url, Map requestProperties, String requestMethod) throws IOException { + + + static int getUrlResponseCode(URL url, Map requestProperties, RequestMethods requestMethod) throws IOException { return getUrlResponseCodeWithRedirectonResult(url, requestProperties, requestMethod).result; } + /** + * Complex wrapper around return code with utility methods + * Default is HTTP_OK + */ private static class CodeWithRedirect { int result = HttpURLConnection.HTTP_OK; URL URL; + /** + * @return whether the result code is redirect one. Rigth now 301-303 and 307-308 + */ public boolean shouldRedirect() { return (result == 301 || result == 302 @@ -915,7 +923,7 @@ * HttpURLConnection.HTTP_OK and null if not. * @throws IOException */ - static CodeWithRedirect getUrlResponseCodeWithRedirectonResult(URL url, Map requestProperties, String requestMethod) throws IOException { + static CodeWithRedirect getUrlResponseCodeWithRedirectonResult(URL url, Map requestProperties, RequestMethods requestMethod) throws IOException { CodeWithRedirect result = new CodeWithRedirect(); URLConnection connection = url.openConnection(); @@ -925,7 +933,7 @@ if (connection instanceof HttpURLConnection) { HttpURLConnection httpConnection = (HttpURLConnection) connection; - httpConnection.setRequestMethod(requestMethod); + httpConnection.setRequestMethod(requestMethod.toString()); int responseCode = httpConnection.getResponseCode(); @@ -975,7 +983,7 @@ OutputController.getLogger().log(OutputController.Level.ERROR_DEBUG, "All possible urls for " + resource.toString() + " : " + urls); - for (String requestMethod : requestMethods) { + for (RequestMethods requestMethod : RequestMethods.getValidRequestMethods()) { for (int i = 0; i < urls.size(); i++) { URL url = urls.get(i); try { @@ -1185,7 +1193,7 @@ private Resource getResource(URL location) { synchronized (resources) { for (Resource resource : resources) { - if (CacheUtil.urlEquals(resource.getLocation(), location)) + if (UrlUtils.urlEquals(resource.getLocation(), location)) return resource; } } @@ -1293,6 +1301,7 @@ final Resource fResource = resource; AccessController.doPrivileged(new PrivilegedAction() { + @Override public Void run() { processResource(fResource); return null; diff -r 7703f77be921 -r c97ba9284e7e netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java --- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Fri May 23 13:38:14 2014 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Fri May 23 14:13:26 2014 +0200 @@ -56,13 +56,13 @@ // installed by the application. /** the file */ - private JNLPFile file; + private final JNLPFile file; /** the thread group */ - private ThreadGroup group; + private final ThreadGroup group; /** the classloader */ - private ClassLoader loader; + private final ClassLoader loader; /** *

@@ -75,16 +75,16 @@ * It is set to the AppContext which created this ApplicationInstance *

*/ - private AppContext appContext; + private final AppContext appContext; /** whether the application has stopped running */ private boolean stopped = false; /** weak list of windows opened by the application */ - private WeakList weakWindows = new WeakList(); + private final WeakList weakWindows = new WeakList<>(); /** list of application listeners */ - private EventListenerList listeners = new EventListenerList(); + private final EventListenerList listeners = new EventListenerList(); /** whether or not this application is signed */ private boolean isSigned = false; @@ -195,24 +195,27 @@ * check configuration and possibly prompt user to find out if a * shortcut should be created or not */ - if (currentSetting.equals(ShortcutDesc.CREATE_NEVER)) { - createShortcut = false; - } else if (currentSetting.equals(ShortcutDesc.CREATE_ALWAYS)) { - createShortcut = true; - } else if (currentSetting.equals(ShortcutDesc.CREATE_ASK_USER)) { - if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { + switch (currentSetting) { + case ShortcutDesc.CREATE_NEVER: + createShortcut = false; + break; + case ShortcutDesc.CREATE_ALWAYS: createShortcut = true; - } - } else if (currentSetting.equals(ShortcutDesc.CREATE_ASK_USER_IF_HINTED)) { - if (sd != null && sd.onDesktop()) { + break; + case ShortcutDesc.CREATE_ASK_USER: if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { createShortcut = true; - } - } - } else if (currentSetting.equals(ShortcutDesc.CREATE_ALWAYS_IF_HINTED)) { - if (sd != null && sd.onDesktop()) { - createShortcut = true; - } + } break; + case ShortcutDesc.CREATE_ASK_USER_IF_HINTED: + if (sd != null && sd.onDesktop()) { + if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { + createShortcut = true; + } + } break; + case ShortcutDesc.CREATE_ALWAYS_IF_HINTED: + if (sd != null && sd.onDesktop()) { + createShortcut = true; + } break; } return createShortcut; @@ -225,6 +228,7 @@ * application would have to close its windows and exit its * threads but not call JNLPRuntime.exit). */ + @Override public void finalize() { destroy(); } @@ -246,6 +250,7 @@ AccessControlContext acc = new AccessControlContext(new ProtectionDomain[] { pd }); PrivilegedAction installProps = new PrivilegedAction() { + @Override public Object run() { for (PropertyDesc propDesc : props) { System.setProperty(propDesc.getKey(), propDesc.getValue()); diff -r 7703f77be921 -r c97ba9284e7e netx/net/sourceforge/jnlp/util/UrlUtils.java --- a/netx/net/sourceforge/jnlp/util/UrlUtils.java Fri May 23 13:38:14 2014 +0200 +++ b/netx/net/sourceforge/jnlp/util/UrlUtils.java Fri May 23 14:13:26 2014 +0200 @@ -56,9 +56,7 @@ String[] urlParts = url.toString().split("\\?"); URL strippedUrl = new URL(urlParts[0]); return normalizeUrl(strippedUrl, encodeFileUrls); - } catch (IOException e) { - OutputController.getLogger().log(OutputController.Level.ERROR_ALL, e); - } catch (URISyntaxException e) { + } catch (IOException | URISyntaxException e) { From jvanek at redhat.com Fri May 23 12:16:06 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 23 May 2014 14:16:06 +0200 Subject: /hg/icedtea-web: Properly disconnect all connected http connecti... In-Reply-To: <537CDBF9.3000106@redhat.com> References: <20140509215554.GO3326@redhat.com> <537083F2.6080003@redhat.com> <20140512210341.GK2138@redhat.com> <5374DA82.4030303@redhat.com> <20140520154001.GC2672@redhat.com> <537C7676.4030009@redhat.com> <20140521150255.GA3957@redhat.com> <537CDBF9.3000106@redhat.com> Message-ID: <537F3C06.8070002@redhat.com> Hi! I have pushed this patch. As two changesets - javadoc, and codechanges. I know that this was not 100% approved, and I'm sorry. Feel free to revert, modify as you wish. I needed my stack as empty as possible:( Sorry for braking the rule again !-( See you all at end of June! J. On 05/21/2014 07:01 PM, Jiri Vanek wrote: > On 05/21/2014 05:02 PM, Omair Majid wrote: >> * Jiri Vanek [2014-05-21 05:48]: >>> We are a bit deadlocking around usability of comments. Well from where you >>> are looking on it? I got an impression you are looking on them from *code*. >> >> Yes, that's right. >> >>> I think most of your arguments become invalid, when you look to them as on >>> final html file. ANd Imean pure html file without the code. If tose which >>> you wont me to remove will be removed (or when you wont some infomratin to >>> be removed in behalf of somthing else...) then this information is really >>> missing in final html. >> >> I see your point. And I admit that the html "looks" a bit empty when you >> remove redundant comments. I say "looks" because the same information is >> conveyed: for example, do you really need a comment describing the >> parameter's purpose when the name of the parameter makes it obvious? >> >> But even more than that, I am wondering what the point of html docs is. > > To be publicly accessible online, and allow browsing. But yes we are not library (but we can become once!) > >> They are nice to have, for sure, but who would be using them? To me, > > And I would like to publish them (if they are a bit better :) ) And we are packaging them O:) > >> focusing on them means more (on-going) effort without any benefit. In > > For IDE? NetBeasn are showing javadoc to each method I'm going to call... > >> fact, it means a harder-to-understand system when your comments disagree >> with the code. > > Anyway - As you are one of the most honourable persons around, I tried to remove as much "nastynes-for-you" as possible. > > Well. The patch grow a bit again :-/ > > One is the enum you suggested. Not big deal. > > I hope we are somewhere in the middle between our opinions. I even hope closer to yours! > > Thanx for patience! > J. > > > ghmhmh THe patch should become general cleanup... As I told Once Approved I will try to push it in separate changesets (enum, diamond, rest?) > > J. From jvanek at icedtea.classpath.org Fri May 23 13:03:22 2014 From: jvanek at icedtea.classpath.org (jvanek at icedtea.classpath.org) Date: Fri, 23 May 2014 13:03:22 +0000 Subject: /hg/icedtea-web: Fixed cache tests: CacheReproducerTest changed ... Message-ID: changeset e5a7d39eecbb in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e5a7d39eecbb author: Jiri Vanek date: Fri May 23 15:02:48 2014 +0200 Fixed cache tests: CacheReproducerTest changed condition on checking cache dir from not existing to being empty, diffstat: ChangeLog | 6 ++++++ tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diffs (25 lines): diff -r c97ba9284e7e -r e5a7d39eecbb ChangeLog --- a/ChangeLog Fri May 23 14:13:26 2014 +0200 +++ b/ChangeLog Fri May 23 15:02:48 2014 +0200 @@ -1,3 +1,9 @@ +2014-05-23 Jiri Vanek + + Fixed cache tests + * tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java: + changed condition on checking cache dir from not existing to being empty, + 2014-05-23 Jiri Vanek Minor code enhancements: Enum for HEAD and GET, urlutils classes moved to UrlUtils diff -r c97ba9284e7e -r e5a7d39eecbb tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java --- a/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java Fri May 23 14:13:26 2014 +0200 +++ b/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java Fri May 23 15:02:48 2014 +0200 @@ -346,7 +346,7 @@ } tryToClearcache(); - Assert.assertFalse("icedtea cache " + icedteaCache.getAbsolutePath() + " should not exist after clearing", icedteaCache.exists()); + Assert.assertTrue("icedtea cache " + icedteaCache.getAbsolutePath() + " should be empty after clearing", icedteaCache.listFiles().length == 0); } private static String loadFile(File f) throws FileNotFoundException, UnsupportedEncodingException, IOException { From jvanek at redhat.com Fri May 23 13:05:39 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 23 May 2014 15:05:39 +0200 Subject: Painting issues with "autosize". My fault? Your fault? In-Reply-To: References: <537CBE81.2050907@redhat.com> Message-ID: <537F47A3.6080008@redhat.com> On 05/23/2014 09:53 AM, helpcrypto helpcrypto wrote: > Thanks as usual, Jiri. > > I'll prepare the test and fill a bug as soon as I can...very busy days at work > (why the TODO list is always growing faster than the DONE list???) > > Have a great weekend. Hmm. It seems that this is new issue. All ITW AWT reproducers started to fail. They simply never paint their components are based on JDialogue... Andrew, may you elaborate on them? [send from phone] > > > On Wed, May 21, 2014 at 4:56 PM, Jiri Vanek > wrote: > > On 05/16/2014 09:43 AM, helpcrypto helpcrypto wrote: > > Hi. > > > Before filling a bug, I would like to ask if I'm doing it properly. > > Consider the following scenario: > -Dialog+BorderLayout+center JPanel with JLabel > > In runtime I modify the label from "" to "lorem ipsum..." (The lorem ipsum part are several paragraphs) > And do pack() and repaint(). > > *The objective is to automatically resize the dialog depending on panels contents* > > > > Using ORACLE JRE the dialog is redrawn to fit the content, but this is not happening on icedtea-web, so part of the text is hidden under north, south, east and west panels. > > Did I explained myself properly? > Should I file a bug and attach a test case or I must do it another way? > > > > > Yes this sounds like a bug. But From desciption is not clear wheter it is IcedTea-Web or Openjdk. > > It is worthy to try openjdk 6 / 7 / 8 snd proprietary plugin and Proprietary JDK 7/8 and icedtea-web to eliminate dead branches. > > And hence you see it in Jdialog I suspect OpenJDK itself. Not Icedtea web. > > Was the window manager always the same? > > Are you able to prepare minimalistic reproducer? ( I guess main class with few lines of jdialog setup). ? > > Then we can try on various JDKS for you. > > J. > > From jvanek at redhat.com Fri May 23 13:06:47 2014 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 23 May 2014 15:06:47 +0200 Subject: /hg/icedtea-web: Fixed cache tests: CacheReproducerTest changed ... In-Reply-To: References: Message-ID: <537F47E7.6080102@redhat.com> Hi! This may be worthy to backport to 1.5 May some intern elaborate? Also there may be more stupid failures like this. Again may some of our newbies elaborate? [send from phone] J. On 05/23/2014 03:03 PM, jvanek at icedtea.classpath.org wrote: > changeset e5a7d39eecbb in /hg/icedtea-web > details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=e5a7d39eecbb > author: Jiri Vanek > date: Fri May 23 15:02:48 2014 +0200 > > Fixed cache tests: CacheReproducerTest changed condition on checking cache dir from not existing to being empty, > > > diffstat: > > ChangeLog | 6 ++++++ > tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java | 2 +- > 2 files changed, 7 insertions(+), 1 deletions(-) > > diffs (25 lines): > > diff -r c97ba9284e7e -r e5a7d39eecbb ChangeLog > --- a/ChangeLog Fri May 23 14:13:26 2014 +0200 > +++ b/ChangeLog Fri May 23 15:02:48 2014 +0200 > @@ -1,3 +1,9 @@ > +2014-05-23 Jiri Vanek > + > + Fixed cache tests > + * tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java: > + changed condition on checking cache dir from not existing to being empty, > + > 2014-05-23 Jiri Vanek > > Minor code enhancements: Enum for HEAD and GET, urlutils classes moved to UrlUtils > diff -r c97ba9284e7e -r e5a7d39eecbb tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java > --- a/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java Fri May 23 14:13:26 2014 +0200 > +++ b/tests/reproducers/signed/CacheReproducer/testcases/CacheReproducerTest.java Fri May 23 15:02:48 2014 +0200 > @@ -346,7 +346,7 @@ > > } > tryToClearcache(); > - Assert.assertFalse("icedtea cache " + icedteaCache.getAbsolutePath() + " should not exist after clearing", icedteaCache.exists()); > + Assert.assertTrue("icedtea cache " + icedteaCache.getAbsolutePath() + " should be empty after clearing", icedteaCache.listFiles().length == 0); > } > > private static String loadFile(File f) throws FileNotFoundException, UnsupportedEncodingException, IOException { > From domuradical at gmail.com Sat May 24 16:05:34 2014 From: domuradical at gmail.com (Adam Domurad) Date: Sat, 24 May 2014 16:05:34 +0000 (UTC) Subject: [rfc][icedtea-web] disconnecting httpurlconnections References: <5360F0D1.7060003@redhat.com> <20140430152809.GE2047@redhat.com> <53611BA3.5070505@redhat.com> <53639EF0.7080707@redhat.com> <20140502142540.GA2886@redhat.com> Message-ID: Omair Majid writes: > > * Jiri Vanek [2014-05-02 09:34]: > > I will elaborate a bit more, but if you may say few more words, it > > would be nice:(( > > Sorry, but I know next to nothing about this area. All I know is that > Adam looked into it and decided that disconnect() is best avoided. I came to the conclusion from reading the likes of this: "Each HttpURLConnection instance is used to make a single request but the underlying network connection to the HTTP server may be transparently shared by other instances. Calling the close() methods on the InputStream or OutputStream of an HttpURLConnection after a request may free network resources associated with this instance but has no effect on any shared persistent connection. Calling the disconnect() method may close the underlying socket if a persistent connection is otherwise idle at that time." If we are done speaking to a certain HTTP server, 'disconnect' seems to make sense. If we are doing a HEAD attempt, and then a GET attempt, it does not. Please feel free to ask if you are wondering about decisions I made; they were based on advice from the likes of StackOverflow and not from prior familiarity. > > Thanks, > Omair > Thanks, -Adam From bugzilla-daemon at icedtea.classpath.org Sun May 25 14:59:12 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 25 May 2014 14:59:12 +0000 Subject: [Bug 1791] New: PPAPI (pepper) version Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1791 Bug ID: 1791 Summary: PPAPI (pepper) version Product: IcedTea-Web Version: unspecified Hardware: all OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: Plugin Assignee: dbhole at redhat.com Reporter: dtl135dtl135 at gmail.com CC: unassigned at icedtea.classpath.org Google Chrome 35 has dropped support for NPAPI plugins (so icedtea no longer works there). Is there a plan to make a PPAPI-compatible version of icedtea? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Mon May 26 09:25:02 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Mon, 26 May 2014 09:25:02 +0000 Subject: /hg/gfx-test: Six tests added into CAGOperationsOnTwoOverlapping... Message-ID: changeset ce5c532fd9da in /hg/gfx-test details: http://icedtea.classpath.org/hg/gfx-test?cmd=changeset;node=ce5c532fd9da author: Pavel Tisnovsky date: Mon May 26 11:25:48 2014 +0200 Six tests added into CAGOperationsOnTwoOverlappingCircles. diffstat: ChangeLog | 5 + src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java | 2438 +++++---- 2 files changed, 1299 insertions(+), 1144 deletions(-) diffs (truncated from 2518 to 500 lines): diff -r e62c92a96c62 -r ce5c532fd9da ChangeLog --- a/ChangeLog Thu May 22 09:54:26 2014 +0200 +++ b/ChangeLog Mon May 26 11:25:48 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-26 Pavel Tisnovsky + + * src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java: + Six tests added into CAGOperationsOnTwoOverlappingCircles. + 2014-05-22 Pavel Tisnovsky * src/org/gfxtest/testsuites/BitBltBufferedImageOp.java: diff -r e62c92a96c62 -r ce5c532fd9da src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java --- a/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java Thu May 22 09:54:26 2014 +0200 +++ b/src/org/gfxtest/testsuites/CAGOperationsOnTwoOverlappingCircles.java Mon May 26 11:25:48 2014 +0200 @@ -1,1208 +1,1358 @@ -/* - Java gfx-test framework + /* + Java gfx-test framework - Copyright (C) 2010, 2011, 2012, 2013, 2014 Red Hat + Copyright (C) 2010, 2011, 2012, 2013, 2014 Red Hat -This file is part of IcedTea. + 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 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. + 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. + 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. + 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. -*/ + 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; + package org.gfxtest.testsuites; -import java.awt.Graphics2D; -import java.awt.geom.Area; + import java.awt.Graphics2D; + import java.awt.geom.Area; -import org.gfxtest.framework.*; -import org.gfxtest.framework.annotations.*; + import org.gfxtest.framework.*; + import org.gfxtest.framework.annotations.*; -/** - * This test checks the process of creating and rendering new geometric shapes - * by performing boolean operations on existing ones. This process is often - * called Constructive area geometry (CAG). All CAG operations - union, - * intersection, subtraction and XOR - is processed on two circular Areas. - * Circles which are the basis of the areas are overlapping. - * - * @author Pavel Tisnovsky - */ - at TestType(TestTypes.RENDER_TEST) - at GraphicsPrimitive(GraphicsPrimitives.AREA) - at RenderStyle(RenderStyles.FILL) - at Transformation(Transformations.NONE) - at Zoom(1) -public class CAGOperationsOnTwoOverlappingCircles extends GfxTest -{ + /** + * This test checks the process of creating and rendering new geometric shapes + * by performing boolean operations on existing ones. This process is often + * called Constructive area geometry (CAG). All CAG operations - union, + * intersection, subtraction and XOR - is processed on two circular Areas. + * Circles which are the basis of the areas are overlapping. + * + * @author Pavel Tisnovsky + */ + @TestType(TestTypes.RENDER_TEST) + @GraphicsPrimitive(GraphicsPrimitives.AREA) + @RenderStyle(RenderStyles.FILL) + @Transformation(Transformations.NONE) + @Zoom(1) + public class CAGOperationsOnTwoOverlappingCircles extends GfxTest + { - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using union operator. The shape is rendered - * using stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testUnionStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // create area using union operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingUnionOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using union operator. The shape is rendered + * using stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingUnionOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using subtract operator. The shape is - * rendered using stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testSubtractStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // create area using subtract operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using subtract operator. The shape is + * rendered using stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using inverse subtract operator. The shape - * is rendered using stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testInverseSubtractStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // create area using subtract operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingInverseSubtractOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using inverse subtract operator. The shape + * is rendered using stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingInverseSubtractOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using intersect operator. The shape is - * rendered using stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testIntersectStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // create area using intersect operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingIntersectOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using intersect operator. The shape is + * rendered using stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testIntersectStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // create area using intersect operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingIntersectOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using XOR operator. The shape is rendered - * using stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testXorStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // create area using XOR operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingXorOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using XOR operator. The shape is rendered + * using stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testXorStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // create area using XOR operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingXorOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using union operator. The shape is rendered - * using wide stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testUnionWideStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // set stroke width - CommonRenderingStyles.setStrokeThickWidth(graphics2d); - // create area using union operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingUnionOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using union operator. The shape is rendered + * using wide stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testUnionWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using union operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingUnionOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using subtract operator. The shape is - * rendered using wide stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // set stroke width - CommonRenderingStyles.setStrokeThickWidth(graphics2d); - // create area using subtract operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using subtract operator. The shape is + * rendered using wide stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); + // set stroke width + CommonRenderingStyles.setStrokeThickWidth(graphics2d); + // create area using subtract operator + Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingSubtractOperator(image); + // draw the area + graphics2d.draw(area); + // test result + return TestResult.PASSED; + } - /** - * Checks the process of creating and rendering new geometric shape - * constructed from two overlapping circles using inverse subtract operator. The shape - * is rendered using wide stroke. - * - * @param image - * image to which area is to be drawn - * @param graphics2d - * graphics canvas - * @return test result status - PASSED, FAILED or ERROR - */ - public TestResult testInverseSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d) - { - // set stroke color - CommonRenderingStyles.setStrokeColor(graphics2d); - // set stroke width - CommonRenderingStyles.setStrokeThickWidth(graphics2d); - // create area using subtract operator - Area area = CommonCAGOperations.createAreaFromTwoOverlappingCirclesUsingInverseSubtractOperator(image); - // draw the area - graphics2d.draw(area); - // test result - return TestResult.PASSED; - } + /** + * Checks the process of creating and rendering new geometric shape + * constructed from two overlapping circles using inverse subtract operator. The shape + * is rendered using wide stroke. + * + * @param image + * image to which area is to be drawn + * @param graphics2d + * graphics canvas + * @return test result status - PASSED, FAILED or ERROR + */ + public TestResult testInverseSubtractWideStrokePaint(TestImage image, Graphics2D graphics2d) + { + // set stroke color + CommonRenderingStyles.setStrokeColor(graphics2d); From bugzilla-daemon at icedtea.classpath.org Mon May 26 13:34:39 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 26 May 2014 13:34:39 +0000 Subject: [Bug 1794] New: LiveConnect - Problem with String arrays between Java and Javascript Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794 Bug ID: 1794 Summary: LiveConnect - Problem with String arrays between Java and Javascript Product: IcedTea-Web Version: hg Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: NetX (javaws) Assignee: omajid at redhat.com Reporter: ldracz at redhat.com CC: unassigned at icedtea.classpath.org There is a problem with String arrays between Java/Javascript. The problem is accessing a String Array made in Java from Javascript. Here is an example where this occurs in IcedTea-Web but not in Java plugin. The html -------------------------


------------


The java file ------------------------- package javatojs; import java.applet.Applet; import netscape.javascript.*; // add plugin.jar to classpath during compilation public class JavatoJS extends Applet { public String[] myStringArray = {"String a","String b","String c"}; public String myString = "String"; public void init() { try{ JSObject window = JSObject.getWindow(this); window.call("writeToJS", new Object[] {myStringArray}); window.call("writeToJSs", new Object[] {myString}); } catch (JSException jse) { jse.printStackTrace(); } } } Here is another example where with ORACLE JRE on windows or mac the alert shows a string. jstr: appletstringvalue1 But using a similar script on ubuntu with OPENJDK it appears as jstr: undefined The java.log shows the value of jstr if printed to the log in both cases. Javascript is not receiving the applet values on linux or openjdk. HTML: In the applet public class: public String[] str = new String[100]; @Override public void init() { nstr = this.getParameter("valuename1"); //TODO this.str[0]= "appletstringvalue1"; } Javascript: var a = document.getElementById('appletid'); var jstr = a.str; alert('jstr: '+jstr[0]); -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Mon May 26 13:40:49 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 26 May 2014 13:40:49 +0000 Subject: [Bug 1794] LiveConnect - Problem with String arrays between Java and Javascript In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |aazores at redhat.com Assignee|omajid at redhat.com |ldracz 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: From bugzilla-daemon at icedtea.classpath.org Mon May 26 13:41:04 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 26 May 2014 13:41:04 +0000 Subject: [Bug 1794] LiveConnect - Problem with String arrays between Java and Javascript In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Component|NetX (javaws) |Plugin -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbhole at redhat.com Mon May 26 15:46:07 2014 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 26 May 2014 11:46:07 -0400 Subject: Oracle Java 8 problems due to TLS policy change In-Reply-To: References: <1013403333.3857697.1397240340516.JavaMail.zimbra@redhat.com> <537B6148.4040608@redhat.com> Message-ID: <20140526154606.GB17127@redhat.com> * helpcrypto helpcrypto [2014-05-20 10:39]: > As I tried to explain, we have detected a problem running Oracle JRE8 cause of > TLS policy change (Now, TLS 1.1 and TLS 2.0 are enabled by default on Control > Panel, and this seems to cause a SSLException when working with our very-legacy > server) > > I was looking to reproduce the error using Icedtea+OpenJDK, but firstly I have > to find TLS 1.1/TLS 2.0 configuration option. > > Hope its clear now. > There is no TLS configuration option; we do not offer one. What you can do however is set JVM arguments via the ITW-settings applications and provide -Djdk.tls.client.protocols="TLSv1,..." Deepak > > > On Tue, May 20, 2014 at 4:06 PM, Andrew Azores wrote: > > On 05/16/2014 03:36 AM, helpcrypto helpcrypto wrote: > > Super Ping! > > > On Mon, Apr 14, 2014 at 2:41 PM, helpcrypto helpcrypto < > helpcrypto at gmail.com> wrote: > > Hi Andrew, thx for replying. > > On Fri, Apr 11, 2014 at 8:19 PM, Andrew Hughes < > gnu.andrew at redhat.com> wrote: > > > ----- Original Message ----- > > Ping? > > > > On Fri, Apr 4, 2014 at 11:03 AM, helpcrypto helpcrypto < > helpcrypto at gmail.com > > > wrote: > > > > > According to > > > http://docs.oracle.com/javase/8/docs/technotes/guides/ > security/enhancements-8.htmlOracle > > > Java 8 now uses TLS1.1 and TLS1.2 (both enabled by default > on > > > Control Panel). > > > > > > This seems to be causing an error in our applet loading. > Problem seems > > > solved if both unchecked. Funny thing is our server only > supports TLS1.0. > > > > > > Is icedtea8 following the same TLS policy? (switching to > TLS1.1 and TLS1.2) > > > If so, i should check if the same error appears. > > > > > I'm not sure what you're referring to here. There is no control > panel in > IcedTea/OpenJDK 6, 7 or 8. I seem to remember TLS 1.2 support > being added > as part of 7 (it was one of the reasons for the addition of an > explicit > ECC provider). > > > Maybe Jiri can chime in here? > > > > Oracle Java 8 JRE has enabled (by default) TLS 1.1 and TLS 1.2 and > that's causing some problems in our case. I was wondering how > OpenJDK/Icedtea is handling protocol priorities/this issue. > > Is there such a thing as "Icedtea-Web JRE 8" so I can test? > > > > > I don't know anything about TLS in OpenJDK/IcedTea itself, but there is no > "IcedTea-Web JRE 8" for you to test. There are only the regular releases, > so 1.4 and 1.5 right now. What are you looking for in this "other build" of > ITW? > > Thanks, > > -- > Andrew A > > From helpcrypto at gmail.com Mon May 26 15:56:12 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Mon, 26 May 2014 17:56:12 +0200 Subject: Oracle Java 8 problems due to TLS policy change In-Reply-To: <20140526154606.GB17127@redhat.com> References: <1013403333.3857697.1397240340516.JavaMail.zimbra@redhat.com> <537B6148.4040608@redhat.com> <20140526154606.GB17127@redhat.com> Message-ID: hmmm...going to try this and setup TLSv1.1 and TLSv2 to try to replicate Oracle error. If appears, then we could investigate the issue. Thanks for the idea!!! On Mon, May 26, 2014 at 5:46 PM, Deepak Bhole wrote: > * helpcrypto helpcrypto [2014-05-20 10:39]: > > As I tried to explain, we have detected a problem running Oracle JRE8 > cause of > > TLS policy change (Now, TLS 1.1 and TLS 2.0 are enabled by default on > Control > > Panel, and this seems to cause a SSLException when working with our > very-legacy > > server) > > > > I was looking to reproduce the error using Icedtea+OpenJDK, but firstly > I have > > to find TLS 1.1/TLS 2.0 configuration option. > > > > Hope its clear now. > > > > There is no TLS configuration option; we do not offer one. > > What you can do however is set JVM arguments via the ITW-settings > applications and provide -Djdk.tls.client.protocols="TLSv1,..." > > Deepak > > > > > > > On Tue, May 20, 2014 at 4:06 PM, Andrew Azores > wrote: > > > > On 05/16/2014 03:36 AM, helpcrypto helpcrypto wrote: > > > > Super Ping! > > > > > > On Mon, Apr 14, 2014 at 2:41 PM, helpcrypto helpcrypto < > > helpcrypto at gmail.com> wrote: > > > > Hi Andrew, thx for replying. > > > > On Fri, Apr 11, 2014 at 8:19 PM, Andrew Hughes < > > gnu.andrew at redhat.com> wrote: > > > > > > ----- Original Message ----- > > > Ping? > > > > > > On Fri, Apr 4, 2014 at 11:03 AM, helpcrypto helpcrypto > < > > helpcrypto at gmail.com > > > > wrote: > > > > > > > According to > > > > > http://docs.oracle.com/javase/8/docs/technotes/guides/ > > security/enhancements-8.htmlOracle > > > > Java 8 now uses TLS1.1 and TLS1.2 (both enabled by > default > > on > > > > Control Panel). > > > > > > > > This seems to be causing an error in our applet > loading. > > Problem seems > > > > solved if both unchecked. Funny thing is our server > only > > supports TLS1.0. > > > > > > > > Is icedtea8 following the same TLS policy? > (switching to > > TLS1.1 and TLS1.2) > > > > If so, i should check if the same error appears. > > > > > > > > I'm not sure what you're referring to here. There is no > control > > panel in > > IcedTea/OpenJDK 6, 7 or 8. I seem to remember TLS 1.2 > support > > being added > > as part of 7 (it was one of the reasons for the addition > of an > > explicit > > ECC provider). > > > > > > Maybe Jiri can chime in here? > > > > > > > > Oracle Java 8 JRE has enabled (by default) TLS 1.1 and TLS > 1.2 and > > that's causing some problems in our case. I was wondering how > > OpenJDK/Icedtea is handling protocol priorities/this issue. > > > > Is there such a thing as "Icedtea-Web JRE 8" so I can test? > > > > > > > > > > I don't know anything about TLS in OpenJDK/IcedTea itself, but there > is no > > "IcedTea-Web JRE 8" for you to test. There are only the regular > releases, > > so 1.4 and 1.5 right now. What are you looking for in this "other > build" of > > ITW? > > > > Thanks, > > > > -- > > Andrew A > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ptisnovs at icedtea.classpath.org Tue May 27 06:54:37 2014 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 27 May 2014 06:54:37 +0000 Subject: /hg/rhino-tests: Seven new tests added into ScriptContextTest. Message-ID: changeset 7d807b490b62 in /hg/rhino-tests details: http://icedtea.classpath.org/hg/rhino-tests?cmd=changeset;node=7d807b490b62 author: ptisnovs date: Tue May 27 08:54:25 2014 +0200 Seven new tests added into ScriptContextTest. diffstat: ChangeLog | 5 + src/org/RhinoTests/ScriptContextTest.java | 139 ++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 0 deletions(-) diffs (161 lines): diff -r ac41c65e3bb9 -r 7d807b490b62 ChangeLog --- a/ChangeLog Fri May 23 08:25:17 2014 +0200 +++ b/ChangeLog Tue May 27 08:54:25 2014 +0200 @@ -1,3 +1,8 @@ +2014-05-27 Pavel Tisnovsky + + * src/org/RhinoTests/ScriptContextTest.java: + Seven new tests added into ScriptContextTest. + 2014-05-23 Pavel Tisnovsky * src/org/RhinoTests/ScriptContextTest.java: diff -r ac41c65e3bb9 -r 7d807b490b62 src/org/RhinoTests/ScriptContextTest.java --- a/src/org/RhinoTests/ScriptContextTest.java Fri May 23 08:25:17 2014 +0200 +++ b/src/org/RhinoTests/ScriptContextTest.java Tue May 27 08:54:25 2014 +0200 @@ -714,6 +714,145 @@ } /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute39() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("name", null, INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute40() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("", "value", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute41() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("", "", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute42() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute("", null, INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute43() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute(null, "value", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute44() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute(null, "", INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** + * Test for method SimpleScriptContext.setAttribute(). + */ + protected void testSetAttribute45() { + // tested object + ScriptContext object = new SimpleScriptContext(); + + // setup global scope + Bindings bindings = new SimpleBindings(new HashMap()); + object.setBindings(bindings, ScriptContext.GLOBAL_SCOPE); + + try { + object.setAttribute(null, null, INVALID_SCOPE); + throw new AssertionError("ScriptContext.setAttribute() does not throw any exception for invalid scope"); + } + catch (Exception e) { + // expected exception + } + } + + /** * Entry point to this test case. * * @param args parameters passed from command line From aazores at redhat.com Tue May 27 13:22:22 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 27 May 2014 09:22:22 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <537B61BF.4090108@redhat.com> References: <5374E325.3000705@redhat.com> <537B61BF.4090108@redhat.com> Message-ID: <5384918E.3020307@redhat.com> On 05/20/2014 10:07 AM, Andrew Azores wrote: > On 05/15/2014 11:54 AM, Andrew Azores wrote: >> Hi, >> >> I've refactored PolicyEditor so that the policy file model is now in >> a separate class, moving PolicyEditor toward MVC design. There still >> isn't really a separation between View and Controller though. >> >> The patch looks large in file size but only because such a large >> amount of code has been relocated. Nothing has been done other than >> the extraction/refactor and associated changes in call sites. >> >> All the unit tests should still be passing, other than the two that >> are marked Known To Fail. I've also done fairly extensive manual >> testing and it still seems to work properly as far as I can tell. >> >> Thanks, >> > > Ping. > > Thanks, > Ping again. Thanks, -- Andrew A From aazores at redhat.com Tue May 27 13:22:38 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 27 May 2014 09:22:38 -0400 Subject: [rfc][icedtea-web] PolicyEditor NPE-on-save fix In-Reply-To: <537CAF52.4080404@redhat.com> References: <537CAF52.4080404@redhat.com> Message-ID: <5384919E.8040500@redhat.com> On 05/21/2014 09:51 AM, Andrew Azores wrote: > Hi, > > Currently, PolicyEditor has an NPE bug which can be reproduced as > follows: > > 1) Open PolicyEditor with no arguments > 2) Select and deselect a checkbox > 3) Click "Close" > 4) "Yes" to save changes before exiting > 5) NPE occurs > > I think this is a regression from the > PolicyEditorFrame/PolicyEditorDialog refactor, but I'm not sure of > that as it doesn't seem worth the time to go back and check anyway. > The problem is just that the quit() methods provided by these two > classes do not verify that there is a File to save to before > attempting to save to that file, so unless PolicyEditor is opened with > a file path argument or the user specifically uses the Open or > Save/Save As options, no file will ever be selected to save to, hence > the NPE in the savePolicyFile method. The attached patch simply > performs a check in the quit() methods and adds a file chooser dialog > if the file has not yet been selected and the user chooses to save > their changes. > > After applying the patch, the NPE in (5) should no longer occur, and a > file chooser should appear instead, allowing the file to be saved to > the desired location. > > ChangeLog: > > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java > (quit): select file to save to using fileChooser if file is null > > Thanks, > Ping. Thanks, -- Andrew A From aazores at redhat.com Tue May 27 13:22:56 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 27 May 2014 09:22:56 -0400 Subject: [rfc][icedtea-web] PolicyEditor empty entries save to file In-Reply-To: <537CCC47.9070400@redhat.com> References: <537CCC47.9070400@redhat.com> Message-ID: <538491B0.1000708@redhat.com> On 05/21/2014 11:54 AM, Andrew Azores wrote: > Hi, > > This patch makes it so that "empty" codebase entries (those with no > permissions applied to them) will still be written to the policy file, > so that on re-open, the "empty" codebase is still present. A special > exception is added for the default "All Applets" codebase, since it > always appears in the editor anyway and it doesn't make sense to have > a persistent empty entry in that case. > > For example: > 1) policyeditor -file .config/icedtea-web/security/java.policy > 2) add a new codebase which isn't already present, eg http://example.com > 3) save the file > 4) $EDITOR config/icedtea-web/security/java.policy - verify the empty > "grant codeBase http://example/com" block is present > 5) policyeditor -file .config/icedtea-web/security/java.policy - > verify the example.com codebase appears and has no permissions applied > > ChangeLog: > > Empty codebase entries in PolicyEditor are saved to file > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java > (savePolicyFile): fileLock made final, enabledPermissions declaration > moved closer to usage > * netx/net/sourceforge/jnlp/security/policyeditor/PolicyEntry.java > (toString): add codebase.isEmpty() condition to returning empty string > result > > Thanks, > Ping. Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Tue May 27 13:24:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 27 May 2014 13:24:55 +0000 Subject: [Bug 1767] IcedTea-web plugin fails where it once did not In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1767 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |1769 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Tue May 27 13:25:43 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 27 May 2014 13:25:43 +0000 Subject: [Bug 1761] plugin does not start at all, or crashes after some time in sandboxes mode In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1761 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Depends on| |1769 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Tue May 27 13:33:23 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 27 May 2014 13:33:23 +0000 Subject: [Bug 1743] Intermittant deadlock in PluginRequestProcessor In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1743 Andrew Azores changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #6 from Andrew Azores --- Hi again Kurt. Just a notice that Jiri is currently away for a few weeks, so it might be some time before that last comment is clarified. I suspect he might want to see the logs so that it might be easier to create a reproducer test case to guard against regressions in this area. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkang at redhat.com Tue May 27 14:28:28 2014 From: jkang at redhat.com (Jie Kang) Date: Tue, 27 May 2014 10:28:28 -0400 (EDT) Subject: /hg/icedtea-web: Fixed cache tests: CacheReproducerTest changed ... In-Reply-To: <537F47E7.6080102@redhat.com> References: <537F47E7.6080102@redhat.com> Message-ID: <281970455.7420562.1401200908233.JavaMail.zimbra@redhat.com> Hello, ----- Original Message ----- > Hi! > https://webmail.redhat.com/service/home/~/?auth=co&loc=en_GB&id=1415&part=2 > This may be worthy to backport to 1.5 May some intern elaborate? > I also think that this should be backported to 1.5 since the test was incorrect. Clearing cache should of course mean cache is empty and not disappeared. It agrees with backport conditions (stability/bug fixes, no new features). I have cloned the 1.5 repo and diffed the patch, it is attached. > Also there may be more stupid failures like this. Again may some of our > newbies elaborate? > I will run integration tests and go over them all to make sure everything makes sense. > [send from phone] > > > J. > Regards, Jie -------------- next part -------------- A non-text attachment was scrubbed... Name: CacheReproducer-backport.patch Type: text/x-patch Size: 1279 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Tue May 27 15:40:40 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 27 May 2014 15:40:40 +0000 Subject: [Bug 1796] New: make fails with "computed checksum did NOT match" Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1796 Bug ID: 1796 Summary: make fails with "computed checksum did NOT match" Product: IcedTea Version: 8-hg Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: 14mRh4X0r+icedtea at gmail.com CC: unassigned at icedtea.classpath.org The checksum of http://hg.openjdk.java.net/jdk8/jdk8/archive/cd7f2c7e2a0e.tar.gz seems to have changed, causing the make to quit with an error in the stamps/download-openjdk.stamp target. Trying to build with the icedtea mercurial on Gentoo Linux. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Tue May 27 16:23:47 2014 From: aazores at redhat.com (Andrew Azores) Date: Tue, 27 May 2014 12:23:47 -0400 Subject: [rfc][icedtea-web] Fix support for signed applets with sandbox permissions in manifest Message-ID: <5384BC13.5010708@redhat.com> Hi, This patch allows signed applets with sandbox permissions specified in their manifests to actually be run sandboxed. This is in contrast to the current behaviour where such applets will fail to launch, and the failure message presented asks the user to try launching via the Sandbox button next time. This was because the dialog which presented the Sandbox button appeared very early in the JNLPClassLoader's life cycle - early enough that no security settings had yet been set for the classloader or any of the applet's JAR locations - whereas the manifest checks were done later, after these settings would have already been initialized. Fixing the issue was not as simple as doing the manifest checks before presenting the security dialog because the dialog was presented part way through the initialization process, where JARs are being downloaded and checked for signing, so that the appropriate security dialog could be shown to the user. Putting the manifest checks first would therefore not work properly because the JARs were not yet available. This patch resolves the issue by moving the manifest checks inside the method which initializes the relevant security settings, such that the required resources are available, it is known what type of applet is about to be run, but the security settings for the JAR locations have not yet been initialized and the applet can thus still be set to run sandboxed safely. Additionally, the ManifestAttributesChecker check for the Permissions attribute is no longer skipped when Extended Applet Security is set to the Low level, since this allows for signed applets with Sandbox permissions specified in their manifests to run with full permissions when Low security is set. All existing reproducers have been run with this patch applied and there appears to be no effect. Manual tests from the wiki have also been run and no failures noted. Two new applets, reported in PR1767 [0], have been added as test cases to the wiki. These fail without the patch and pass with it. A reproducer is also included, however, the ALACA dialog will appear, which means manual intervention is required to run this test as well. The test is marked KnownToFail and this issue documented with the test case. This cannot be worked around by disabling manifest attributes checking since this would render the test meaningless as the Permissions manifest attribute would then not be run to force sandboxing. ChangeLog: 2014-05-27 Andrew Azores Fixed support for signed applets which specify the Permissions attribute as "sandbox" in their manifests. These applets are now properly run sandboxed automatically, rather than requiring the user to click the "Sandbox" run button. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (JNLPClassLoader): manifest attributes checking and security settings moved inside initializeResources (initializeResources): do not set entries in jarLocationSecurityMap until after prompting the user on whether to run the applet as well as performing manifest attribute checks (initializeManifestAttributesChecker): new method (getJnlpFileCodebase): new method, extracted from initializeResources (SecurityDelegateImpl.setRunInSandbox): throw exception if already forced to run in sandbox, rather than if already prompted * netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java (checkPermissionsAttribute): do not skip checking if Extended Applet Security is Low. Remove try/catch on setRunInSandbox call as this is now supported. * tests/reproducers/custom/SignedAppletManifestSpecifiesSandbox/testcases/SignedAppletManifestSpecifiesSandboxTests.java: new test case * tests/reproducers/custom/SignedAppletManifestSpecifiesSandbox/resources/SignedAppletManifestSpecifiesSandbox.html: same * tests/reproducers/custom/SignedAppletManifestSpecifiesSandbox/srcs/MANIFEST.MF: same * tests/reproducers/custom/SignedAppletManifestSpecifiesSandbox/srcs/Makefile: same * tests/reproducers/custom/SignedAppletManifestSpecifiesSandbox/srcs/SignedAppletManifestSpecifiesSandbox.java: same [0] http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1767 Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: pr1769-4.patch Type: text/x-patch Size: 12705 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pr1769-reproducer.patch Type: text/x-patch Size: 11238 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Tue May 27 19:27:53 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 27 May 2014 19:27:53 +0000 Subject: [Bug 1796] make fails with "computed checksum did NOT match" In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1796 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #1 from Andrew John Hughes --- Yeah, I'm working on a big bump that will update things and also move them back to the IcedTea servers which don't see such breakage. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Tue May 27 19:30:18 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 27 May 2014 19:30:18 +0000 Subject: [Bug 1796] make fails with "computed checksum did NOT match" In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1796 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Wed May 28 12:56:47 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 28 May 2014 12:56:47 +0000 Subject: [Bug 1798] New: Pack and repaint doesnt seem to work properly Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1798 Bug ID: 1798 Summary: Pack and repaint doesnt seem to work properly Product: IcedTea Version: unspecified Hardware: 32-bit OS: Linux Status: NEW Severity: trivial Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: helpcrypto at gmail.com CC: unassigned at icedtea.classpath.org Created attachment 1086 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1086&action=edit test case Hi. Maybe I'm doing something wrong, so -please- excuse any mistake. We have an applet (JDialog) which contains a JPanel (Borderlayout) on center. This JPanel (Borderlayout) contains a label (again on center) with a text that changes according to some operations. We want the dialog be resized to the text size (plus margins/borders). In other words: we want an autosize. I have attached a testcase (not an applet) which also seems to fail. What should happen: Each time I click on foo/bar buttons, the dialog should be resized to fit the contents What happens: The dialog doesnt resize to fit contents. java version "1.7.0_55" OpenJDK Runtime Environment (IcedTea 2.4.7) (7u55-2.4.7-1ubuntu1) OpenJDK Client VM (build 24.51-b03, mixed mode, sharing) Dont hesitate to contact me if you need more info. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From helpcrypto at gmail.com Wed May 28 12:57:42 2014 From: helpcrypto at gmail.com (helpcrypto helpcrypto) Date: Wed, 28 May 2014 14:57:42 +0200 Subject: Painting issues with "autosize". My fault? Your fault? In-Reply-To: <537F47A3.6080008@redhat.com> References: <537CBE81.2050907@redhat.com> <537F47A3.6080008@redhat.com> Message-ID: Just filled Bug 1798 - Pack and repaint doesnt seem to work properly ;) On Fri, May 23, 2014 at 3:05 PM, Jiri Vanek wrote: > On 05/23/2014 09:53 AM, helpcrypto helpcrypto wrote: > >> Thanks as usual, Jiri. >> >> I'll prepare the test and fill a bug as soon as I can...very busy days at >> work >> (why the TODO list is always growing faster than the DONE list???) >> >> Have a great weekend. >> > > > Hmm. It seems that this is new issue. All ITW AWT reproducers started to > fail. They simply never paint their components are based on JDialogue... > > Andrew, may you elaborate on them? > > [send from phone] > > > >> >> On Wed, May 21, 2014 at 4:56 PM, Jiri Vanek > jvanek at redhat.com>> wrote: >> >> On 05/16/2014 09:43 AM, helpcrypto helpcrypto wrote: >> >> Hi. >> >> >> Before filling a bug, I would like to ask if I'm doing it >> properly. >> >> Consider the following scenario: >> -Dialog+BorderLayout+center JPanel with JLabel >> >> In runtime I modify the label from "" to "lorem >> ipsum..." (The lorem ipsum part are several paragraphs) >> And do pack() and repaint(). >> >> *The objective is to automatically resize the dialog depending on >> panels contents* >> >> >> >> Using ORACLE JRE the dialog is redrawn to fit the content, but >> this is not happening on icedtea-web, so part of the text is hidden under >> north, south, east and west panels. >> >> Did I explained myself properly? >> Should I file a bug and attach a test case or I must do it >> another way? >> >> >> >> >> Yes this sounds like a bug. But From desciption is not clear wheter >> it is IcedTea-Web or Openjdk. >> >> It is worthy to try openjdk 6 / 7 / 8 snd proprietary plugin and >> Proprietary JDK 7/8 and icedtea-web to eliminate dead branches. >> >> And hence you see it in Jdialog I suspect OpenJDK itself. Not Icedtea >> web. >> >> Was the window manager always the same? >> >> Are you able to prepare minimalistic reproducer? ( I guess main class >> with few lines of jdialog setup). ? >> >> Then we can try on various JDKS for you. >> >> J. >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Wed May 28 14:57:37 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 28 May 2014 14:57:37 +0000 Subject: [Bug 1798] Pack and repaint doesnt seem to work properly In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1798 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|32-bit |x86 Version|unspecified |2.4.7 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkang at redhat.com Thu May 29 14:19:29 2014 From: jkang at redhat.com (Jie Kang) Date: Thu, 29 May 2014 10:19:29 -0400 (EDT) Subject: JavaScript/LiveConnect Bug PR1794 Reproducer In-Reply-To: <793288477.8454555.1401372763366.JavaMail.zimbra@redhat.com> Message-ID: <1843350295.8458984.1401373169917.JavaMail.zimbra@redhat.com> Hi, Currently, Java to JS access of non-primitive objects (string arrays) is not working. The string array is received as null/undefined. However, access of primitives (strings) is working. Attached is the reproducer test in response to this bug, PR1794 (http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794). Thanks, -------------- next part -------------- A non-text attachment was scrubbed... Name: JToJS-String-Reproducer-2.patch Type: text/x-patch Size: 18762 bytes Desc: not available URL: From bugzilla-daemon at icedtea.classpath.org Thu May 29 14:21:20 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 29 May 2014 14:21:20 +0000 Subject: [Bug 1794] LiveConnect - Problem with String arrays between Java and Javascript In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794 Jie Kang changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jkang at redhat.com --- Comment #1 from Jie Kang --- To elaborate on the actual problem: Access of a string array in JS from Java results in an undefined/null value. However, access of a string works correctly. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jkang at redhat.com Thu May 29 14:27:02 2014 From: jkang at redhat.com (Jie Kang) Date: Thu, 29 May 2014 10:27:02 -0400 (EDT) Subject: [rfc][icedtea-web] Re: JavaScript/LiveConnect Bug PR1794 Reproducer In-Reply-To: <1843350295.8458984.1401373169917.JavaMail.zimbra@redhat.com> References: <1843350295.8458984.1401373169917.JavaMail.zimbra@redhat.com> Message-ID: <1694070155.8463438.1401373622626.JavaMail.zimbra@redhat.com> Hello, Sorry for the mistake. I forgot to place the tags in my subject line. This is an rfc for icedtea-web. Regards, ----- Original Message ----- > Hi, > > Currently, Java to JS access of non-primitive objects (string arrays) is not > working. The string array is received as null/undefined. However, access of > primitives (strings) is working. Attached is the reproducer test in response > to this bug, PR1794 > (http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794). > > > Thanks, From bugzilla-daemon at icedtea.classpath.org Thu May 29 19:07:05 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 29 May 2014 19:07:05 +0000 Subject: [Bug 1801] New: NPE in PluginAppletSecurityContext Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1801 Bug ID: 1801 Summary: NPE in PluginAppletSecurityContext Product: IcedTea-Web Version: hg Hardware: x86_64 OS: Linux Status: NEW Severity: minor Priority: P5 Component: Plugin Assignee: dbhole at redhat.com Reporter: jkang at redhat.com CC: unassigned at icedtea.classpath.org Sometimes the attempt to start a java applet completely fails. The following copy-past and attached log are from the reproducer tests: simple.JSToJSet. (process:17806): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed java version "1.7.0_55" OpenJDK Runtime Environment (fedora-2.4.7.0.fc20-x86_64 u55-b13) OpenJDK 64-Bit Server VM (build 24.51-b03, mixed mode) Application title was not found in manifest. Check with application vendor java.lang.NullPointerException at sun.applet.PluginAppletSecurityContext.handleMessage(PluginAppletSecurityContext.java:574) at sun.applet.AppletSecurityContextManager.handleMessage(AppletSecurityContextManager.java:70) at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:236) at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:95) Error on Java side: null Error on Java side: null plugin-container: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Thu May 29 19:19:53 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 29 May 2014 19:19:53 +0000 Subject: [Bug 1801] NPE in PluginAppletSecurityContext In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1801 Deepak Bhole changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|dbhole at redhat.com |jkang 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: From omajid at redhat.com Thu May 29 22:19:47 2014 From: omajid at redhat.com (Omair Majid) Date: Thu, 29 May 2014 18:19:47 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <5374E325.3000705@redhat.com> References: <5374E325.3000705@redhat.com> Message-ID: <20140529221946.GC2313@redhat.com> Hi Andrew, * Andrew Azores [2014-05-15 11:55]: > I've refactored PolicyEditor so that the policy file model is now in a > separate class, moving PolicyEditor toward MVC design. There still isn't > really a separation between View and Controller though. I am barely familiar with this code, but I have added my comments below. > All the unit tests should still be passing, other than the two that are > marked Known To Fail. I've also done fairly extensive manual testing and it > still seems to work properly as far as I can tell. Okay, then I assume things are working and will mostly pay attention to other things. > +++ b/netx/net/sourceforge/jnlp/security/policyeditor/CustomPolicyViewer.java > + public CustomPolicyViewer(final PolicyEditor parent, final String codebase, final PolicyFileModel policyFile) { > + this.parent = new WeakReference<>(parent); > + private void updateCustomPermissions() { > + parent.get().setChangesMade(); This seems rather strange. You are storing a WeakReference and then calling get() and then operating on the result. Is there a reason you are not just keeping a normal reference to it? > + customPermissions.addAll(policyFile.getCopyOfCustomPermissions().get(codebase)); Is there a reason why you can't just have a `getCustomPermissions` method that returns an immutable version of data (preferred) or a copy of data rather than a separate `getCopyOfCustomPermisions`? Is there a case where you would want a `getCustomPermissions` method that returns a mutable non-copy? > +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java > + cpViewer = new CustomPolicyViewer(weakThis.get(), codebase, policyFile); Why not `this` instead of `weakThis.get()`? > + if (!policyFile.getFile().exists()) { > + try { > + policyFile.getFile().createNewFile(); This sounds like a createOrGet() method that can be added to FileUtils. > +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyFileModel.java > + private final Map> codebasePermissionsMap = new HashMap<>(); Can you add a comment about what the `Boolean` is for? > + fileWatcher = new MD5SumWatcher(file); > + fileWatcher.update(); Any reason you are continuing to use this rather than using the new-to-Java 7 WatchService? > + final FileLock fileLock = FileUtils.getFileLock(file.getAbsolutePath(), false, true); After you have acquired a lock, you should always free it, even in the face of exceptions. See if it's possible to use this idiom: FileLock lock = FileUtils.getFileLock(...) try { ... } finally { lock.release(); } > + sb.append("\n/* Generated by PolicyEditor at ").append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime())).append(" */").append(System.getProperty("line.separator")); Please split this into multiple lines. Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From bugzilla-daemon at icedtea.classpath.org Fri May 30 09:21:32 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 09:21:32 +0000 Subject: [Bug 1802] New: Logic error in checkApplicationLibraryAllowableCodebaseAttribute Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1802 Bug ID: 1802 Summary: Logic error in checkApplicationLibraryAllowableCodebaseAttribute Product: IcedTea-Web Version: hg Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: NetX (javaws) Assignee: omajid at redhat.com Reporter: pdewacht at gmail.com CC: unassigned at icedtea.classpath.org The code that deals with the Application-Library-Allowable-Codebase attribute does not match the comments. The comment says that either documentBase or codebase should match, while the code requires both to match (which is only possible if both are equal). For our site this caused an unnecessary warning. --- icedtea-web-1.5.orig/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java +++ icedtea-web-1.5/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java @@ -290,7 +290,7 @@ public class ManifestAttributesChecker { if (usedUrls.size() == 1) { if (UrlUtils.equalsIgnoreLastSlash(usedUrls.toArray(new URL[0])[0], codebase) - && UrlUtils.equalsIgnoreLastSlash(usedUrls.toArray(new URL[0])[0], documentBase)) { + || UrlUtils.equalsIgnoreLastSlash(usedUrls.toArray(new URL[0])[0], documentBase)) { //all resoources are from codebase or document base. it is ok to proceeed. OutputController.getLogger().log("All applications resources (" + usedUrls.toArray(new URL[0])[0] + ") are from codebas/documentbase " + codebase + "/" + documentBase + ", skipping Application-Library-Allowable-Codebase Attribute check."); return; -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Fri May 30 14:09:31 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 30 May 2014 10:09:31 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <20140529221946.GC2313@redhat.com> References: <5374E325.3000705@redhat.com> <20140529221946.GC2313@redhat.com> Message-ID: <5388911B.2080102@redhat.com> On 05/29/2014 06:19 PM, Omair Majid wrote: >> +++ b/netx/net/sourceforge/jnlp/security/policyeditor/CustomPolicyViewer.java >> + public CustomPolicyViewer(final PolicyEditor parent, final String codebase, final PolicyFileModel policyFile) { >> + this.parent = new WeakReference<>(parent); >> + private void updateCustomPermissions() { >> + parent.get().setChangesMade(); > This seems rather strange. You are storing a WeakReference and then > calling get() and then operating on the result. Is there a reason you > are not just keeping a normal reference to it? I honestly can't remember what reasoning I had for it in the first place, and I can't come up with any reason for it now. Fixed. > >> + customPermissions.addAll(policyFile.getCopyOfCustomPermissions().get(codebase)); > Is there a reason why you can't just have a `getCustomPermissions` > method that returns an immutable version of data (preferred) or a copy > of data rather than a separate `getCopyOfCustomPermisions`? Is there a > case where you would want a `getCustomPermissions` method that returns a > mutable non-copy? It might come up that a mutable non-copy would be needed, although it isn't now. But it seems to me that that's a plausible method that could exist, so I gave the method a name that more explicitly specifies what you actually get back when you call it. Perhaps that's better done via javadoc? I think there deserves to be some indication that what comes back is a copy (immutable or not), so that anyone else working with this doesn't look at it and think that this would be a convenient shortcut to adding batches of permissions to the model. > >> +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java >> + cpViewer = new CustomPolicyViewer(weakThis.get(), codebase, policyFile); > Why not `this` instead of `weakThis.get()`? Well, in this context 'this' is actually an anonymous Runnable, not the PolicyEditor. > >> + if (!policyFile.getFile().exists()) { >> + try { >> + policyFile.getFile().createNewFile(); > This sounds like a createOrGet() method that can be added to FileUtils. Actually, taking a closer look, it's not really needed. createNewFile just returns false if the file already existed, so there's not much point to checking its existence beforehand. > > >> +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyFileModel.java >> + private final Map> codebasePermissionsMap = new HashMap<>(); > Can you add a comment about what the `Boolean` is for? Sure, added. > >> + fileWatcher = new MD5SumWatcher(file); >> + fileWatcher.update(); > Any reason you are continuing to use this rather than using the > new-to-Java 7 WatchService? I was planning to migrate to that eventually - do you mind if it waits for a later patch? > >> + final FileLock fileLock = FileUtils.getFileLock(file.getAbsolutePath(), false, true); > After you have acquired a lock, you should always free it, even in the > face of exceptions. See if it's possible to use this idiom: > > FileLock lock = FileUtils.getFileLock(...) > try { > ... > } finally { > lock.release(); > } Fixed. > >> + sb.append("\n/* Generated by PolicyEditor at ").append(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Calendar.getInstance().getTime())).append(" */").append(System.getProperty("line.separator")); > Please split this into multiple lines. Also fixed. > > Thanks, > Omair > Thanks for the review! New patch attached. I'd probably recommend just vimdiff-ing it against the previous patch, or similar... -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyfilemodel-4.patch Type: text/x-patch Size: 48915 bytes Desc: not available URL: From omajid at redhat.com Fri May 30 14:25:10 2014 From: omajid at redhat.com (Omair Majid) Date: Fri, 30 May 2014 10:25:10 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <5388911B.2080102@redhat.com> References: <5374E325.3000705@redhat.com> <20140529221946.GC2313@redhat.com> <5388911B.2080102@redhat.com> Message-ID: <20140530142509.GB32071@redhat.com> * Andrew Azores [2014-05-30 10:09]: > >>+ customPermissions.addAll(policyFile.getCopyOfCustomPermissions().get(codebase)); > >Is there a reason why you can't just have a `getCustomPermissions` > >method that returns an immutable version of data (preferred) or a copy > >of data rather than a separate `getCopyOfCustomPermisions`? Is there a > >case where you would want a `getCustomPermissions` method that returns a > >mutable non-copy? > > It might come up that a mutable non-copy would be needed, although it isn't > now. But it seems to me that that's a plausible method that could exist, so > I gave the method a name that more explicitly specifies what you actually > get back when you call it. Perhaps that's better done via javadoc? I think > there deserves to be some indication that what comes back is a copy > (immutable or not), so that anyone else working with this doesn't look at it > and think that this would be a convenient shortcut to adding batches of > permissions to the model. In general, I find the idiom of "get a return value, modify that to update the object that returned it" a bad idea because it spreads state around in the codebase. It's best avoided. Anyway, please do consider (eventually) fixing this. > >>+++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java > >>+ cpViewer = new CustomPolicyViewer(weakThis.get(), codebase, policyFile); > >Why not `this` instead of `weakThis.get()`? > > Well, in this context 'this' is actually an anonymous Runnable, not the > PolicyEditor. You can use a slightly different syntax to get hold of an outer class from an inner one: `NameOfParentClass.this`. In this case, it's: PolicyEditor.this Thanks, Omair -- PGP Key: 66484681 (http://pgp.mit.edu/) Fingerprint = F072 555B 0A17 3957 4E95 0056 F286 F14F 6648 4681 From ldracz at redhat.com Fri May 30 15:20:47 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Fri, 30 May 2014 11:20:47 -0400 (EDT) Subject: [rfc][icedtea-web] Temporary Permissions multiple selection In-Reply-To: <957274232.9068220.1401463052067.JavaMail.zimbra@redhat.com> Message-ID: <1155746386.9070283.1401463247330.JavaMail.zimbra@redhat.com> Hello, We noticed the Always Trust checkbox would allow multiple temporary permissions to be set if checked. This patch fixes this problem so that permissions are only added if box is unchecked. Thank you, Lukasz Dracz -------------- next part -------------- A non-text attachment was scrubbed... Name: TemporaryPermissionsButton.patch Type: text/x-patch Size: 1247 bytes Desc: not available URL: From aazores at redhat.com Fri May 30 15:26:59 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 30 May 2014 11:26:59 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <20140530142509.GB32071@redhat.com> References: <5374E325.3000705@redhat.com> <20140529221946.GC2313@redhat.com> <5388911B.2080102@redhat.com> <20140530142509.GB32071@redhat.com> Message-ID: <5388A343.3040906@redhat.com> On 05/30/2014 10:25 AM, Omair Majid wrote: > * Andrew Azores [2014-05-30 10:09]: >>>> + customPermissions.addAll(policyFile.getCopyOfCustomPermissions().get(codebase)); >>> Is there a reason why you can't just have a `getCustomPermissions` >>> method that returns an immutable version of data (preferred) or a copy >>> of data rather than a separate `getCopyOfCustomPermisions`? Is there a >>> case where you would want a `getCustomPermissions` method that returns a >>> mutable non-copy? >> It might come up that a mutable non-copy would be needed, although it isn't >> now. But it seems to me that that's a plausible method that could exist, so >> I gave the method a name that more explicitly specifies what you actually >> get back when you call it. Perhaps that's better done via javadoc? I think >> there deserves to be some indication that what comes back is a copy >> (immutable or not), so that anyone else working with this doesn't look at it >> and think that this would be a convenient shortcut to adding batches of >> permissions to the model. > In general, I find the idiom of "get a return value, modify that to > update the object that returned it" a bad idea because it spreads state > around in the codebase. It's best avoided. Anyway, please do consider > (eventually) fixing this. I don't like that idiom either, hence why I'm not exposing any methods to allow it and am making it clear that the exposed methods can't be used for it ;) > >>>> +++ b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java >>>> + cpViewer = new CustomPolicyViewer(weakThis.get(), codebase, policyFile); >>> Why not `this` instead of `weakThis.get()`? >> Well, in this context 'this' is actually an anonymous Runnable, not the >> PolicyEditor. > You can use a slightly different syntax to get hold of an outer class > from an inner one: `NameOfParentClass.this`. In this case, it's: > > PolicyEditor.this > > Thanks, > Omair > Eh, sure. weakThis is already around and has valid uses (I think), but I can change this to use the direct reference as well. CustomPolicyViewer doesn't handle a null parent very well anyway. New patch only makes the weakThis -> PolicyEditor.this change. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyfilemodel-5.patch Type: text/x-patch Size: 48918 bytes Desc: not available URL: From aazores at redhat.com Fri May 30 15:59:28 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 30 May 2014 11:59:28 -0400 Subject: [rfc][icedtea-web] PolicyEditor model refactor In-Reply-To: <5388A343.3040906@redhat.com> References: <5374E325.3000705@redhat.com> <20140529221946.GC2313@redhat.com> <5388911B.2080102@redhat.com> <20140530142509.GB32071@redhat.com> <5388A343.3040906@redhat.com> Message-ID: <5388AAE0.5070208@redhat.com> On 05/30/2014 11:26 AM, Andrew Azores wrote: > On 05/30/2014 10:25 AM, Omair Majid wrote: >> * Andrew Azores [2014-05-30 10:09]: >>>>> + >>>>> customPermissions.addAll(policyFile.getCopyOfCustomPermissions().get(codebase)); >>>> Is there a reason why you can't just have a `getCustomPermissions` >>>> method that returns an immutable version of data (preferred) or a copy >>>> of data rather than a separate `getCopyOfCustomPermisions`? Is there a >>>> case where you would want a `getCustomPermissions` method that >>>> returns a >>>> mutable non-copy? >>> It might come up that a mutable non-copy would be needed, although >>> it isn't >>> now. But it seems to me that that's a plausible method that could >>> exist, so >>> I gave the method a name that more explicitly specifies what you >>> actually >>> get back when you call it. Perhaps that's better done via javadoc? I >>> think >>> there deserves to be some indication that what comes back is a copy >>> (immutable or not), so that anyone else working with this doesn't >>> look at it >>> and think that this would be a convenient shortcut to adding batches of >>> permissions to the model. >> In general, I find the idiom of "get a return value, modify that to >> update the object that returned it" a bad idea because it spreads state >> around in the codebase. It's best avoided. Anyway, please do consider >> (eventually) fixing this. > > I don't like that idiom either, hence why I'm not exposing any methods > to allow it and am making it clear that the exposed methods can't be > used for it ;) > >> >>>>> +++ >>>>> b/netx/net/sourceforge/jnlp/security/policyeditor/PolicyEditor.java >>>>> + cpViewer = new >>>>> CustomPolicyViewer(weakThis.get(), codebase, policyFile); >>>> Why not `this` instead of `weakThis.get()`? >>> Well, in this context 'this' is actually an anonymous Runnable, not the >>> PolicyEditor. >> You can use a slightly different syntax to get hold of an outer class >> from an inner one: `NameOfParentClass.this`. In this case, it's: >> >> PolicyEditor.this >> >> Thanks, >> Omair >> > > Eh, sure. weakThis is already around and has valid uses (I think), but > I can change this to use the direct reference as well. > CustomPolicyViewer doesn't handle a null parent very well anyway. > > New patch only makes the weakThis -> PolicyEditor.this change. > > Thanks, > Oops, sorry. There was also an imports change in FileUtils that was meant to be cleaned first. That won't be included if/when this is pushed. Thanks, -- Andrew A From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:34:03 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:34:03 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|1543 | -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:34:03 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:34:03 +0000 Subject: [Bug 1698] [TRACKER] IcedTea 2.6.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1698 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1543 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:34:03 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:34:03 +0000 Subject: [Bug 1543] [METABUG] [IcedTea7] Support /etc/os-release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1543 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|1284 |1698 Target Milestone|2.5.0 |2.6.0 --- Comment #1 from Andrew John Hughes --- As u60 has been released and this is pretty involved, move it back to 2.6.0. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:34:24 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:34:24 +0000 Subject: [Bug 1544] [IcedTea7] autoconf checks should use /etc/os-release in preference to lsb_release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1544 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.5.0 |2.6.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:34:31 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:34:31 +0000 Subject: [Bug 1545] [IcedTea7] Font configuration should check /etc/os-release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1545 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.5.0 |2.6.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:34:39 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:34:39 +0000 Subject: [Bug 1546] [IcedTea7] Sanity check should read /etc/os-release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1546 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|2.5.0 |2.6.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:35:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:35:55 +0000 Subject: [Bug 1547] [METABUG] [IcedTea8] Support /etc/os-release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1547 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|1282 |1740 Target Milestone|3.0.0 |3.1.0 --- Comment #1 from Andrew John Hughes --- Reschedule to 3.1.0. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:35:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:35:55 +0000 Subject: [Bug 1740] [TRACKER] IcedTea 3.1.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1740 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1547 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:35:55 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:35:55 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|1547 | -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:36:04 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:36:04 +0000 Subject: [Bug 1548] [IcedTea8] autoconf checks should use /etc/os-release in preference to lsb_release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1548 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.0 |3.1.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:36:14 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:36:14 +0000 Subject: [Bug 1549] [IcedTea8] Font configuration should check /etc/os-release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1549 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.0 |3.1.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:36:21 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:36:21 +0000 Subject: [Bug 1550] [IcedTea8] Sanity check should read /etc/os-release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1550 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.0 |3.1.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:56:21 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:56:21 +0000 Subject: [Bug 1779] A fatal error has been detected by the Java Runtime Environment In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1779 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|critical |normal --- Comment #1 from Andrew John Hughes --- Do you have a way to reproduce this? Also it's not clear what version is being used here. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:56:49 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:56:49 +0000 Subject: [Bug 1759] Bonita Software crashes on Ubuntu 14.04 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1759 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1078|text/x-log |text/plain mime type| | -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:57:33 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:57:33 +0000 Subject: [Bug 1759] Bonita Software crashes on Ubuntu 14.04 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1759 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew John Hughes --- This is a crash in the native code of libsoup, not the JDK. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 18:57:52 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 18:57:52 +0000 Subject: [Bug 1760] a fatal error SIGSEGV (0xb) at pc=0x6a492bec, pid=17406, tid=3059387200 In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1760 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aazores at redhat.com Fri May 30 19:19:35 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 30 May 2014 15:19:35 -0400 Subject: [rfc][icedtea-web][policyeditor] Enhancement: added Rename, Copy, and Paste actions Message-ID: <5388D9C7.3090006@redhat.com> Hi, As alluded to in the subject, this patch adds three new actions to PolicyEditor. They are all available through the new Edit menu. The Rename action allows a codebase entry to be renamed, keeping all of the same permissions. The Copy and Paste actions can be used to duplicate the permissions of one codebase and grant them to a new codebase, which makes it easier to produce two codebase entries with very similar permissions granted. This patch also fixes a bug where removing a codebase only did so for the standard permissions map which models the checkboxes in the main PolicyEditor UI, but did not remove custom permissions granted to the codebase through CustomPolicyViewer. There are also some very minor refactors included, noted in the in-patch ChangeLog. Thanks, -- Andrew A -------------- next part -------------- A non-text attachment was scrubbed... Name: policyeditor-rename-copy-paste.patch Type: text/x-patch Size: 10007 bytes Desc: not available URL: From aazores at redhat.com Fri May 30 20:06:57 2014 From: aazores at redhat.com (Andrew Azores) Date: Fri, 30 May 2014 16:06:57 -0400 Subject: JavaScript/LiveConnect Bug PR1794 Reproducer In-Reply-To: <1843350295.8458984.1401373169917.JavaMail.zimbra@redhat.com> References: <1843350295.8458984.1401373169917.JavaMail.zimbra@redhat.com> Message-ID: <5388E4E1.7010301@redhat.com> On 05/29/2014 10:19 AM, Jie Kang wrote: > Hi, > > Currently, Java to JS access of non-primitive objects (string arrays) is not working. The string array is received as null/undefined. However, access of primitives (strings) is working. Attached is the reproducer test in response to this bug, PR1794 (http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794). > > > Thanks, Looks good. Will push on your behalf. Thanks, -- Andrew A From aazores at icedtea.classpath.org Fri May 30 20:08:04 2014 From: aazores at icedtea.classpath.org (aazores at icedtea.classpath.org) Date: Fri, 30 May 2014 20:08:04 +0000 Subject: /hg/icedtea-web: Added reproducer for PR1794 Message-ID: changeset ef96a1c8776b in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ef96a1c8776b author: Andrew Azores date: Fri May 30 16:07:45 2014 -0400 Added reproducer for PR1794 Added reproducer for PR1794: Bug where Java variables are not accessed correctly through Javascript. Attempt to access a string array results in undefined result. However, attempt to access a string results in receiving correct value of string. Tests html applet and jnlp-href applet * tests/reproducers/simple/JToJSString/testcases/JToJSStringTest.java: New reproducer for PR1794 * tests/reproducers/simple/JToJSString/resources/JToJSString.html: same * tests/reproducers/simple/JToJSString/resources/JToJSJnlpApplet.html: same * tests/reproducers/simple/JToJSString/resources/JToJSString.js: same * tests/reproducers/simple/JToJSString/resources/JToJSApplet.jnlp: same * tests/reproducers/simple/JToJSString/srcs/JToJSString.java: same diffstat: ChangeLog | 20 + tests/reproducers/simple/JToJSString/resources/JToJSString.html | 59 +++++ tests/reproducers/simple/JToJSString/resources/JToJSString.js | 49 ++++ tests/reproducers/simple/JToJSString/resources/JToJSStringApplet.jnlp | 53 ++++ tests/reproducers/simple/JToJSString/resources/JToJSStringJnlpApplet.html | 60 +++++ tests/reproducers/simple/JToJSString/srcs/JToJSString.java | 98 ++++++++ tests/reproducers/simple/JToJSString/testcases/JToJSStringTest.java | 112 ++++++++++ 7 files changed, 451 insertions(+), 0 deletions(-) diffs (486 lines): diff -r e5a7d39eecbb -r ef96a1c8776b ChangeLog --- a/ChangeLog Fri May 23 15:02:48 2014 +0200 +++ b/ChangeLog Fri May 30 16:07:45 2014 -0400 @@ -1,3 +1,23 @@ +2014-05-29 Jie Kang + + Added reproducer for PR1794: Bug where Java variables are not accessed + correctly through Javascript. Attempt to access a string array results + in undefined result. However, attempt to access a string results in + receiving correct value of string. Tests html applet and jnlp-href + applet + * tests/reproducers/simple/JToJSString/testcases/JToJSStringTest.java: + New reproducer for PR1794 + * tests/reproducers/simple/JToJSString/resources/JToJSString.html: + same + * tests/reproducers/simple/JToJSString/resources/JToJSJnlpApplet.html: + same + * tests/reproducers/simple/JToJSString/resources/JToJSString.js: + same + * tests/reproducers/simple/JToJSString/resources/JToJSApplet.jnlp: + same + * tests/reproducers/simple/JToJSString/srcs/JToJSString.java: + same + 2014-05-23 Jiri Vanek Fixed cache tests diff -r e5a7d39eecbb -r ef96a1c8776b tests/reproducers/simple/JToJSString/resources/JToJSString.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JToJSString/resources/JToJSString.html Fri May 30 16:07:45 2014 -0400 @@ -0,0 +1,59 @@ + + + + +
+
+
+
+
+
------------ +
+
+
+
+
+ + + + + + \ No newline at end of file diff -r e5a7d39eecbb -r ef96a1c8776b tests/reproducers/simple/JToJSString/resources/JToJSString.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JToJSString/resources/JToJSString.js Fri May 30 16:07:45 2014 -0400 @@ -0,0 +1,49 @@ +function writeToJS(myStringArray) { + var tojs = document.getElementById("writetojs"); + tojs.innerHTML = "" + myStringArray[0] + myStringArray[1] + + myStringArray[2]; +} + +function writeToJSs(myString) { + var tojss = document.getElementById("writetojss"); + tojss.innerHTML = myString; +} + +function getDOMElementByID(id) { + return document.getElementById(id).innerHTML; +} + +function attemptTest() { + try { + failMessage.innerHTML = failMessage.innerHTML + new Date().getTime() / 1000 + notice.innerHTML = "1"; + testapplet.printFromJS("Stage 1 reached"); + + var byids = document.getElementById("byids"); + notice.innerHTML = "2"; + testapplet.printFromJS("Stage 2 reached"); + + byids.innerHTML = "String by Id: " + testapplet.myString; + notice.innerHTML = "3"; + testapplet.printFromJS("Stage 3 reached"); + + var byid = document.getElementById("byid"); + notice.innerHTML = "4"; + testapplet.printFromJS("Stage 4 reached"); + + byid.innerHTML = "StringArray by Id: " + testapplet.myStringArray[0] + + ", " + testapplet.myStringArray[1] + ", " + + testapplet.myStringArray[2]; + notice.innerHTML = "5"; + testapplet.printFromJS("Stage 5 reached"); + + testapplet.readStringAndFinish(); + notice.innerHTML = "6"; + testapplet.printFromJS("Stage 6 reached"); + } catch (err) { + failMessage.innerHTML = failMessage.innerHTML + err.message; + setTimeout(attemptTest, 100); + } +} + +attemptTest(); \ No newline at end of file diff -r e5a7d39eecbb -r ef96a1c8776b tests/reproducers/simple/JToJSString/resources/JToJSStringApplet.jnlp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JToJSString/resources/JToJSStringApplet.jnlp Fri May 30 16:07:45 2014 -0400 @@ -0,0 +1,53 @@ + + + + + JavaToJS + IcedTea + + LiveConnect - Output Strings from Array from Java to JS + + + + + + + + + \ No newline at end of file diff -r e5a7d39eecbb -r ef96a1c8776b tests/reproducers/simple/JToJSString/resources/JToJSStringJnlpApplet.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JToJSString/resources/JToJSStringJnlpApplet.html Fri May 30 16:07:45 2014 -0400 @@ -0,0 +1,60 @@ + + + + +
+
+
+
+
+
+
------------ +
+
+
+
+
+ + + + + + \ No newline at end of file diff -r e5a7d39eecbb -r ef96a1c8776b tests/reproducers/simple/JToJSString/srcs/JToJSString.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JToJSString/srcs/JToJSString.java Fri May 30 16:07:45 2014 -0400 @@ -0,0 +1,98 @@ +/* +Copyright (C) 2014 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 netscape.javascript.JSObject; + +public class JToJSString extends Applet { + + public String[] myStringArray = { "a", "b", "c" }; + public String myString = "notarrayitem"; + + private final String writetojs = "writetojs"; + private final String writetojss = "writetojss"; + + private JSObject window; + + @Override + public void init() { + System.out.println("init"); + // JSObject window = JSObject.getWindow(this); + window = JSObject.getWindow(this); + + if (window == null) { + System.out.println("init stage: window is null"); + } else { + System.out.println(window.toString()); + + window.call("writeToJS", new Object[] { myStringArray }); + window.call("writeToJSs", new Object[] { myString }); + + System.out.println("init stage: complete"); + } + } + + public void jjsReadString(String element) { + System.out.println("jjsReadString " + element); + if (window == null) { + window = JSObject.getWindow(this); + System.out.println("jjsReadString stage: window is null"); + } + + Object value = window.call("getDOMElementByID", new Object[] { element }); + System.out.println(value); + + } + + public void readStringAndFinish() { + System.out.println("readStringAndFinish"); + + jjsReadString("writetojs"); + jjsReadString("writetojss"); + + System.out.println("afterTests"); + } + + public void printFromJS(String text) { + System.out.println(text); + } + + @Override + public void destroy() { + System.out.println("destroy"); + } +} diff -r e5a7d39eecbb -r ef96a1c8776b tests/reproducers/simple/JToJSString/testcases/JToJSStringTest.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/JToJSString/testcases/JToJSStringTest.java Fri May 30 16:07:45 2014 -0400 @@ -0,0 +1,112 @@ +/* +Copyright (C) 2014 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.ProcessResult; +import net.sourceforge.jnlp.annotations.Bug; +import net.sourceforge.jnlp.annotations.KnownToFail; +import net.sourceforge.jnlp.annotations.NeedsDisplay; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.CountingClosingListener; + +import org.junit.Assert; +import org.junit.Test; + +public class JToJSStringTest extends BrowserTest { + // the JS<->J tests tend to make Opera unusable + private static final boolean doNotRunInOpera = true; + + private static final String initStr = "init"; + private static final String afterStr = "afterTests"; + + private class CountingClosingListenerImpl extends CountingClosingListener { + @Override + protected boolean isAlowedToFinish(String s) { + return (s.contains(initStr) && s.contains(afterStr)); + } + } + + private static void evaluateStdoutContents(String expectedStdout, ProcessResult pr) { + Assert.assertTrue("JSToJSet: the stdout should contain " + initStr + ", but it didnt.", pr.stdout.contains(initStr)); + Assert.assertTrue("JSToJSet: the output should include: " + expectedStdout + ", but it didnt.", pr.stdout.contains(expectedStdout)); + } + + private void javaToJSTest(String url, String expectedStdout) throws Exception { + if (doNotRunInOpera) { + if (server.getCurrentBrowser().getID() == Browsers.opera) { + return; + } + ProcessResult pr = server.executeBrowser(url, new CountingClosingListenerImpl(), new CountingClosingListenerImpl()); + evaluateStdoutContents(expectedStdout, pr); + } + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + @KnownToFail + @Bug(id = { "PR1794" }) + public void StringArrayTest() throws Exception { + javaToJSTest("/JToJSString.html", "abc"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + public void StringTest() throws Exception { + javaToJSTest("/JToJSString.html", "notarrayitem"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + @KnownToFail + @Bug(id = { "PR1794" }) + public void jnlpStringArrayAppletTest() throws Exception { + javaToJSTest("/JToJSStringJnlpApplet.html", "abc"); + } + + @Test + @TestInBrowsers(testIn = { Browsers.all }) + @NeedsDisplay + @Bug(id = { "PR1794" }) + public void jnlpStringAppletTest() throws Exception { + javaToJSTest("/JToJSStringJnlpApplet.html", "notarrayitem"); + } +} From bugzilla-daemon at icedtea.classpath.org Fri May 30 20:08:19 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 20:08:19 +0000 Subject: [Bug 1794] LiveConnect - Problem with String arrays between Java and Javascript In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1794 --- Comment #2 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea-web?cmd=changeset;node=ef96a1c8776b author: Andrew Azores date: Fri May 30 16:07:45 2014 -0400 Added reproducer for PR1794 Added reproducer for PR1794: Bug where Java variables are not accessed correctly through Javascript. Attempt to access a string array results in undefined result. However, attempt to access a string results in receiving correct value of string. Tests html applet and jnlp-href applet * tests/reproducers/simple/JToJSString/testcases/JToJSStringTest.java: New reproducer for PR1794 * tests/reproducers/simple/JToJSString/resources/JToJSString.html: same * tests/reproducers/simple/JToJSString/resources/JToJSJnlpApplet.html: same * tests/reproducers/simple/JToJSString/resources/JToJSString.js: same * tests/reproducers/simple/JToJSString/resources/JToJSApplet.jnlp: same * tests/reproducers/simple/JToJSString/srcs/JToJSString.java: same -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ldracz at redhat.com Fri May 30 20:44:30 2014 From: ldracz at redhat.com (Lukasz Dracz) Date: Fri, 30 May 2014 16:44:30 -0400 (EDT) Subject: [rfc][icedtea-web] Temporary Permissions as check boxes In-Reply-To: <76818974.9206008.1401482569250.JavaMail.zimbra@redhat.com> Message-ID: <478067093.9206491.1401482670568.JavaMail.zimbra@redhat.com> Hello, I have changed the Temporary Permissions menu items into check box menu items, and changed up the behaviour to take this into account. Adding the set of permissions happens when a check box is selected and removed when not, to a new temporary Permissions collection. When the user is satisfied with the selection of temporary permissions they have chosen, they press sandbox which is when the new temporary Permissions collection gets applied like the old way. A planned future patch is to restructure the temporary permissions into categories and presets that would make better sense under this check box concept. Changelog: 2014-05-30 Lukasz Dracz Changed Temporary Permissions from menu items to check box menu items * netx/net/sourceforge/jnlp/security/dialogs/TemporaryPermissionsButton.java (TemporaryPermissionsListener.actionPerformed): Added behaviour to add or remove permissions from a new collection of permissions based on whether the item is checked or not (TemporaryPermissionsButton.TemporaryPermissionsButton): Added action listener and applied the new collection of permissions for when the sandbox button is pressed Thank you, Lukasz Dracz From bugzilla-daemon at icedtea.classpath.org Fri May 30 20:51:23 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 20:51:23 +0000 Subject: [Bug 1805] New: fatal error crash running iDRAC7 virtual media Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1805 Bug ID: 1805 Summary: fatal error crash running iDRAC7 virtual media Product: IcedTea Version: 7-hg Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: mcr at sandelman.ca CC: unassigned at icedtea.classpath.org Created attachment 1088 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1088&action=edit error report One runs the javaws for the remote console for a Dell "iDRAC7" server using javaws. Use the menu item to attach virtual media, and one gets a crash. (Oracle7 does no better at this point, btw) # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f62e56d9a87, pid=11469, tid=140062712780544 # # JRE version: 7.0_03-b21 # Java VM: OpenJDK 64-Bit Server VM (22.0-b10 mixed mode linux-amd64 compressed oops) # Derivative: IcedTea7 2.1.7 # Distribution: Debian GNU/Linux 7.0 (wheezy), package 7u3-2.1.7-1 # Problematic frame: # C [libVMAPI_DLL.so+0xe1a87] ASocket::linuxConnect(char const*, int)+0x18d # # Core dump written. Default location: /home/mcr/core or core.11469 (max size 200 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/mcr/hs_err_pid11469.log # # If you would like to submit a bug report, please include # instructions on how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:23:02 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:23:02 +0000 Subject: [Bug 1806] New: [IcedTea8] Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1806 Bug ID: 1806 Summary: [IcedTea8] Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK Product: IcedTea Version: 8-hg Hardware: all OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org IcedTea 8 currently doesn't automatically detect the OpenJDK 7 (and potential 8) installations on Debian/Ubuntu found in java-{7,8}-openjdk. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:23:47 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:23:47 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1806 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:23:47 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:23:47 +0000 Subject: [Bug 1806] [IcedTea8] Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1806 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1282 Target Milestone|--- |3.0.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From andrew at icedtea.classpath.org Fri May 30 21:32:01 2014 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 30 May 2014 21:32:01 +0000 Subject: /hg/icedtea: 3 new changesets Message-ID: changeset d8f74d379cf5 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=d8f74d379cf5 author: Andrew John Hughes date: Mon May 12 20:17:41 2014 +0100 Use 02 (for u2) as the update version. 2012-10-08 Andrew John Hughes * Makefile.am: Move JDK_UPDATE_VERSION and COMBINED_VERSION to top of file with OPENJDK_VERSION. (JDK_UPDATE_VERSION): Set to 02 for u2. changeset 3d2a25b6d167 in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=3d2a25b6d167 author: Andrew John Hughes date: Fri May 30 19:59:09 2014 +0100 PR1796: make fails with "computed checksum did NOT match" 2014-05-29 Andrew John Hughes * patches/alt-jar.patch, * patches/cacao/arch.patch, * patches/debian/uname.patch: Applied to upstream IcedTea forest. * patches/pr1368-debug_jdk_libs.patch, * patches/pr1368-debug_jdk_programs.patch: Applied to upstream OpenJDK. * patches/rhino.patch: Rhino has been removed. * INSTALL: Mention --with-nashorn-src-zip. * Makefile.am: (OPENJDK_VERSION): Bump to b10. (JDK_UPDATE_VERSION): Bump to 20. (CORBA_CHANGESET): Update to 3.0.0pre01 . (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (NASHORN_CHANGESET): Added & likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. (NASHORN_SHA256SUM): Added & likewise. (OPENJDK_URL): Switch back to IcedTea. (CORBA_URL): Likewise. (JAXP_URL): Likewise. (JAXWS_URL): Likewise. (JDK_URL): Likewise. (LANGTOOLS_URL): Likewise. (HOTSPOT_URL): Likewise. (NASHORN_URL): Added. (VERSION_SETTINGS_FILE): Store path of file needed to store version variable settings. (NASHORN_SRC_ZIP): Added. (ICEDTEA_PATCHES): Drop upstreamed & removed patches. (.PHONY): Add clean-download-nashorn and clean-extract-nashorn. (download): Depend on download-nashorn. (clean-download): Depend on clean-download-nashorn. (download-nashorn): Download the Nashorn source zip if necessary. (clean-download-nashorn): Cleanup for download-nashorn. (extract): Depend on extract-nashorn. (extract-nashorn); Extract the Nashorn source zip if necessary. (clean-extract-nashorn): Cleanup for extract-nashorn. (versioning): Replace hardcoded path with VERSION_SETTINGS_FILE. * NEWS: Updated. * acinclude.m4: (IT_WITH_NASHORN_SRC_ZIP): New macro to allow Nashorn source file to be set. * configure.ac: Bump version to 3.0.0pre01. Invoke IT_WITH_NASHORN_SRC_ZIP. * hotspot.map: Bump to 3.0.0pre01. * patches/memory-limits.patch, * patches/nss-config.patch, * patches/nss-not-enabled-config.patch: Regenerated. changeset 8543b35292bb in /hg/icedtea details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8543b35292bb author: Andrew John Hughes date: Fri May 30 22:31:03 2014 +0100 PR1806: Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK 2014-05-30 Andrew John Hughes PR1806: Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK * NEWS: Updated. * acinclude.m4: (IT_CHECK_FOR_JDK): Add java-7-openjdk and java-8-openjdk to ICEDTEA7_VMS and ICEDTEA8_VMS respectively. diffstat: ChangeLog | 84 +++++ INSTALL | 1 + Makefile.am | 148 ++++++--- NEWS | 17 + acinclude.m4 | 25 +- configure.ac | 3 +- hotspot.map | 2 +- patches/alt-jar.patch | 15 - patches/cacao/arch.patch | 87 ------ patches/debian/uname.patch | 26 - patches/memory-limits.patch | 8 +- patches/nss-config.patch | 17 +- patches/nss-not-enabled-config.patch | 8 +- patches/pr1368-debug_jdk_libs.patch | 460 -------------------------------- patches/pr1368-debug_jdk_programs.patch | 43 -- patches/rhino.patch | 157 ---------- 16 files changed, 244 insertions(+), 857 deletions(-) diffs (truncated from 1341 to 500 lines): diff -r 24d0bdd59f32 -r 8543b35292bb ChangeLog --- a/ChangeLog Fri Apr 18 20:41:34 2014 +0100 +++ b/ChangeLog Fri May 30 22:31:03 2014 +0100 @@ -1,3 +1,87 @@ +2014-05-30 Andrew John Hughes + + PR1806: Support Debian/Ubuntu 7 & 8 OpenJDK + Installs as Boot JDK + * NEWS: Updated. + * acinclude.m4: + (IT_CHECK_FOR_JDK): Add java-7-openjdk + and java-8-openjdk to ICEDTEA7_VMS and + ICEDTEA8_VMS respectively. + +2014-05-29 Andrew John Hughes + + * patches/alt-jar.patch, + * patches/cacao/arch.patch, + * patches/debian/uname.patch: + Applied to upstream IcedTea forest. + * patches/pr1368-debug_jdk_libs.patch, + * patches/pr1368-debug_jdk_programs.patch: + Applied to upstream OpenJDK. + * patches/rhino.patch: + Rhino has been removed. + * INSTALL: Mention --with-nashorn-src-zip. + * Makefile.am: + (OPENJDK_VERSION): Bump to b10. + (JDK_UPDATE_VERSION): Bump to 20. + (CORBA_CHANGESET): Update to 3.0.0pre01 . + (JAXP_CHANGESET): Likewise. + (JAXWS_CHANGESET): Likewise. + (JDK_CHANGESET): Likewise. + (LANGTOOLS_CHANGESET): Likewise. + (OPENJDK_CHANGESET): Likewise. + (NASHORN_CHANGESET): Added & likewise. + (CORBA_SHA256SUM): Likewise. + (JAXP_SHA256SUM): Likewise. + (JAXWS_SHA256SUM): Likewise. + (JDK_SHA256SUM): Likewise. + (LANGTOOLS_SHA256SUM): Likewise. + (OPENJDK_SHA256SUM): Likewise. + (NASHORN_SHA256SUM): Added & likewise. + (OPENJDK_URL): Switch back to IcedTea. + (CORBA_URL): Likewise. + (JAXP_URL): Likewise. + (JAXWS_URL): Likewise. + (JDK_URL): Likewise. + (LANGTOOLS_URL): Likewise. + (HOTSPOT_URL): Likewise. + (NASHORN_URL): Added. + (VERSION_SETTINGS_FILE): Store path of file + needed to store version variable settings. + (NASHORN_SRC_ZIP): Added. + (ICEDTEA_PATCHES): Drop upstreamed & removed + patches. + (.PHONY): Add clean-download-nashorn and + clean-extract-nashorn. + (download): Depend on download-nashorn. + (clean-download): Depend on clean-download-nashorn. + (download-nashorn): Download the Nashorn source + zip if necessary. + (clean-download-nashorn): Cleanup for download-nashorn. + (extract): Depend on extract-nashorn. + (extract-nashorn); Extract the Nashorn source zip if + necessary. + (clean-extract-nashorn): Cleanup for extract-nashorn. + (versioning): Replace hardcoded path with VERSION_SETTINGS_FILE. + * NEWS: Updated. + * acinclude.m4: + (IT_WITH_NASHORN_SRC_ZIP): New macro to allow Nashorn + source file to be set. + * configure.ac: + Bump version to 3.0.0pre01. Invoke IT_WITH_NASHORN_SRC_ZIP. + * hotspot.map: + Bump to 3.0.0pre01. + * patches/memory-limits.patch, + * patches/nss-config.patch, + * patches/nss-not-enabled-config.patch: + Regenerated. + +2012-10-08 Andrew John Hughes + + * Makefile.am: + Move JDK_UPDATE_VERSION and COMBINED_VERSION + to top of file with OPENJDK_VERSION. + (JDK_UPDATE_VERSION): Set to 02 for u2. + 2014-04-18 Andrew John Hughes * NEWS: diff -r 24d0bdd59f32 -r 8543b35292bb INSTALL --- a/INSTALL Fri Apr 18 20:41:34 2014 +0100 +++ b/INSTALL Fri May 30 22:31:03 2014 +0100 @@ -151,6 +151,7 @@ * --with-jaxws-src-zip: Specify the location of the JAXWS tarball to avoid downloading. * --with-jdk-src-zip: Specify the location of the JDK tarball to avoid downloading. * --with-langtools-src-zip: Specify the location of the langtools tarball to avoid downloading. +* --with-nashorn-src-zip: Specify the location of the Nashorn tarball to avoid downloading. * --with-alt-jar: Use the specified jar binary in the second stage rather than the one just built. * --with-jaxp-drop-zip: Specify the location of the JAXP source drop zip file to avoid downloading. * --with-jaf-drop-zip: Specify the location of the JAF source drop zip file to avoid downloading. diff -r 24d0bdd59f32 -r 8543b35292bb Makefile.am --- a/Makefile.am Fri Apr 18 20:41:34 2014 +0100 +++ b/Makefile.am Fri May 30 22:31:03 2014 +0100 @@ -1,20 +1,24 @@ # Dependencies -OPENJDK_VERSION = b80 +OPENJDK_VERSION = b10 +JDK_UPDATE_VERSION = 20 +COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) -CORBA_CHANGESET = 2a00aeeb466b -JAXP_CHANGESET = ef3495555a4c -JAXWS_CHANGESET = c88bb21560cc -JDK_CHANGESET = 758db1c4c65c -LANGTOOLS_CHANGESET = ed69d087fdfd -OPENJDK_CHANGESET = cd7f2c7e2a0e +CORBA_CHANGESET = a96c01f523be +JAXP_CHANGESET = e16be40cfc32 +JAXWS_CHANGESET = 806fa0e68d92 +JDK_CHANGESET = dc14d13daa5e +LANGTOOLS_CHANGESET = dd7b57ab4ab1 +OPENJDK_CHANGESET = e0a10e6be00a +NASHORN_CHANGESET = fdcdffd5b5b1 -CORBA_SHA256SUM = fd30dec3d15ad284365facb0a9195188c95033e908c8c247d137046fc501b2df -JAXP_SHA256SUM = f7f5ee6e725499bc0b2944182d6b206a661d1da271ab2dff59c282550d89e6e4 -JAXWS_SHA256SUM = b8e27c4fe7214c0c916f554b91a6f1ecff522c7b76b06be1abaf71a835bbca37 -JDK_SHA256SUM = a0918d63bdc9da8461dbb47b0135a8ce522ca943bb2a88558cbf0a63c75a506a -LANGTOOLS_SHA256SUM = b2f3407fbcc539d61bd6d4830b7e97cc53e5175fea262d6543610fccb3f7c0f3 -OPENJDK_SHA256SUM = b02a1a2ac30e8611e9110e03ea6705a80c21c286411118be5300cab7a65eb651 +CORBA_SHA256SUM = 1ce659773584949b01ecdbc897099352aea4fa2ac40b7a55ff64f4b68e12ffc9 +JAXP_SHA256SUM = c2422395c291cfdf8fce7e87c7a45226ba4c64fd73d614675659f21a7c82b902 +JAXWS_SHA256SUM = 4364b4ddf7031b1b4a17fdd11d0e642203e0e66242a2c4d2ba02fc5587d2711d +JDK_SHA256SUM = 7db207899441a22daeef26620930ec76653c0860fcb6fc288f9547ae436fdc83 +LANGTOOLS_SHA256SUM = 1aa3b505f3fbb3cc01d480dae0196c7038982bd29ae2df84ad14d587d29976cc +OPENJDK_SHA256SUM = c8f540a9eccec00df2fa0d93595fdb8eab6384ad3d0579095928aed1591c7a39 +NASHORN_SHA256SUM = fb245c9a4a47b68aece3c4f0cac6fc8ac91c8458bb91648b9a8e3d95ed3981ea HS_SHA256SUM = "`$(AWK) 'version==$$1 {print $$4}' version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map`" HS_CHANGESET = "`$(AWK) 'version==$$1 {print $$3}' version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map`" @@ -41,13 +45,14 @@ BSD_HG_URL = http://hg.openjdk.java.net/bsd-port/bsd-port NIO2_HG_URL = http://hg.openjdk.java.net/nio/nio/ -OPENJDK_URL = $(OPENJDK_HG_URL) -CORBA_URL = $(OPENJDK_HG_URL)/corba -JAXP_URL = $(OPENJDK_HG_URL)/jaxp -JAXWS_URL = $(OPENJDK_HG_URL)/jaxws -JDK_URL = $(OPENJDK_HG_URL)/jdk -LANGTOOLS_URL = $(OPENJDK_HG_URL)/langtools -HOTSPOT_URL = $(OPENJDK_HG_URL)/hotspot +OPENJDK_URL = $(ICEDTEA_HG_URL) +CORBA_URL = $(ICEDTEA_HG_URL)/corba +JAXP_URL = $(ICEDTEA_HG_URL)/jaxp +JAXWS_URL = $(ICEDTEA_HG_URL)/jaxws +JDK_URL = $(ICEDTEA_HG_URL)/jdk +LANGTOOLS_URL = $(ICEDTEA_HG_URL)/langtools +HOTSPOT_URL = $(ICEDTEA_HG_URL)/hotspot +NASHORN_URL = $(ICEDTEA_HG_URL)/nashorn # Build directories @@ -92,6 +97,8 @@ SOURCEPATH_DIRS = $(OPENJDK_SOURCEPATH_DIRS) +VERSION_SETTINGS_FILE = openjdk/jdk/make/ProfileNames.gmk + # Sources used from OpenJDK. #PR43148 - javac fails due to missing java.util.regex.Matcher.quoteReplacement #PR48033 - Missing javax.management.remote.JMXServiceURL @@ -120,6 +127,7 @@ JDK_SRC_ZIP = LANGTOOLS_SRC_ZIP = HOTSPOT_SRC_ZIP = + NASHORN_SRC_ZIP = else OPENJDK_SRC_ZIP = openjdk.tar.gz CORBA_SRC_ZIP = corba.tar.gz @@ -128,6 +136,7 @@ JDK_SRC_ZIP = jdk.tar.gz LANGTOOLS_SRC_ZIP = langtools.tar.gz HOTSPOT_SRC_ZIP = hotspot.tar.gz + NASHORN_SRC_ZIP = nashorn.tar.gz endif if ENABLE_PULSE_JAVA @@ -211,21 +220,10 @@ ICEDTEA_PATCHES = \ patches/memory-limits.patch \ - patches/debian/uname.patch \ - patches/override-redirect-metacity.patch \ - patches/alt-jar.patch \ - patches/cacao/arch.patch \ - patches/disable-intree-ec.patch \ - patches/pr1368-debug_jdk_libs.patch \ - patches/pr1368-debug_jdk_programs.patch + patches/override-redirect-metacity.patch # Conditional patches -if WITH_RHINO -ICEDTEA_PATCHES += \ - patches/rhino.patch -endif - if BUILD_CACAO ICEDTEA_PATCHES += \ patches/cacao/launcher.patch \ @@ -269,9 +267,6 @@ ICEDTEA_SHARK_BUILD = true endif -JDK_UPDATE_VERSION = $(shell echo $(OPENJDK_VERSION) | sed -e "s/^b//") -COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) - ICEDTEA_NAME = IcedTea if HAS_ICEDTEA_REVISION ICEDTEA_REV = +${ICEDTEA_REVISION} @@ -539,7 +534,8 @@ clean-rt hotspot hotspot-helper clean-jtreg clean-jtreg-reports \ jtregcheck clean-remove-intree-libraries \ clean-jamvm clean-extract-jamvm clean-add-jamvm clean-add-jamvm-debug \ - clean-extract-hotspot clean-sanitise-openjdk clean-icedtea-debug + clean-extract-hotspot clean-sanitise-openjdk clean-icedtea-debug \ + clean-download-nashorn clean-extract-nashorn env: @echo 'unset JAVA_HOME' @@ -584,11 +580,12 @@ # Download OpenJDK sources. -stamps/download.stamp: stamps/download-openjdk.stamp stamps/download-cacao.stamp stamps/download-jamvm.stamp +stamps/download.stamp: stamps/download-openjdk.stamp stamps/download-cacao.stamp stamps/download-jamvm.stamp \ + stamps/download-nashorn.stamp mkdir -p stamps touch $@ -clean-download: clean-download-openjdk clean-download-cacao clean-download-jamvm +clean-download: clean-download-openjdk clean-download-cacao clean-download-jamvm clean-download-nashorn rm -f stamps/download.stamp stamps/download-openjdk.stamp: stamps/hgforest.stamp @@ -819,10 +816,39 @@ rm -f $(JAMVM_SRC_ZIP) rm -f stamps/download-jamvm.stamp +stamps/download-nashorn.stamp: +if !OPENJDK_SRC_DIR_FOUND +if USE_ALT_NASHORN_SRC_ZIP + ln -sf $(ALT_NASHORN_SRC_ZIP) $(NASHORN_SRC_ZIP) +else + if ! echo "$(NASHORN_SHA256SUM) $(NASHORN_SRC_ZIP)" \ + | $(SHA256SUM) --check ; \ + then \ + if [ $(NASHORN_SRC_ZIP) ] ; \ + then \ + mv $(NASHORN_SRC_ZIP) $(NASHORN_SRC_ZIP).old ; \ + fi ; \ + $(WGET) $(NASHORN_URL)/archive/$(NASHORN_CHANGESET).tar.gz -O $(NASHORN_SRC_ZIP); \ + if ! echo "$(NASHORN_SHA256SUM) $(NASHORN_SRC_ZIP)" \ + | $(SHA256SUM) --check ; \ + then echo "ERROR: Bad download of NASHORN zip"; false; \ + fi; \ + fi ; +endif +endif + mkdir -p stamps + touch $@ + +clean-download-nashorn: + if [ ! -z $(NASHORN_SRC_ZIP) ] ; then \ + rm -f $(NASHORN_SRC_ZIP) ; \ + fi + rm -f stamps/download-nashorn.stamp + stamps/extract.stamp: stamps/extract-openjdk.stamp \ stamps/extract-cacao.stamp stamps/remove-intree-libraries.stamp \ stamps/extract-jamvm.stamp stamps/extract-hotspot.stamp \ - stamps/sanitise-openjdk.stamp + stamps/sanitise-openjdk.stamp stamps/extract-nashorn.stamp mkdir -p stamps touch $@ @@ -953,8 +979,32 @@ rm -rf openjdk/hotspot rm -f stamps/extract-hotspot.stamp +stamps/extract-nashorn.stamp: stamps/extract-openjdk.stamp stamps/download-nashorn.stamp +if !OPENJDK_SRC_DIR_FOUND + set -e ; \ + if [ ! -z $(NASHORN_SRC_ZIP) ] ; then \ + if test -e ${NASHORN_SRC_ZIP} ; \ + then \ + if ! test -d openjdk/nashorn ; \ + then \ + case "$(NASHORN_SRC_ZIP)" in \ + *.zip) $(UNZIP) -q $(NASHORN_SRC_ZIP) ;; \ + *.tar.*) $(TAR) xf $(NASHORN_SRC_ZIP) ;; \ + esac; \ + mv nashorn-$(NASHORN_CHANGESET) openjdk/nashorn ; \ + fi ; \ + fi ; \ + fi +endif + mkdir -p stamps + touch $@ + +clean-extract-nashorn: + rm -rf openjdk/nashorn + rm -f stamps/extract-nashorn.stamp + stamps/sanitise-openjdk.stamp: stamps/extract-openjdk.stamp \ - stamps/extract-hotspot.stamp + stamps/extract-hotspot.stamp stamps/extract-nashorn.stamp chmod -R ug+w openjdk sh $(srcdir)/fsg.sh touch stamps/sanitise-openjdk.stamp @@ -1137,28 +1187,28 @@ fi stamps/versioning.stamp: stamps/patch.stamp - mv openjdk/jdk/make/common/shared/Defs.gmk Defs.gmk.bak - cat Defs.gmk.bak > openjdk/jdk/make/common/shared/Defs.gmk + mv $(VERSION_SETTINGS_FILE) ProfileNames.gmk.bak + cat ProfileNames.gmk.bak > $(VERSION_SETTINGS_FILE) icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ if test "x$(ENABLE_CACAO)" = "xyes" || \ test "x$(ENABLE_JAMVM)" = "xyes"; then \ echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ - >>openjdk/jdk/make/common/shared/Defs.gmk ; \ + >>$(VERSION_SETTINGS_FILE) ; \ echo "PRODUCT_NAME=$(ICEDTEA_NAME)" \ - >>openjdk/jdk/make/common/shared/Defs.gmk ; \ + >>$(VERSION_SETTINGS_FILE) ; \ else \ echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ - >>openjdk/jdk/make/common/shared/Defs.gmk ; \ + >>$(VERSION_SETTINGS_FILE) ; \ fi ; if HAS_JDK_REVISION - echo "JDK_REVID=$(JDK_REVISION)" >>openjdk/jdk/make/common/shared/Defs.gmk ; + echo "JDK_REVID=$(JDK_REVISION)" >>$(VERSION_SETTINGS_FILE) ; endif - echo "DISTRO_NAME=$(DIST_NAME)" >>openjdk/jdk/make/common/shared/Defs.gmk ; + echo "DISTRO_NAME=$(DIST_NAME)" >>$(VERSION_SETTINGS_FILE) ; if HAS_PKGVERSION echo "DISTRO_PACKAGE_VERSION=$(PKGVERSION)" \ - >>openjdk/jdk/make/common/shared/Defs.gmk ; + >>$(VERSION_SETTINGS_FILE) ; endif if test x"$(PROJECT_NAME)" != "xjdk8"; then \ proj_suffix="-$(PROJECT_NAME)"; \ @@ -1167,7 +1217,7 @@ ver_suffix="-$(VERSION_SUFFIX)"; \ fi ; \ sed -i "s#BUILD_VARIANT_RELEASE)#BUILD_VARIANT_RELEASE)$${proj_suffix}$${ver_suffix}#" \ - openjdk/jdk/make/common/shared/Defs.gmk; + $(VERSION_SETTINGS_FILE); mkdir -p stamps touch $@ diff -r 24d0bdd59f32 -r 8543b35292bb NEWS --- a/NEWS Fri Apr 18 20:41:34 2014 +0100 +++ b/NEWS Fri May 30 22:31:03 2014 +0100 @@ -12,13 +12,30 @@ New in release 3.0.0 (2014-XX-XX): +* Backports + - S8011278: Allow using a system-installed giflib + - S8035341: Allow using a system installed libpng + - S8038392: Generating prelink cache breaks JAVA 'jinfo' utility normal behavior + - S8042159: Allow using a system-installed lcms2 + - S8042806: Splashscreen uses libjpeg-internal macros * Bug fixes + - S8041658: Use of -fdevirtualize on macroAssembler_x86.o (via -O2) with gcc 4.9.0 creates broken VM - PR1279: Synchronise CACAO versions between IcedTea6/7/8 where possible - PR1325: Only add classes to rt-source-files.txt if actually needed - PR1346: Filter out -j option to make - PR1347: Update list of checked JDKs - PR1357: Make XRender mandatory - PR1359: Check for /usr/lib64 JVMs and generic JPackage alternative + - Don't substitute 'j' for '-j' inside -I directives + - Extend 8041658 to all files in the HotSpot build. + - PR1748: Allow clang to be used to build + - PR1766: Expand architecture support + - PR1774: Correct #ifdef to #if + - PR1774: Support GIF lib v5 + - PR1778: Allow an alternate JAR program to be used + - PR1796: make fails with "computed checksum did NOT match" + - Remove jcheck + - PR1806: Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK * JamVM - JSR 292: Invoke Dynamic - JSR 308: Type Annotations diff -r 24d0bdd59f32 -r 8543b35292bb acinclude.m4 --- a/acinclude.m4 Fri Apr 18 20:41:34 2014 +0100 +++ b/acinclude.m4 Fri May 30 22:31:03 2014 +0100 @@ -1144,10 +1144,10 @@ fi ICEDTEA7_VMS="/usr/lib/jvm/icedtea-7 /usr/lib/jvm/icedtea7 /usr/lib/jvm/java-1.7.0-openjdk /usr/lib/jvm/java-1.7.0-openjdk.x86_64 /usr/lib64/jvm/java-1.7.0-openjdk - /usr/lib/jvm/java-1.7.0" + /usr/lib/jvm/java-1.7.0 /usr/lib/jvm/java-7-openjdk" ICEDTEA8_VMS="/usr/lib/jvm/icedtea-8 /usr/lib/jvm/java-1.8.0-openjdk /usr/lib/jvm/java-1.8.0-openjdk.x86_64 /usr/lib64/jvm/java-1.8.0-openjdk - /usr/lib/jvm/java-1.8.0" + /usr/lib/jvm/java-1.8.0 /usr/lib/jvm/java-8-openjdk" for dir in ${ICEDTEA8_VMS} ${ICEDTEA7_VMS} ${BOOTSTRAP_VMS} \ /usr/lib/jvm/java-openjdk /usr/lib/jvm/openjdk /usr/lib/jvm/java-icedtea \ /etc/alternatives/java_sdk_openjdk ; do @@ -1902,3 +1902,24 @@ AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) AC_SUBST(ALT_JAMVM_SRC_ZIP) ]) + +AC_DEFUN([IT_WITH_NASHORN_SRC_ZIP], +[ + AC_MSG_CHECKING([for a NASHORN source zip]) + AC_ARG_WITH([nashorn-src-zip], + [AS_HELP_STRING(--with-nashorn-src-zip=PATH,specify the location of the Nashorn source zip)], + [ + ALT_NASHORN_SRC_ZIP=${withval} + if test "x${ALT_NASHORN_SRC_ZIP}" = "xno"; then + ALT_NASHORN_SRC_ZIP="not specified" + elif ! test -f ${ALT_NASHORN_SRC_ZIP} ; then + AC_MSG_ERROR([Invalid NASHORN source zip specified: ${ALT_NASHORN_SRC_ZIP}]) + fi + ], + [ + ALT_NASHORN_SRC_ZIP="not specified" + ]) + AM_CONDITIONAL(USE_ALT_NASHORN_SRC_ZIP, test "x${ALT_NASHORN_SRC_ZIP}" != "xnot specified") + AC_MSG_RESULT(${ALT_NASHORN_SRC_ZIP}) + AC_SUBST(ALT_NASHORN_SRC_ZIP) +]) diff -r 24d0bdd59f32 -r 8543b35292bb configure.ac --- a/configure.ac Fri Apr 18 20:41:34 2014 +0100 +++ b/configure.ac Fri May 30 22:31:03 2014 +0100 @@ -1,4 +1,4 @@ -AC_INIT([icedtea], [3.0b1pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea], [3.0.0pre01], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) @@ -126,6 +126,7 @@ IT_WITH_JAXWS_SRC_ZIP IT_WITH_JDK_SRC_ZIP IT_WITH_LANGTOOLS_SRC_ZIP +IT_WITH_NASHORN_SRC_ZIP IT_WITH_ALT_JAR_BINARY IT_ENABLE_CACAO diff -r 24d0bdd59f32 -r 8543b35292bb hotspot.map --- a/hotspot.map Fri Apr 18 20:41:34 2014 +0100 +++ b/hotspot.map Fri May 30 22:31:03 2014 +0100 @@ -1,2 +1,2 @@ # version url changeset md5sum -default http://hg.openjdk.java.net/jdk8/jdk8/hotspot 65b797426a3b a91ac222d0cd8fd2d3e02bb5ec53d49d3ecebffa2dc4506c86679709217b2366 +default http://icedtea.classpath.org/hg/icedtea8-forest/hotspot c2767d721605 153ad9d1405ee6878b0871cd6df7ff9c7bb62b5117a293aa063783e379bc337e diff -r 24d0bdd59f32 -r 8543b35292bb patches/alt-jar.patch --- a/patches/alt-jar.patch Fri Apr 18 20:41:34 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ ---- openjdk.orig/jdk/make/common/shared/Defs-java.gmk 2008-05-30 03:50:36.000000000 -0400 -+++ openjdk/jdk/make/common/shared/Defs-java.gmk 2008-08-06 11:18:26.000000000 -0400 -@@ -187,7 +181,11 @@ - - BOOT_JAVA_CMD = $(BOOTDIR)/bin/java $(JAVA_TOOLS_FLAGS) - BOOT_JAVAC_CMD = $(BOOTDIR)/bin/javac $(JAVAC_JVM_FLAGS) $(BOOT_JAVACFLAGS) --BOOT_JAR_CMD = $(BOOTDIR)/bin/jar -+ifdef ALT_JAR_CMD -+ BOOT_JAR_CMD = $(ALT_JAR_CMD) -+else -+ BOOT_JAR_CMD = $(BOOTDIR)/bin/jar -+endif - BOOT_JARSIGNER_CMD = $(BOOTDIR)/bin/jarsigner - - # Various tools we need to run (FIXUP: Are these the right ones?) diff -r 24d0bdd59f32 -r 8543b35292bb patches/cacao/arch.patch --- a/patches/cacao/arch.patch Fri Apr 18 20:41:34 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2012-09-05 20:58:45.000000000 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2012-09-07 02:18:13.610370442 +0100 -@@ -190,9 +190,19 @@ - # We need this frame pointer to make it easy to walk the stacks. - # This should be the default on X86, but ia64 and amd64 may not have this - # as the default. -+CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:32:09 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:32:09 +0000 Subject: [Bug 1368] [IcedTea8] Ensure debug data is available for all libraries and binaries without redundant files In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1368 --- Comment #4 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea?cmd=changeset;node=3d2a25b6d167 author: Andrew John Hughes date: Fri May 30 19:59:09 2014 +0100 PR1796: make fails with "computed checksum did NOT match" 2014-05-29 Andrew John Hughes * patches/alt-jar.patch, * patches/cacao/arch.patch, * patches/debian/uname.patch: Applied to upstream IcedTea forest. * patches/pr1368-debug_jdk_libs.patch, * patches/pr1368-debug_jdk_programs.patch: Applied to upstream OpenJDK. * patches/rhino.patch: Rhino has been removed. * INSTALL: Mention --with-nashorn-src-zip. * Makefile.am: (OPENJDK_VERSION): Bump to b10. (JDK_UPDATE_VERSION): Bump to 20. (CORBA_CHANGESET): Update to 3.0.0pre01 . (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (NASHORN_CHANGESET): Added & likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. (NASHORN_SHA256SUM): Added & likewise. (OPENJDK_URL): Switch back to IcedTea. (CORBA_URL): Likewise. (JAXP_URL): Likewise. (JAXWS_URL): Likewise. (JDK_URL): Likewise. (LANGTOOLS_URL): Likewise. (HOTSPOT_URL): Likewise. (NASHORN_URL): Added. (VERSION_SETTINGS_FILE): Store path of file needed to store version variable settings. (NASHORN_SRC_ZIP): Added. (ICEDTEA_PATCHES): Drop upstreamed & removed patches. (.PHONY): Add clean-download-nashorn and clean-extract-nashorn. (download): Depend on download-nashorn. (clean-download): Depend on clean-download-nashorn. (download-nashorn): Download the Nashorn source zip if necessary. (clean-download-nashorn): Cleanup for download-nashorn. (extract): Depend on extract-nashorn. (extract-nashorn); Extract the Nashorn source zip if necessary. (clean-extract-nashorn): Cleanup for extract-nashorn. (versioning): Replace hardcoded path with VERSION_SETTINGS_FILE. * NEWS: Updated. * acinclude.m4: (IT_WITH_NASHORN_SRC_ZIP): New macro to allow Nashorn source file to be set. * configure.ac: Bump version to 3.0.0pre01. Invoke IT_WITH_NASHORN_SRC_ZIP. * hotspot.map: Bump to 3.0.0pre01. * patches/memory-limits.patch, * patches/nss-config.patch, * patches/nss-not-enabled-config.patch: Regenerated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:32:13 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:32:13 +0000 Subject: [Bug 1796] make fails with "computed checksum did NOT match" In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1796 --- Comment #2 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea?cmd=changeset;node=3d2a25b6d167 author: Andrew John Hughes date: Fri May 30 19:59:09 2014 +0100 PR1796: make fails with "computed checksum did NOT match" 2014-05-29 Andrew John Hughes * patches/alt-jar.patch, * patches/cacao/arch.patch, * patches/debian/uname.patch: Applied to upstream IcedTea forest. * patches/pr1368-debug_jdk_libs.patch, * patches/pr1368-debug_jdk_programs.patch: Applied to upstream OpenJDK. * patches/rhino.patch: Rhino has been removed. * INSTALL: Mention --with-nashorn-src-zip. * Makefile.am: (OPENJDK_VERSION): Bump to b10. (JDK_UPDATE_VERSION): Bump to 20. (CORBA_CHANGESET): Update to 3.0.0pre01 . (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (NASHORN_CHANGESET): Added & likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. (NASHORN_SHA256SUM): Added & likewise. (OPENJDK_URL): Switch back to IcedTea. (CORBA_URL): Likewise. (JAXP_URL): Likewise. (JAXWS_URL): Likewise. (JDK_URL): Likewise. (LANGTOOLS_URL): Likewise. (HOTSPOT_URL): Likewise. (NASHORN_URL): Added. (VERSION_SETTINGS_FILE): Store path of file needed to store version variable settings. (NASHORN_SRC_ZIP): Added. (ICEDTEA_PATCHES): Drop upstreamed & removed patches. (.PHONY): Add clean-download-nashorn and clean-extract-nashorn. (download): Depend on download-nashorn. (clean-download): Depend on clean-download-nashorn. (download-nashorn): Download the Nashorn source zip if necessary. (clean-download-nashorn): Cleanup for download-nashorn. (extract): Depend on extract-nashorn. (extract-nashorn); Extract the Nashorn source zip if necessary. (clean-extract-nashorn): Cleanup for extract-nashorn. (versioning): Replace hardcoded path with VERSION_SETTINGS_FILE. * NEWS: Updated. * acinclude.m4: (IT_WITH_NASHORN_SRC_ZIP): New macro to allow Nashorn source file to be set. * configure.ac: Bump version to 3.0.0pre01. Invoke IT_WITH_NASHORN_SRC_ZIP. * hotspot.map: Bump to 3.0.0pre01. * patches/memory-limits.patch, * patches/nss-config.patch, * patches/nss-not-enabled-config.patch: Regenerated. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:32:20 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:32:20 +0000 Subject: [Bug 1806] [IcedTea8] Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1806 --- Comment #1 from hg commits --- details: http://icedtea.classpath.org//hg/icedtea?cmd=changeset;node=8543b35292bb author: Andrew John Hughes date: Fri May 30 22:31:03 2014 +0100 PR1806: Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK 2014-05-30 Andrew John Hughes PR1806: Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK * NEWS: Updated. * acinclude.m4: (IT_CHECK_FOR_JDK): Add java-7-openjdk and java-8-openjdk to ICEDTEA7_VMS and ICEDTEA8_VMS respectively. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:33:24 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:33:24 +0000 Subject: [Bug 1807] New: Support Debian/Ubuntu 7 OpenJDK Install as Boot JDK Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1807 Bug ID: 1807 Summary: Support Debian/Ubuntu 7 OpenJDK Install as Boot JDK Product: IcedTea Version: 7-hg Hardware: all OS: Linux Status: NEW Severity: enhancement Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org IcedTea 7 currently doesn't automatically detect the OpenJDK 7 installation on Debian/Ubuntu found in java-7-openjdk. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:33:53 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:33:53 +0000 Subject: [Bug 1807] Support Debian/Ubuntu 7 OpenJDK Install as Boot JDK In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1807 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |1284 Target Milestone|--- |2.5.0 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:33:53 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:33:53 +0000 Subject: [Bug 1284] [TRACKER] IcedTea 2.5.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1284 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1807 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:34:44 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:34:44 +0000 Subject: [Bug 1796] make fails with "computed checksum did NOT match" In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1796 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:38:17 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:38:17 +0000 Subject: [Bug 1807] [IcedTea7] Support Debian/Ubuntu 7 OpenJDK Install as Boot JDK In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1807 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Support Debian/Ubuntu 7 |[IcedTea7] Support |OpenJDK Install as Boot JDK |Debian/Ubuntu 7 OpenJDK | |Install as Boot JDK -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 21:43:41 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 21:43:41 +0000 Subject: [Bug 1808] New: [IcedTea7] type-punning warnings in demos on ppc Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1808 Bug ID: 1808 Summary: [IcedTea7] type-punning warnings in demos on ppc Product: IcedTea Version: 7-hg Hardware: ppc OS: Linux Status: NEW Severity: normal Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: gnu.andrew at redhat.com CC: unassigned at icedtea.classpath.org 31390 ../../../src/share/demo/jvmti/hprof/hprof_io.c: In function 'io_write_sites_header': 31391 ../../../src/share/demo/jvmti/hprof/hprof_io.c:818:9: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 31531 ../../../src/share/demo/jvmti/hprof/hprof_init.c: In function 'cbClassPrepare': 31532 ../../../src/share/demo/jvmti/hprof/hprof_check.c:960:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 31712 ../../../src/share/demo/jvmti/hprof/hprof_listener.c: In function 'listener_loop_function': 31713 ../../../src/share/demo/jvmti/hprof/hprof_listener.c:269:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 31715 ^ 31716 ../../../src/share/demo/jvmti/hprof/hprof_listener.c:299:17: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] 37559 ../../../../src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c: In function 'mlib_ImageLookUp_Bit_U8_4': 37560 ../../../../src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c:622:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] ...plus 5 more warnings suppressed -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:05:52 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:05:52 +0000 Subject: [Bug 1806] [IcedTea8] Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1806 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:05:52 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:05:52 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Bug 1282 depends on bug 1806, which changed state. Bug 1806 Summary: [IcedTea8] Support Debian/Ubuntu 7 & 8 OpenJDK Installs as Boot JDK http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1806 What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:06:39 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:06:39 +0000 Subject: [Bug 1796] make fails with "computed checksum did NOT match" In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1796 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |1282 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:06:39 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:06:39 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |1796 -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:07:23 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:07:23 +0000 Subject: [Bug 1282] [TRACKER] IcedTea 3.0.0 Release In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1282 Bug 1282 depends on bug 1766, which changed state. Bug 1766 Summary: [IcedTea8] Expand architecture support http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1766 What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:07:23 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:07:23 +0000 Subject: [Bug 1766] [IcedTea8] Expand architecture support In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1766 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |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: From bugzilla-daemon at icedtea.classpath.org Fri May 30 22:08:34 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 22:08:34 +0000 Subject: [Bug 1768] SIGSEGV (0xb) libsoup-2.4.so In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1768 Andrew John Hughes changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Hardware|64-bit |x86_64 Resolution|--- |INVALID --- Comment #1 from Andrew John Hughes --- This is a crash in libsoup, not the JDK. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Fri May 30 23:17:56 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 30 May 2014 23:17:56 +0000 Subject: [Bug 877] CUPS should not be a mandatory requirement In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=877 Vlastimil Babka changed: What |Removed |Added ---------------------------------------------------------------------------- URL| |https://bugs.gentoo.org/sho | |w_bug.cgi?id=486042 CC| |caster at gentoo.org --- Comment #3 from Vlastimil Babka --- If it cannot be made optional at build-time, it would be nice to be optional at runtime, at least for the headless variant. See https://bugs.gentoo.org/show_bug.cgi?id=486042 where the headless AWT is linked to libcups. Andrew suggested on IRC that maybe upstream used dlopen and icedtea made it unconditional link, so perhaps that change could be reversed? -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Sat May 31 06:55:28 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 31 May 2014 06:55:28 +0000 Subject: [Bug 1809] New: SIGSEGV in RSSOwl Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1809 Bug ID: 1809 Summary: SIGSEGV in RSSOwl Product: IcedTea Version: 7-hg Hardware: x86_64 OS: Linux Status: NEW Severity: critical Priority: P5 Component: IcedTea Assignee: gnu.andrew at redhat.com Reporter: ausaitis at gmail.com CC: unassigned at icedtea.classpath.org Created attachment 1089 --> http://icedtea.classpath.org/bugzilla/attachment.cgi?id=1089&action=edit The log file from the crash. When opening a feed in RSSOwl the application crashes. When launching RSSOwl from the console, the resulting error message is: NOT SANDBOXED # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f1fc28a5bd6, pid=2144, tid=139776710698752 # # JRE version: OpenJDK Runtime Environment (7.0_55-b14) (build 1.7.0_55-b14) # Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [libxul.so+0xb65bd6] ffi_closure_unix64+0x3590 # # 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: # /home/gcb/hs_err_pid2144.log # # If you would like to submit a bug report, please include # instructions on how to reproduce the bug and visit: # http://icedtea.classpath.org/bugzilla # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. This is repeatable. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Sat May 31 10:20:07 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 31 May 2014 10:20:07 +0000 Subject: [Bug 1810] New: The IcedTea plugin crashes on Firefox. Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1810 Bug ID: 1810 Summary: The IcedTea plugin crashes on Firefox. Product: IcedTea-Web Version: unspecified Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P5 Component: Plugin Assignee: dbhole at redhat.com Reporter: moiloakabelo at gmail.com CC: unassigned at icedtea.classpath.org All the applets on the following site crash firefox. I couldn't run the command: ICEDTEAPLUGIN_DEBUG=true firefox 2>&1 | tee plugin.log', because when I type it into bash or zsh, the terminal replies "command not found." Furthermore, althoug ~/.config/icedtea-web/log/ exists, it doesn't have any files in it, while ~/.icedtea/log/ doesn't exist. The version I got through the package information for "icedtea-7-plugin" on Ubuntu 14.04, shows that the version number is 1.5.1. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bugzilla-daemon at icedtea.classpath.org Sat May 31 10:32:07 2014 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 31 May 2014 10:32:07 +0000 Subject: [Bug 1810] The IcedTea plugin crashes on Firefox. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1810 --- Comment #1 from Kabelo Moiloa --- I've narrowed down the issue to either an issue involving: 1) Signed or unsigned applets. Unsigned applets can run smoothly while signed applets crash Firefox. 2) Applets with or without the permissions attribute, Applets without the permissions attribute crash Firefox, those with don't. I've drawn this conclusion by testing various applets, the signed ones with the permissions attribute set consistently crash Firefox, the unsigned one that don't have the permissions attributes set consistently don't crash Firefox. -- You are receiving this mail because: You are on the CC list for the bug. -------------- next part -------------- An HTML attachment was scrubbed... URL: