Re: [JDK-6341887] RFR: Patch V3: java.util.zip: Add ByteBuffer methods to Inflater/Deflater

2018-03-14 Thread Xueming Shen
Hi David, https://github.com/dmlloyd/openjdk/commit/zlib-bytebuffer-v12 Should we start to review the changes included in above link, or we should wait ? It appears the API is being updated but some implementation have not been updated to follow the spec yet, especially the piece that deals wi

Re: Reactive Streams utility API

2018-03-14 Thread James Roper
Hi all, An update on this. We've now filled out the API with feature parity with the JDK8 Streams API - for operators that make sense in Reactive Streams. We've provided example implementations of the API backed by both Akka Streams and rxjava, showing that it can be widely implemented. The TCK st

RFR 8180410: ByteArrayOutputStream should not throw IOExceptions

2018-03-14 Thread Brian Burkhalter
https://bugs.openjdk.java.net/browse/JDK-8180410 http://cr.openjdk.java.net/~bpb/8180410/webrev.00/ This proposed patch would make the following changes: 1. Add a new method writeBytes(byte[]) which writes all supplied bytes but does not throw IOE. 2. Document some previously undocumented except

Re: Raw String Literal Library Support

2018-03-14 Thread Stuart Marks
Hi Jim, Some comments (really, mainly just quibbles) about string trimming. First, * String.trim trims characters <= \u0020 from each end of a string. I agree that String.trim should be preserved unchanged for compatibility purposes. * The trimLeft, trimRight, and trimWhitespace (which trims

Re: Raw String Literal Library Support

2018-03-14 Thread Michael Hixson
Hi Jim, Does string.lines() agree with new BufferedReader(new StringReader(string)).lines() on what the lines are for all inputs? For example, does ``.lines() produce an empty stream? -Michael On Tue, Mar 13, 2018 at 6:47 AM, Jim Laskey wrote: > With the announcement of JEP 326 Raw String Liter

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread Aleksey Shipilev
On 03/14/2018 10:44 PM, mandy chung wrote: > David - I think the test fails even in your first version. > > It should use ProxyClashTest.class.getClassLoader() to define the proxy class > as the test is running > in agent vm mode. Right. This passes local testing: http://cr.openjdk.java.net/~sh

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread David Lloyd
On Wed, Mar 14, 2018 at 4:31 PM, Aleksey Shipilev wrote: > On 03/14/2018 07:09 PM, David Lloyd wrote: >> On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: >>> Thanks for adding the new test. Looks okay and some minor comment. >>> >>> +try { >>>: >>> +} catch (Throwable e)

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread mandy chung
David - I think the test fails even in your first version. It should use ProxyClashTest.class.getClassLoader() to define the proxy class as the test is running in agent vm mode. Mandy On 3/14/18 2:31 PM, Aleksey Shipilev wrote: Have you tried to run the test Because it fails: $ make images

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread Aleksey Shipilev
On 03/14/2018 07:09 PM, David Lloyd wrote: > On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: >> Thanks for adding the new test. Looks okay and some minor comment. >> >> +try { >>: >> +} catch (Throwable e) { >> +System.err.println("\nTEST FAILED:"); >> +

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread Aleksey Shipilev
On 03/14/2018 07:59 PM, Andrej Golovnin wrote: > Hi David, > > +if (! Modifier.isStatic(m.getModifiers())) { > > I think the whitespace after the ‘!’-sign should be removed. I agree. No problem, I will remove this space in my patch queue. -Aleksey

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread Andrej Golovnin
Hi David, +if (! Modifier.isStatic(m.getModifiers())) { I think the whitespace after the ‘!’-sign should be removed. Best regards, Andrej Golovnin > On 14. Mar 2018, at 19:09, David Lloyd wrote: > > On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: >> Thanks for adding the

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread Aleksey Shipilev
On 03/14/2018 07:44 PM, mandy chung wrote: I assume your colleague at Red Hat will sponsor it for you? >>> I will find out. >> I can do it, but I need to get updated on two things: >> a) Are we pushing JDK changes directly to jdk/jdk now? >> b) Do we need to run it through JDK Submit first,

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread mandy chung
On 3/14/18 11:37 AM, Aleksey Shipilev wrote: On 03/14/2018 07:09 PM, David Lloyd wrote: On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: Thanks for adding the new test. Looks okay and some minor comment. +try { : +} catch (Throwable e) { +System.err.prin

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread Aleksey Shipilev
On 03/14/2018 07:09 PM, David Lloyd wrote: > On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: >> Thanks for adding the new test. Looks okay and some minor comment. >> >> +try { >>: >> +} catch (Throwable e) { >> +System.err.println("\nTEST FAILED:"); >> +

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread mandy chung
On 3/14/18 11:09 AM, David Lloyd wrote: On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: Thanks for adding the new test. Looks okay and some minor comment. +try { : +} catch (Throwable e) { +System.err.println("\nTEST FAILED:"); +e.printStackT

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread David Lloyd
On Wed, Mar 14, 2018 at 1:00 PM, mandy chung wrote: > Thanks for adding the new test. Looks okay and some minor comment. > > +try { >: > +} catch (Throwable e) { > +System.err.println("\nTEST FAILED:"); > +e.printStackTrace(); > +throw new

Re: [PATCH] 8188240: Reflection Proxy should skip static methods

2018-03-14 Thread mandy chung
On 3/13/18 5:16 PM, David Lloyd wrote: OK, done. It's a little bigger now so I'm attaching it. Thanks for adding the new test.   Looks okay and some minor comment. +try { : +} catch (Throwable e) { +System.err.println("\nTEST FAILED:"); +e.printSta

Re: RFR of 8180451: ByteArrayInputStream should override readAllBytes, readNBytes, and transferTo

2018-03-14 Thread Brian Burkhalter
On Mar 14, 2018, at 9:27 AM, David Lloyd wrote: > @@ -196,14 +194,32 @@ > return len; > } > > +public synchronized byte[] readAllBytes() { > +byte[] result = Arrays.copyOfRange(buf, pos, count); > +pos = count; > +return result; > +} > + > +public

Re: RFR of 8180451: ByteArrayInputStream should override readAllBytes, readNBytes, and transferTo

2018-03-14 Thread Brian Burkhalter
On Mar 14, 2018, at 9:27 AM, David Lloyd wrote: > +public synchronized long transferTo(OutputStream out) throws IOException > { > +int len = count - pos > +out.write(but, pos, len); > > s/but/buf/ I guess? Yes, I already caught that myself. I think I generated the webrev b

Re: RFR of 8180451: ByteArrayInputStream should override readAllBytes, readNBytes, and transferTo

2018-03-14 Thread David Lloyd
In: @@ -196,14 +194,32 @@ return len; } +public synchronized byte[] readAllBytes() { +byte[] result = Arrays.copyOfRange(buf, pos, count); +pos = count; +return result; +} + +public synchronized int readNBytes(byte[] b, int off, int len) { +

Re: RFR: 8199471: Enable generation of callSiteForms at link time

2018-03-14 Thread Claes Redestad
On 2018-03-14 16:55, mandy chung wrote: On 3/14/18 7:09 AM, Claes Redestad wrote: http://cr.openjdk.java.net/~redestad/8199471/open.01/ This looks fine. Thanks!   The following comment needs update before you push. src/java.base/share/classes/jdk/internal/misc/JavaLangInvokeAccess.j

Re: RFR: 8199471: Enable generation of callSiteForms at link time

2018-03-14 Thread mandy chung
On 3/14/18 7:09 AM, Claes Redestad wrote: http://cr.openjdk.java.net/~redestad/8199471/open.01/ This looks fine.  The following comment needs update before you push. src/java.base/share/classes/jdk/internal/misc/JavaLangInvokeAccess.java  101  * Returns a {@code byte[]} representation

Re: RFR 8199464 [11] Remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass

2018-03-14 Thread mandy chung
Looks okay. Mandy On 3/14/18 5:56 AM, Chris Hegarty wrote: This is a review request to remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass. JDK-8179424 removed terminally deprecated jdk.unsupported/sun.reflect.Reflection.getCallerClass(int), these references are to the no

Re: Raw String Literal Library Support

2018-03-14 Thread Remi Forax
doh, sorry for the tangential comment, it was the only comment i had, all other methods are fine. Rémi - Mail original - > De: "Brian Goetz" > À: "Peter Levart" , "Xueming Shen" > , "core-libs-dev" > > Envoyé: Mercredi 14 Mars 2018 16:26:30 > Objet: Re: Raw String Literal Library Supp

Re: RFR of 8180451: ByteArrayInputStream should override readAllBytes, readNBytes, and transferTo

2018-03-14 Thread Brian Burkhalter
Reprising this thread from three months ago [1]. A patch including the changes suggested below is at http://cr.openjdk.java.net/~bpb/8180451/webrev.01/ with the differences between this and the prior version at http://cr.openjdk.java.net/~bpb/8180451/webrev.00-01/ Thanks, Brian [1] http://m

Re: RFR: 8199471: Enable generation of callSiteForms at link time

2018-03-14 Thread Paul Sandoz
> On Mar 14, 2018, at 7:09 AM, Claes Redestad wrote: > > Hi Paul, > > On 2018-03-13 20:32, Paul Sandoz wrote: >> Invokers.java >> — >> >> Looks good. > > Thanks! > >> >> Minor comment: >> >> 664 /* Placeholder class for Invokers generated ahead of time */ >> 665 final class Hold

Re: Raw String Literal Library Support

2018-03-14 Thread Brian Goetz
Perhaps we can "split" this discussion on splitting into a separate thread.  What's happened here is what always happens, which is:  - Jim spent a lot of time and effort writing a comprehensive and clear proposal;  - Someone made a tangential comment on one aspect of it;  - Flood of deep-dive

Re: Raw String Literal Library Support

2018-03-14 Thread John Rose
On Mar 14, 2018, at 6:11 AM, Peter Levart wrote: > > Pattern.compile(string) > > Now if 'string' above is a constant, '~ string' could be a constant too. > Combined with raw string literals, Pattern constants could be very compact. > > > What do you think? There's no need to introduce syntax

Re: RFR: 8199471: Enable generation of callSiteForms at link time

2018-03-14 Thread Claes Redestad
Hi Paul, On 2018-03-13 20:32, Paul Sandoz wrote: Invokers.java — Looks good. Thanks! Minor comment: 664 /* Placeholder class for Invokers generated ahead of time */ 665 final class Holder {} 666 667 /* Placeholder class for callSiteForms generated ahead of time */ 66

Re: RFR 8199464 [11] Remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass

2018-03-14 Thread Chris Hegarty
On 14/03/18 13:08, Alan Bateman wrote: On 14/03/2018 12:56, Chris Hegarty wrote: This is a review request to remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass. JDK-8179424 removed terminally deprecated jdk.unsupported/sun.reflect.Reflection.getCallerClass(int), these ref

Re: Raw String Literal Library Support

2018-03-14 Thread Peter Levart
I think that: String delim = ...; String r = s.splits(Pattern.quote(delim)).collect(Collectors.joining(delim)); ... should always produce a result such that r.equals(s); Otherwise, is it wise to add methods that take a regex as a String? It is rarely needed for a regex parameter to be dynam

Re: RFR 8199464 [11] Remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass

2018-03-14 Thread Alan Bateman
On 14/03/2018 12:56, Chris Hegarty wrote: This is a review request to remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass. JDK-8179424 removed terminally deprecated jdk.unsupported/sun.reflect.Reflection.getCallerClass(int), these references are to the no-args getCallerClas

RE: RFR 8199464 [11] Remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass

2018-03-14 Thread Langer, Christoph
Looks good, Chris. > -Original Message- > From: core-libs-dev [mailto:core-libs-dev-boun...@openjdk.java.net] On > Behalf Of Chris Hegarty > Sent: Mittwoch, 14. März 2018 13:57 > To: build-dev ; Core-Libs-Dev d...@openjdk.java.net> > Subject: RFR 8199464 [11] Remove remaining vestiges of

RFR 8199464 [11] Remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass

2018-03-14 Thread Chris Hegarty
This is a review request to remove remaining vestiges of Java_sun_reflect_Reflection_getCallerClass. JDK-8179424 removed terminally deprecated jdk.unsupported/sun.reflect.Reflection.getCallerClass(int), these references are to the no-args getCallerClass that was removed a long time ago. These