Re: WeakReference with null referent

2018-07-10 Thread Zheka Kozlov
There are a few valid use cases where `new WeakReference<>(null)` makes some sense. So, we shouldn't forbid nulls. `new WeakReference<>(null, queue)` makes less sense but I bet someone is using this too for some reason. My initial message was not about changing the behavior but only about

Re: RFR(JDK12/JAXP/java.xml) 8194680: StartElement#getAttributes and getNamespaces refer to incorrect package

2018-07-10 Thread Joe Wang
On 7/10/18, 4:39 PM, Jonathan Gibbons wrote: On 7/10/18 4:27 PM, Joe Wang wrote: Hi, Please review a javadoc fix for a couple of incorrect references to the javax.xml.stream package. Attribute and Namespace are both in the javax.xml.stream.events, and so is StartElement where they are

RFR 8207016 : [win] Avoid redundant native memory allocation in getFinalPath()

2018-07-10 Thread Ivan Gerasimov
Hello! File src/java.base/windows/native/libjava/WinNTFileSystem_md.c The function getFinalPath() is wrapper for GetFinalPathNameByHandleW(), which is used to resolve the symlinks on Windows. If the resulting string begins with a prefix "\\?\" or "\\?\UNC", a copy without the prefix is

Re: RFR(JDK12/JAXP/java.xml) 8194680: StartElement#getAttributes and getNamespaces refer to incorrect package

2018-07-10 Thread Jonathan Gibbons
On 7/10/18 4:27 PM, Joe Wang wrote: Hi, Please review a javadoc fix for a couple of incorrect references to the javax.xml.stream package. Attribute and Namespace are both in the javax.xml.stream.events, and so is StartElement where they are referenced. JBS:

RFR(JDK12/JAXP/java.xml) 8194680: StartElement#getAttributes and getNamespaces refer to incorrect package

2018-07-10 Thread Joe Wang
Hi, Please review a javadoc fix for a couple of incorrect references to the javax.xml.stream package. Attribute and Namespace are both in the javax.xml.stream.events, and so is StartElement where they are referenced. JBS: https://bugs.openjdk.java.net/browse/JDK-8194680 webrevs:

Re: WeakReference with null referent

2018-07-10 Thread mandy chung
On 7/10/18 4:04 PM, Éamonn McManus wrote: Do you know any other example? Here's an example from the JDK itself: http://hg.openjdk.java.net/jdk/jdk11/file/2a89e80301b1/src/java.desktop/share/classes/sun/font/Type1Font.java#l101 Thanks Eamonn. I also found a few other similar usages in JDK

Re: RFR 8206955 MethodHandleProxies.asInterfaceInstance does not support default methods

2018-07-10 Thread mandy chung
This patch looks good to me. Mandy On 7/10/18 3:43 PM, Paul Sandoz wrote: Hi, Please review this fix to MethodHandleProxies.asInterfaceInstance to support default methods: http://cr.openjdk.java.net/~psandoz/jdk/JDK-8206955-mh-func-iface-proxy-default-methods/webrev/ It probably requires a

RFR 8206955 MethodHandleProxies.asInterfaceInstance does not support default methods

2018-07-10 Thread Paul Sandoz
Hi, Please review this fix to MethodHandleProxies.asInterfaceInstance to support default methods: http://cr.openjdk.java.net/~psandoz/jdk/JDK-8206955-mh-func-iface-proxy-default-methods/webrev/

RFR: 8207005 : Disable the file canonicalization cache by default

2018-07-10 Thread Brent Christian
Hi, Please review this change to disable the file canonicalization cache by default. Bug: https://bugs.openjdk.java.net/browse/JDK-8207005 From the bug report: "The file canonicalization cache was added back in JDK 1.4.2 in order to improve startup time. The cache has long-standing

Re: WeakReference with null referent

2018-07-10 Thread mandy chung
On 7/9/18 11:59 PM, Peter Levart wrote: There are situations where being able to create a XxxReference without a referent is useful. For example, imagine a doubly-linked list of WeakReference subclasses - a special instance without a referent can be used as the head of such list that

Re: RFR: 8148188: Enhance the security libraries to record events of interest

2018-07-10 Thread Seán Coffey
Erik, After some trial edits, I'm not so sure if moving the event & logger commit code into the class where it's used works too well after all. In the code you suggested, there's an assumption that calls such as EventHelper.certificateChain(..) are low cost. While that might be the case

RE: Prototype of jpackager in jdk/sandbox [was: Draft JEP proposal: JDK-8200758: Packaging Tool]

2018-07-10 Thread Buchberger, Joerg
Hi thanks for the update/info. I had a quick look at the changes. So, here some thoughts... As described in JDK-8200758, and therefore expected, WinExeBundler has been removed in favor of putting focus on WinMsiBundler. (Although, I regret that decision - since my personal experience has been

Consider making TerminatingThreadLocal public

2018-07-10 Thread Norman Maurer
Hi all, It came to my attention that you introduced TerminatingThreadLocal in openjdk lately as an “internal class”: http://hg.openjdk.java.net/jdk/jdk/rev/106dc156ce6b I would like to take the chance to ask if you ever considered to make

RE: [RFR] 8205525 : Improve exception messages during manifest parsing of jar archives

2018-07-10 Thread Baesken, Matthias
Hi Alan, thanks for commenting on this . Jaikiran mentioned that printing just the jar file name and not file with path might be okay : > I am not a reviewer and neither do I have enough knowledge about whether > jar/file _names_ are considered security sensitive. However, the patch >

Re: WeakReference with null referent

2018-07-10 Thread Peter Levart
Hi Mandy, On 07/10/2018 12:18 AM, mandy chung wrote: On 7/9/18 12:59 PM, Per Liden wrote: On 2018-07-09 20:49, mandy chung wrote: On 7/9/18 11:31 AM, Zheka Kozlov wrote: It is possible to create a WeakReference/SoftReference/PhantomReference with a null value in which case the Reference