RFR: 8164781: Pattern.asPredicate specification is incomplete

Paul Sandoz paul.sandoz at oracle.com
Mon Apr 2 17:56:14 UTC 2018


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 verbose:

  The predicate which can be used for finding a match on a subsequence of a string

You will need a CSR to document the clarification in specification behavior.


To Uwe’s point, we could have chosen a more descriptive method name, e.g. asFinding/Predicate, leaving logical space for say any future asMatching/Predicate if we chose to add it.


> On Apr 1, 2018, at 1:11 AM, Vivek Theeyarath <vivek.theeyarath at oracle.com> wrote:
> 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

More information about the core-libs-dev mailing list