RE: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-06 Thread Vivek Theeyarath
: Roger Riggs Sent: Thursday, April 05, 2018 6:35 PM To: core-libs-dev@openjdk.java.net Subject: Re: RFR: 8164781: Pattern.asPredicate specification is incomplete Hi Vivek, Can we do something to make the first sentence less confusing? How about: * Creates a predicate that tests a given input

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-05 Thread Paul Sandoz
> On Apr 5, 2018, at 3:34 AM, Vivek Theeyarath > wrote: > >>> >>> Hi, >>> I have incorporated the changes as per the feedback and here is the >>> updated webrev . >>> http://cr.openjdk.java.net/~rraghavan/8164781/webrev.02/ . >>> Bug:

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-05 Thread Roger Riggs
Hi Vivek, Can we do something to make the first sentence less confusing? How about: * Creates a predicate that tests a given input string for a subsequence that matches this pattern. -or- * Creates a predicate that tests if this pattern is found in a given input string. Thanks, Roger On

RE: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-05 Thread Vivek Theeyarath
>> >> Hi, >> I have incorporated the changes as per the feedback and here is the >> updated webrev . >> http://cr.openjdk.java.net/~rraghavan/8164781/webrev.02/ . >>Bug: https://bugs.openjdk.java.net/browse/JDK-8164781 >> >+1 Thanks Paul >I know it’s picky, but would you mind sticking

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-04 Thread Paul Sandoz
nt: Wednesday, April 04, 2018 6:13 AM > To: Vivek Theeyarath <vivek.theeyar...@oracle.com> > Cc: Paul Sandoz <paul.san...@oracle.com>; Core-Libs-Dev > <core-libs-dev@openjdk.java.net> > Subject: Re: RFR: 8164781: Pattern.asPredicate specification is incomplete > > Hi

RE: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-04 Thread Vivek Theeyarath
va.net> Subject: Re: RFR: 8164781: Pattern.asPredicate specification is incomplete Hi Vivek, Thanks for taking on this task. In case it wasn't clear from Paul's mail, what I think you should do is continue with this fix as a doc-only (and test-only) change, and not modify the behavior of

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-03 Thread Stuart Marks
On 4/3/18 5:43 PM, Stuart Marks wrote: Adding a method to create a Predicate that has match() semantics would be a fine task to consider separately. I notice I had already filed a bug for this: https://bugs.openjdk.java.net/browse/JDK-8184692 Feel free to pick it up. s'marks

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-03 Thread Stuart Marks
Hi Vivek, Thanks for taking on this task. In case it wasn't clear from Paul's mail, what I think you should do is continue with this fix as a doc-only (and test-only) change, and not modify the behavior of this method. Doing that would be an incompatible change. Uwe's point is a reasonable

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-02 Thread Martin Buchholz
On Sun, Apr 1, 2018 at 3:56 AM, Uwe Schindler wrote: > > In general, I'd prefer to have a predicate that uses matches() instead of > find(). In my code I have never used find() because in most cases you want > to match the whole string anyways. Of course you can use ^ and

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-02 Thread Paul Sandoz
Hi, Looks good, expect for: 5823 * @return The predicate which can be used for finding on a string “finding on a… ” is a little awkward to parse . I recommend to either change it back, since the first sentence of the method doc says what it means by matches, or being a little more

Re: RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-01 Thread Uwe Schindler
Hi, In general, I'd prefer to have a predicate that uses matches() instead of find(). In my code I have never used find() because in most cases you want to match the whole string anyways. Of course you can use ^ and $ but I don't like that leniency. If I write code, I prefer to be explicit in

RFR: 8164781: Pattern.asPredicate specification is incomplete

2018-04-01 Thread Vivek Theeyarath
Hi all, Please review. Bug: https://bugs.openjdk.java.net/browse/JDK-8164781 Webrev: http://cr.openjdk.java.net/~rraghavan/8164781/webrev.01/ Regards Vivek