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
*/
- 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 extends K, ? extends V> m) {
+ for (final Map.Entry extends K, ? extends V> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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 extends UnsignedAppletActionTableModel, ? extends Integer> 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.
*
+ * 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: